diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index c8e41063..6c411ce3 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -16,11 +16,11 @@ If multiple identifiers make sense you can also state the commands multiple time "/area" identifiers: audit-logging|auto-scaling|backup|certification|control-plane-migration|control-plane|cost|delivery|dev-productivity|disaster-recovery|documentation|high-availability|logging|metering|monitoring|networking|open-source|operations|ops-productivity|os|performance|quality|robustness|scalability|security|storage|testing|usability|user-management "/kind" identifiers: api-change|bug|cleanup|discussion|enhancement|epic|impediment|poc|post-mortem|question|regression|task|technical-debt|test -"/priority" identifiers: normal|critical|blocker +"/priority" identifiers: 1|2|3|4|5 (ordered from greatest to least) --> /area TODO /kind bug -/priority normal +/priority 3 /os ubuntu **What happened**: diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md index 8c20a6b5..785f3b02 100644 --- a/.github/ISSUE_TEMPLATE/feature.md +++ b/.github/ISSUE_TEMPLATE/feature.md @@ -16,11 +16,11 @@ If multiple identifiers make sense you can also state the commands multiple time "/area" identifiers: audit-logging|auto-scaling|backup|certification|control-plane-migration|control-plane|cost|delivery|dev-productivity|disaster-recovery|documentation|high-availability|logging|metering|monitoring|networking|open-source|operations|ops-productivity|os|performance|quality|robustness|scalability|security|storage|testing|usability|user-management "/kind" identifiers: api-change|bug|cleanup|discussion|enhancement|epic|impediment|poc|post-mortem|question|regression|task|technical-debt|test -"/priority" identifiers: normal|critical|blocker +"/priority" identifiers: 1|2|3|4|5 (ordered from greatest to least) --> /area TODO /kind enhancement -/priority normal +/priority 3 /os ubuntu **What would you like to be added**: diff --git a/.github/ISSUE_TEMPLATE/flaking-test.md b/.github/ISSUE_TEMPLATE/flaking-test.md index a67ef681..e795fca3 100644 --- a/.github/ISSUE_TEMPLATE/flaking-test.md +++ b/.github/ISSUE_TEMPLATE/flaking-test.md @@ -19,11 +19,11 @@ If multiple identifiers make sense you can also state the commands multiple time "/area" identifiers: audit-logging|auto-scaling|backup|certification|control-plane-migration|control-plane|cost|delivery|dev-productivity|disaster-recovery|documentation|high-availability|logging|metering|monitoring|networking|open-source|operations|ops-productivity|os|performance|quality|robustness|scalability|security|storage|testing|usability|user-management "/kind" identifiers: api-change|bug|cleanup|discussion|enhancement|epic|impediment|poc|post-mortem|question|regression|task|technical-debt|test -"/priority" identifiers: normal|critical|blocker +"/priority" identifiers: 1|2|3|4|5 (ordered from greatest to least) --> /area testing /kind flake -/priority normal +/priority 3 /os ubuntu **Which test(s)/suite(s) are flaking**: diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 7765afae..bfc765ff 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -9,13 +9,11 @@ If multiple identifiers make sense you can also state the commands multiple time "/area" identifiers: audit-logging|auto-scaling|backup|certification|control-plane-migration|control-plane|cost|delivery|dev-productivity|disaster-recovery|documentation|high-availability|logging|metering|monitoring|networking|open-source|ops-productivity|os|performance|quality|robustness|scalability|security|storage|testing|usability|user-management "/kind" identifiers: api-change|bug|cleanup|discussion|enhancement|epic|impediment|poc|post-mortem|question|regression|task|technical-debt|test -"/priority" identifiers: normal|critical|blocker For Gardener Enhancement Proposals (GEPs), please check the following [documentation](https://github.com/gardener/gardener/tree/master/docs/proposals/README.md) before submitting this pull request. --> /area TODO /kind TODO -/priority normal /os ubuntu **What this PR does / why we need it**: diff --git a/charts/gardener-extension-os-ubuntu/templates/rbac.yaml b/charts/gardener-extension-os-ubuntu/templates/rbac.yaml index 3059cea3..846c3b6e 100644 --- a/charts/gardener-extension-os-ubuntu/templates/rbac.yaml +++ b/charts/gardener-extension-os-ubuntu/templates/rbac.yaml @@ -36,21 +36,29 @@ rules: - apiGroups: - "" resources: - - configmaps - events verbs: - create - apiGroups: - "" + - coordination.k8s.io + resources: + - configmaps + - leases + verbs: + - create +- apiGroups: + - "" + - coordination.k8s.io resources: - configmaps + - leases resourceNames: - ubuntu-leader-election verbs: - get - watch - update - - patch --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding diff --git a/cmd/gardener-extension-os-ubuntu/app/app.go b/cmd/gardener-extension-os-ubuntu/app/app.go index 3bae7945..ac49817a 100644 --- a/cmd/gardener-extension-os-ubuntu/app/app.go +++ b/cmd/gardener-extension-os-ubuntu/app/app.go @@ -25,10 +25,10 @@ import ( "github.com/gardener/gardener/extensions/pkg/controller/operatingsystemconfig/oscommon" oscommoncmd "github.com/gardener/gardener/extensions/pkg/controller/operatingsystemconfig/oscommon/cmd" "github.com/gardener/gardener/extensions/pkg/util" - "github.com/gardener/gardener/pkg/client/kubernetes/utils" "github.com/spf13/cobra" corev1 "k8s.io/api/core/v1" componentbaseconfig "k8s.io/component-base/config" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/manager" ) @@ -83,9 +83,9 @@ func NewControllerCommand(ctx context.Context) *cobra.Command { }, restOpts.Completed().Config) completedMgrOpts := mgrOpts.Completed().Options() - completedMgrOpts.NewClient = utils.NewClientFuncWithDisabledCacheFor( + completedMgrOpts.ClientDisableCacheFor = []client.Object{ &corev1.Secret{}, // applied for OperatingSystemConfig Secret references - ) + } mgr, err := manager.New(restOpts.Completed().Config, completedMgrOpts) if err != nil { @@ -104,7 +104,7 @@ func NewControllerCommand(ctx context.Context) *cobra.Command { controllercmd.LogErrAndExit(err, "Could not add controller to manager") } - if err := mgr.Start(ctx.Done()); err != nil { + if err := mgr.Start(ctx); err != nil { controllercmd.LogErrAndExit(err, "Error running manager") } }, diff --git a/cmd/gardener-extension-os-ubuntu/main.go b/cmd/gardener-extension-os-ubuntu/main.go index 6c08edff..02852a80 100644 --- a/cmd/gardener-extension-os-ubuntu/main.go +++ b/cmd/gardener-extension-os-ubuntu/main.go @@ -20,15 +20,15 @@ import ( "github.com/gardener/gardener-extension-os-ubuntu/cmd/gardener-extension-os-ubuntu/app" - extcontroller "github.com/gardener/gardener/extensions/pkg/controller" "github.com/gardener/gardener/extensions/pkg/log" runtimelog "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/manager/signals" ) func main() { runtimelog.SetLogger(log.ZapLogger(false)) - cmd := app.NewControllerCommand(extcontroller.SetupSignalHandlerContext()) + cmd := app.NewControllerCommand(signals.SetupSignalHandler()) if err := cmd.Execute(); err != nil { fmt.Fprintf(os.Stderr, "error: %v\n", err) diff --git a/example/controller-registration.yaml b/example/controller-registration.yaml index ccc9cf4d..cf6c2251 100644 --- a/example/controller-registration.yaml +++ b/example/controller-registration.yaml @@ -12,7 +12,7 @@ spec: deployment: type: helm providerConfig: - chart: H4sIAAAAAAAAA+0ba2/bOHI/61fMebHYdlFJthMnBx/2cF4n2wabJkHcdlEcDgUt0Ta3EqklKbtut/fbb0g9LNuJ7SS9pA8NiliihjPDITkvsmMiQ8qpdOk7TbligrtCuekw5Tr1v/s00EQ47HTsL8Lqr31u7e232p32wYFpb3X2WnvfQecT8d8IqdJEAnwnhdCb8LZ9/0JhvGn+vQmNYjbmQtK78Ng2/zjtK/N/uN/B+W9+qkFugm98/r+HC6I1lVyBFpDNNcwmlMMwZVHI+BgSErwlY6o853t4MWEKVJokQmp8wPURwTgSQ4iJDiaI/QQkjYhmU4r99KTSTniIBDgd41fB4VEi6Yi9oyHMGOL97bEH5zyag+C2pxEJEiohYpx6jnc0eDPQKBuS6Is4RgKv+gMImVSON2bat38z8R1v+F769m/RMBn75k/xqqbcXxAa4vjSBEYsosr5yVOzBP8OyVv8q2N8/i+iviKSiVTBydExMkyk+IMG2vFYSImf4WGT401VIELqOw89q7vDxv3fnxCpvTmJozvx2Lb/23tr+7+9v1/v//sAkrBXVJp578K05ZAkqbx6rZbXdEM6dUKqAskSbT/04Bn6BQjM6oCRkKAnFJ7mCwle2rUD5wMol5TDSUy7sGmtOdOr2D60dr5+2Lj/QxF4Y3FnHlv2f7t5eLiy/w/22816/98H+D66wWSOnnKi4VHwGNo4HzDoXcDgGHBrE25fyAjdIyOaQiDihPC5Bz10/babQpevqJzS0MviA+NJAX8jFuCSQg+f8pBmVqKHwQT+DMRIzwhGGqcZyhOYetBGgxHQRANRwIXGfgK7yBlTSI3b7qcn/eMzFMxwcHwf/xUUrmBS0s4tGrS9JjwyCI38U+PxPwyJuUgxTpkbppAiM10OIhcIuZthowJ4QLN4RS8YeIbG65yGGGqC6AQ7JPg2qiIC0bnQFiZaJ13fn81mHrESe0KO/Vxpys/H6qLUea+XHCMUo+0/UyZxxMM5oL3GDmSIskZkZidsLCl+M8Ech5nEoMgEXypXuCETMqUlG6Z6SWmFjDj0KgKqDZdAozeAk0EDfukNTgZPDJHfT148O3/5An7vXV72zl6cHA/g/BL652dHJy9Ozs/w7Vfonb2G307Ojp4AZWYmUZ0Y9OEIUExm1IkrxtAaULokQuFSVEIDNmIBDo2PUwxBYSzQTXAblFIZM2WmVdnIEslELGbaBpdqfVyegyhj0R0bY2fWsef5+G9KeSikj7HjJB16OMl+YRAXDxOMD/2inxsIrqWIIjSZko6NpixLT02gNJzg5eRfHV8OUBv5G31HcNTUv46ECbTgPDF8cIiDudI07gs+YuNuTnfTRxdDUDNIDOhtvJ77Z8rN6lBQHXsewFtF541Gp0ZdgZASQ1tYyAhLMjpJlXrtoL902Oj/cYklmMyhMboTj5vXfw73Wq26/nMfsOP8v8FMH22P8nRy81xwy/y32nv7y/Pfbh1gSljHf/cAHz64ENIR4xgVmSytAe7Hj87GTM10QbdpEe1LSYDF6BkyCgDmCxvBhKgLW+mBhpqQdueg2wDvFYlSqjyL72kyhrJHIhnXI2j8oP71g1rFlDQRimkh55tI0AhjiCsIdm9NEAeLL5VHp6q2kCaRmMeU6zyHzTSAoZnyMaVeU1fRDyUTGJ/Ng4gotdQ1V52iMTb3TcCNoXLjnz8Dpsb7bhNH0ceIcYgRuWYo8m/pkOYxrveU6SLcNZQUhpVhGqF3997+HQcnSomMkq7j0bozjyHVpMLoOjQSJROyrKLK80PvjW8BdrT/izV+i3Lgtvz/sLW3Yv/bewd1/f9eoFr/KyzWW8bDLhyVU+7EuJtDokkXDeIOpbwMSWGmgJgfPoB3SSNKMAc7K5oz2xqRIVoHQxQMb+8t2hjJqabWOuzECLNoGsWYfPk2H9kBf50R47gE+FWyGjFNEmpElHTKDLlnmAuhvzg1yWYXmvaLzcFV1j93I3ljXyDjbLQKCQfYNRuvPRc5rSjgDiq4+aAAiq2dS1OZYAPRkmB3Eu02wgEUWjdQ+Mm+8ZNnu/I1FSlM/XtBYKZg524m7yXonmU5ene3JZ+BjR7ssBgPojRcBEVeMbQS7SKNoguBq2S+tHKyACQpP1b7BSKOCW7OssEFfye5XHDdmLwz1YsgxQyfaxfTfHwxh14/V7gv8n77nCMP5jxQVUEMvZApU1qoVESWKOWf+4uv8Bf8IRiHxpPGKq3sZM4VWX0Dh0A4F1kx5zrpsi7nRY9e2aFKm/JpVVnZTJ4e946OL98cnx73Ta3qzVnv+fHgotc/LjEBpobhr1LE3UojwIjRKLyko+XWvP2C6Em33EteaQSLeG5hG5RIZUCXNFo2dhEdtHhtikHrPf4CjtYZpwRazZWg9Fb2f0f/vxSr3jQE2Jb/o+tf8f97rWan9v/3AVX/X7VaVycn1ohl4cFF1SrfNEKwu6uLS7gAx1wiINERHZE0Qr86Ipg2LJ86NgqOYGVaP3gsGXUXlViv8dAK/sxhx/0vhyS49UWAbfF/p91crf+0mnX9517AdV2nagPsRJNUT3Crvc9K/ovCQbbz+xHqjMpLEdGbZwZfRMwv08j4YRc7sqdSpIkV2F1YGOUVPL0gEmnoLPlvgxpkSlL2RRTHNsoe2wT22GbTJx+l0+lGjBHjJGLvMxZooIc54zHV9jfCPMU+zEymYZ+S8ilNcNLo+gAbjfWRKBpIqlX1+TbMsaNhWeG+EGknObKBxyTJRKFTDIJW2Oc8bk6u+GYT1Ox7fqiGCyM0K8vkbuYmy5XDna0qtjK0O+2vX7ABZ/5r3WY4wjyWLiZsg4IQa93+7KQOlQ7NdT27ozMSg6Xk8FNWNR7ant8UdvT/eTZNMoXdMBLYFv/v76/6/712q67/3Qus3P+7cnt8y+W/h56f/zfsuP+nCbn9PeBt5797nZX7f+ZGYH3/915gpTRl5jm7MRTaI8yFcWigTxYqIOvnfO1GbjYQVzPEuBBhL0em8grrUa0zZGfOpq7gIu8dbUdRHb5C+CKSq9ZOl9syg1PWeW0jo5Vyb/kpKxr/+NOPZZEuZrwXRWJGw2oBMEhSK2x5Ma+xLom36OohvrlmV6A3NgxgtVulYGiq9rGQ8xuxzrrchnvec/VQHAC3D8bBZU30qgMl0752qGQaN60HRMii6eq0ZS3PRUiXauZG9Cqyt8BbLpI+9Hb77GCj/Z9m2r3rfwDZFv919jur9786df33fiA7sMpOMfOrMF2gqTcOpLHw5fLI/8vT4lbsohbiVyMsTcZdsDGD2eFJ5YjrZHQm9IW5Ko6b31lk4/Dho+PgBjZC5K6nC1qm9BrLvW6Drf3tNGNn2Swe7D9nW41Iw3iqhuNUTpYM0srRF5LHxmtPnIp6tbN+5tWFf//nqw8ia6ihhhpqqKGGGmqooYYaaqihhhpqqKGGzxL+B4RMcBcAUAAA + chart: H4sIAAAAAAAAA+0ba2/bOHI/61fMebHYdlFLthMnBx/2cF7H2wabJkHcdlEcDgUt0Ta3EqklKbtut/fbb0g9LD9iO0kv6UODIpao4cxwSM6L7JjIgHIq6/SdplwxwetC1ZNhwnXiffdpoIFw3G7bX4TVX/vcPDhsttqtoyPT3mwfNA++g/Yn4r8VEqWJBPhOCqG34e36/oXCeNv8uxMaRmzMhaR34bFr/nHaV+b/+LCN89/4VIPcBt/4/H8Pl0RrKrkCLSCda5hNKIdhwsKA8THExH9LxlS5zvfwYsIUqCSOhdT4gOsjhHEohhAR7U8Q+wlIGhLNphT76UmpnfAACXA6xq+Cw6NY0hF7RwOYMcT722MXLng4B8FtTyMSxFRCyDh1Hfdk8GagUTYk0RNRhARe9QYQMKkcd8y0Z/+m4jvu8L307N+8YTL2zJ/8VU25tyA0xPElMYxYSJXzk6tmMf4dkrf4V0f4/F9EfUUkE4mC05M+Moyl+IP62nFZQImX4mGT406VLwLqOQ89q/vD1v3fmxCp3TmJwjvx2LX/Wwdr+791eFjt//sAErNXVJp578C06ZA4Lr26zabbqAd06gRU+ZLF2n7owjP0C+Cb1QEjIUFPKDzNFhK8tGsHLgZQLCmHk4h2YNtac6ab2D60dr5+2Lr/A+G7Y3FnHjv2f6txfLyy/48OW41q/98HeB66wXiOnnKi4ZH/GFo4HzDoXsKgD7i1CbcvZITukRFNwRdRTPjchS66fttNoctXVE5p4KbxgfGkgL8h83FJoYdPeEBTK9HFYAJ/BmKkZwQjjbMU5QlMXWihwfBprIEo4EJjP4Fd5IwppMZt97PTXv8cBTMcHM/DfzmFDUwK2plFg5bbgEcGoZZ9qj3+hyExFwnGKXPDFBJkpotBZAIhdzNsVAD3aRqv6AUD19B4ndEQQ00QnWCHGN9GZUQgOhPawkTruON5s9nMJVZiV8ixlylNedlY6yh11uslxwjFaPvPhEkc8XAOaK+xAxmirCGZ2QkbS4rfTDDHYSYxKDLBl8oUbsgETGnJholeUlouIw69jIBqwyVQ6w7gdFCDX7qD08ETQ+T30xfPLl6+gN+7V1fd8xen/QFcXEHv4vzk9MXpxTm+/Qrd89fw2+n5yROgzMwkqhODPhwBismMOnHFGFoDSpdEyF2KiqnPRszHofFxgiEojAW6CW6DUiojpsy0KhtZIpmQRUzb4FKtj8t1EGUsOmNj7Mw6dl0P/00pD4T0MHacJEMXJ9nLDeLiYYLxoZf3q/uCaynCEE2mpGOjKcvSVRMoDCe4GflX/asBaiN7o+8Ijpp615EwgRZcxIYPDnEwV5pGPcFHbNzJ6G77WMcQ1AwSA3obr2f+mXKzOhSUx54F8FbRWaPRqVGXL6TE0BYWMsKSjE5cpl456C8dtvp/XGIxJnNojO7E4+b1n+ODZrOq/9wH7Dn/bzDTR9ujXB3fPBfcMf/N1sHh8vy3mkeYElbx3z3Ahw91COiIcYyKTJZWg/rHj87WTM10QbdpEe1LQYBF6BlSCgDmCxvBhKhLW+mBmpqQVvuoUwP3FQkTqlyL72oyhqJHLBnXI6j9oP71g1rFlDQWimkh59tI0BBjiA0EO7cmiIPFl9KjU1ZbQONQzCPKdZbDphrA0Ex5mFKvqSvvh5IJjM/mfkiUWuqaqU7RCJt7JuDGULn2z58BU+PDegNH0cOIcYgRuWYo8m/JkGYxrvuU6TzcNZQUhpVBEqJ3d9/+HQcnComMkq7j0bwzjyHVpMToOjQSxhOyrKLS80PvjW8B9rT/izV+i3Lgrvz/uHmwYv9bB0dV/f9eoFz/yy3WW8aDDpwUU+5EuJsDokkHDeIepbwUSWGmgJgfPoB7RUNKMAc7z5tT2xqSIVoHQxQMb/ct2hjJqabWOuzFCLNoGkaYfHk2H9kDf50R47gE+CZZjZgmCTUiSjplhtwzzIXQX5yZZLMDDfvF5uAq7Z+5kayxJ5BxOlqFhH3smo7XnouclRRwBxXcfFAA+dbOpClNsIFwSbA7iXYb4QByrRvI/WTP+MnzffmaihSm/l3fN1OwdzeT9xJ0z7IYfX2/JZ+CjR7ssBj3wyRYBEVuPrQC7TIJw0uBq2S+tHLSACQuPpb7+SKKCG7OoqEO3l5y1aFej8g7U73wE8zwua5jmo8v5tDr5xL3Rd5vnzPkwZz7qiyIoRcwZUoLpYrIEqXsc2/xFf6CPwTjUHtSW6WVnszVRVrfwCEQzkVazLlOurTLRd6jW3Qo06Z8WlZWOpNn/e5J/+pN/6zfM7WqN+fd5/3BZbfXLzABpobhr1JEnVIjwIjRMLiio+XWrP2S6Emn2EtuYQTzeG5hG5RIpE+XNFo0dhAdtHhtikHrPf4CjtYZpwSajZWg9Fb2f0//vxSr3jQE2JX/o+tf8f8HzUa78v/3AWX/X7Zam5MTa8TS8OCybJVvGiHY3dXBJZyDYy4RkPCEjkgSol8dEUwblk8dazlHsDKtHzwWjDqLSqxbe2gFf+aw5/6XQ+Lf+iLAzvi/sbr/m83GcbX/7wPq9bpTtgF2okmiJ7jV3qcl/0XhIN35vRB1RuWVCOnNM4MvIuaXSWj8cB07sqdSJLEVuL6wMMrNebp+KJLAWfLfBtVPlaTsi8iPbZQ9tvHtsc22Tx5Kp5OtGCPGScjepyzQQA8zxmOq7W+IeYp9mJlMwz7FxVMS46TR9QHWausjUdSXVKvy822YY0fDssR9IdJectApRj0r/DKim/vjZyFkgKKWlvGGmbIKjUicDtGuhHtkk6PZ3DhFzc7zECUwi9qkjeYSzUZNz9bm9E4b+hdswKX2te5rHGEWvOczuUVBiLVu8PZSh0qG5n6gNSEpicFSNvopyyh3tP97+v8smyap/DeMBHbF/4eHjdX4v9Ws6n/3Aiv3/zau1m+5/PfQ8/P/hj33/zQmt78HvOv896C9cv/P3Ais7v/eC6yUpsw8pzeGAnuEuTAONXSRQvlk/ZyvVcvMBuJqhhiXIuhmyFRusB7lOkN65mzqCnXkvaftyKvDG4TPw6ly7XS5LTU4RZ3XNjJaKvcWn9Ki8Y8//VgU6SLGu2EoZjQoFwD9OLHCFhfzauuSuIuuLuKba3Y5em3LAFa7lQqGpmofCTm/Eeu0y224Zz1XD8UBcPtgMFrURDcdKJn2tUMl07htPSBCGtKWpy1teS4CulQzN6KXkd0F3nKR9KG322cHW+3/NNXuXf8DyK74r33YXr3/1a7qv/cD6YFVeoqZXYXpAE3csS+NhS+WR/Zfnha3Yhe1EK8cYWky7oCNGcwOj0tHXKejc6EvzVVx3PzOIjuGDx8dBzewESJzPR3QMqHXWO51G2ztb7sROctm8ejwOdtpRGrGU9Ucp3SyZJBWjr6QPDZee+KU16ud9TOvDvz7P199EFlBBRVUUEEFFVRQQQUVVFBBBRVUUEEFFXyW8D/KAjV7AFAAAA== values: image: tag: v1.11.0-dev diff --git a/go.mod b/go.mod index 11420f64..ac73d45f 100644 --- a/go.mod +++ b/go.mod @@ -3,25 +3,24 @@ module github.com/gardener/gardener-extension-os-ubuntu go 1.15 require ( - github.com/gardener/gardener v1.15.5 + github.com/gardener/gardener v1.19.0 github.com/gobuffalo/packr v1.30.1 - github.com/gobuffalo/packr/v2 v2.8.0 - github.com/google/go-cmp v0.4.1 // indirect - github.com/onsi/ginkgo v1.14.0 - github.com/onsi/gomega v1.10.1 - github.com/spf13/cobra v0.0.6 - k8s.io/api v0.18.10 - k8s.io/apimachinery v0.18.10 - k8s.io/component-base v0.18.10 - sigs.k8s.io/controller-runtime v0.6.3 + github.com/gobuffalo/packr/v2 v2.8.1 + github.com/onsi/ginkgo v1.14.1 + github.com/onsi/gomega v1.10.5 + github.com/spf13/cobra v1.1.1 + k8s.io/api v0.20.2 + k8s.io/apimachinery v0.20.2 + k8s.io/component-base v0.20.2 + sigs.k8s.io/controller-runtime v0.8.3 ) replace ( - k8s.io/api => k8s.io/api v0.18.10 - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.18.10 - k8s.io/apimachinery => k8s.io/apimachinery v0.18.10 - k8s.io/client-go => k8s.io/client-go v0.18.10 - k8s.io/code-generator => k8s.io/code-generator v0.18.10 - k8s.io/component-base => k8s.io/component-base v0.18.10 + k8s.io/api => k8s.io/api v0.20.2 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.20.2 + k8s.io/apimachinery => k8s.io/apimachinery v0.20.2 + k8s.io/client-go => k8s.io/client-go v0.20.2 + k8s.io/code-generator => k8s.io/code-generator v0.20.2 + k8s.io/component-base => k8s.io/component-base v0.20.2 k8s.io/helm => k8s.io/helm v2.13.1+incompatible ) diff --git a/go.sum b/go.sum index 9eab128a..1a9e056d 100644 --- a/go.sum +++ b/go.sum @@ -6,36 +6,55 @@ cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxK cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v39.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v42.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= github.com/Azure/go-autorest/autorest v0.10.1/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= +github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= @@ -47,70 +66,59 @@ github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuN github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/ahmetb/gen-crd-api-reference-docs v0.1.5 h1:OU+AFpBEhyclrQGx4I6zpCx5WvXiKqvFeeOASOmhKCY= github.com/ahmetb/gen-crd-api-reference-docs v0.1.5/go.mod h1:P/XzJ+c2+khJKNKABcm2biRwk2QAuwbLf8DlXuaL7WM= github.com/ahmetb/gen-crd-api-reference-docs v0.2.0 h1:YI/cAcRdNAHArfhGKcmCY5qMa32k/UyCZagLgabC5JY= github.com/ahmetb/gen-crd-api-reference-docs v0.2.0/go.mod h1:P/XzJ+c2+khJKNKABcm2biRwk2QAuwbLf8DlXuaL7WM= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alessio/shellescape v0.0.0-20190409004728-b115ca0f9053/go.mod h1:xW8sBma2LE3QxFSzCnH9qe6gAE2yO9GvQaWwX89HxbE= github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20180828111155-cad214d7d71f/go.mod h1:T9M45xf79ahXVelWoOBmH0y4aC1t5kXO5BxwyakgIGA= github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190603021944-12ad9f921c0b/go.mod h1:myCDvQSzCW+wB1WAlocEru4wMGJxy+vlxHdhegi1CDQ= github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/appscode/jsonpatch v1.0.1/go.mod h1:4AJxUpXUhv4N+ziTvIcWWXgeorXpxPZOfk9HdEVr96M= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -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/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.13.54/go.mod h1:ZRmQr0FajVIyZ4ZzBYKG5P3ZqPz9IHG41ZoMu1ADI3k= github.com/aws/aws-sdk-go v1.19.41/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.11.4/go.mod h1:ZB+hp7VycxPLpp0aiozQQezat46npDXhzHi1DVtRCn4= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coreos/bbolt v1.3.1-coreos.6/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.15+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.17+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= @@ -139,8 +147,6 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -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/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= @@ -149,10 +155,6 @@ github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5Jflh github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484 h1:pEtiCjIXx3RvGjlUJuCNxNOw0MNblyR9Wi+vJGBFh+8= github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= @@ -162,8 +164,10 @@ github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.6+incompatible h1:tfrHha8zJ01ywiOEC1miGY8st1/igzWB8OmvPgoYX7w= github.com/emicklei/go-restful v2.9.6+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7-0.20200730005029-803dd64f0468/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc= github.com/evanphx/json-patch v4.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -174,8 +178,8 @@ github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQo github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.5.0 h1:Tb4jWdSpdjKzTUicPnY61PZxKbDoGa7ABbrReT3gQVY= github.com/frankban/quicktest v1.5.0/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= @@ -202,8 +206,8 @@ github.com/gardener/gardener v1.1.2/go.mod h1:CP9I0tCDVXTLPkJv/jUtXVUh948kSNKEGU github.com/gardener/gardener v1.3.1/go.mod h1:936P5tQbg6ViiW8BVC9ELM95sFrk4DgobKrxMNtn/LU= github.com/gardener/gardener v1.4.1-0.20200519155656-a8ccc6cc779a/go.mod h1:t9oESM37bAMIuezi9I0H0I8+++8jy8BUPitcf4ERRXY= github.com/gardener/gardener v1.11.3/go.mod h1:5DzqfOm+G8UftKu5zUbYJ+9Cnfd4XrvRNDabkM9AIp4= -github.com/gardener/gardener v1.15.5 h1:ERY4sK5QUH/htE2Dfh/DFa1PXoBoqFjkDuanZBJUHTQ= -github.com/gardener/gardener v1.15.5/go.mod h1:B6mu7i9OusC+k3DFGuiwt99xU7G4IoiwphBRsqr0lC4= +github.com/gardener/gardener v1.19.0 h1:X9s08CmmAyUbWA/Y9RQ0howVJ7kjxZtS2LP90CkoVZQ= +github.com/gardener/gardener v1.19.0/go.mod h1:Y92sGlFnM3XS+sxEcsJydNVsBZPCUSfqq/HY0UIXQgA= github.com/gardener/gardener-resource-manager v0.10.0 h1:6OUKoWI3oha42F0oJN8OEo3UR+D3onOCel4Th+zgotU= github.com/gardener/gardener-resource-manager v0.10.0/go.mod h1:0pKTHOhvU91eQB0EYr/6Ymd7lXc/5Hi8P8tF/gpV0VQ= github.com/gardener/gardener-resource-manager v0.13.1 h1:BiQ0EMO58663UN7lkOXRKV4gt5bEBIk80nxxokAboxc= @@ -221,74 +225,45 @@ github.com/gardener/machine-controller-manager v0.33.0/go.mod h1:jxxE+mGgXwg4iPl github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -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-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-ini/ini v1.36.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.3.0 h1:q4c+kbcR0d5rSurhBR8dIgieOaYpXtsdTYfx22Cu6rs= +github.com/go-logr/logr v0.3.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-logr/zapr v0.1.1 h1:qXBXPDdNncunGs7XeEpsJt8wCjYBygluzfdLO0G5baE= github.com/go-logr/zapr v0.1.1/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= -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.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.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= +github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2 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.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= -github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2 h1:SStNd1jRcYtfKCN7R0laGNs80WYYvn5CbBjM2sOmCrE= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.4/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobuffalo/envy v1.7.0 h1:GlXgaiBkmrYMHco6t4j7SacKO4XUjvh5pwXh0f4uxXU= github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= @@ -307,20 +282,20 @@ github.com/gobuffalo/packr v1.30.1 h1:hu1fuVR3fXEZR7rXNW3h8rqSML8EVAf6KNm0NKO/wK github.com/gobuffalo/packr v1.30.1/go.mod h1:ljMyFO2EcrnzsHsN99cvbq055Y9OhRrIaviy289eRuk= github.com/gobuffalo/packr/v2 v2.5.1 h1:TFOeY2VoGamPjQLiNDT3mn//ytzk236VMO2j7iHxJR4= github.com/gobuffalo/packr/v2 v2.5.1/go.mod h1:8f9c96ITobJlPzI44jj+4tHnEKNt0xXWSVlXRN9X1Iw= -github.com/gobuffalo/packr/v2 v2.8.0 h1:IULGd15bQL59ijXLxEvA5wlMxsmx/ZkQv9T282zNVIY= -github.com/gobuffalo/packr/v2 v2.8.0/go.mod h1:PDk2k3vGevNE3SwVyVRgQCCXETC9SaONCNSXT1Q8M1g= +github.com/gobuffalo/packr/v2 v2.8.1 h1:tkQpju6i3EtMXJ9uoF5GT6kB+LMTimDWD8Xvbz6zDVA= +github.com/gobuffalo/packr/v2 v2.8.1/go.mod h1:c/PLlOuTU+p3SybaJATW3H6lX/iK7xEz5OeMf+NnJpg= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -329,30 +304,39 @@ github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3 h1:GV+pQPG/EUUbkh47niozDcADz6go/dUwhVzdUQHIVRw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4-0.20200731163441-8734ec565a4d h1:izNDUPqGqkeNSYeebPs9caowE15dhr4m59/68323beM= github.com/golang/mock v1.4.4-0.20200731163441-8734ec565a4d/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.5.0 h1:jlYHihg//f7RRwuPfptm04yp4s7O6Kw8EZiVYIGcH0g= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.0.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -362,8 +346,9 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= @@ -373,10 +358,15 @@ github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= @@ -384,19 +374,19 @@ github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTV github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/googleapis/gnostic v0.5.1 h1:A8Yhf6EtqTv9RMsU6MQTyrtV1TjWlR6xU9BsZIwuTCM= +github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/gophercloud/gophercloud v0.0.0-20190212181753-892256c46858/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gophercloud/gophercloud v0.2.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gophercloud/gophercloud v0.6.1-0.20191122030953-d8ac278c1c9d/go.mod h1:ozGNgr9KYOVATV5jsgHl/ceCDXGuguqOZAzoQ/2vcNM= github.com/gophercloud/gophercloud v0.7.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= github.com/gophercloud/utils v0.0.0-20190527093828-25f1b77b8c03/go.mod h1:SZ9FTKibIotDtCrxAU/evccoyu1yhKST6hgBvwTB5Eg= github.com/gophercloud/utils v0.0.0-20200204043447-9864b6f1f12f/go.mod h1:ehWUbLQJPqS0Ep+CxeD559hsm9pthPXadJNKwZkp43w= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20190222133341-cfaf5686ec79/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -407,8 +397,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.3.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpg github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.11.3/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -421,7 +411,6 @@ github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerX github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -442,7 +431,7 @@ github.com/huandu/xstrings v1.3.0 h1:gvV6jG9dTgFEncxo+AF7PH6MZXi/vZl25owA/8Dg8Wo github.com/huandu/xstrings v1.3.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.1 h1:4jgBlKK6tLKFvO8u5pmYjG91cqytmDCDvGh7ECVFfFs= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI= @@ -451,9 +440,10 @@ github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.10 h1:6q5mVkdH/vYmqngx7kZQTjJ5HRsx+ImorDIEQ+beJgc= +github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/infobloxopen/infoblox-go-client v1.1.0/go.mod h1:BXiw7S2b9qJoM8MS40vfgCNB2NLHGusk1DtO16BD9zI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -461,7 +451,6 @@ github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -472,13 +461,14 @@ github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/karrick/godirwalk v1.10.12 h1:BqUm+LuJcXjGv1d2mj3gBiQyrQ57a0rYoAmhvJQ7RDU= github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= -github.com/karrick/godirwalk v1.15.3 h1:0a2pXOgtB16CqIqXTiT7+K9L73f74n/aNQUnH6Ortew= -github.com/karrick/godirwalk v1.15.3/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= +github.com/karrick/godirwalk v1.15.8 h1:7+rWAZPn9zuRxaIqqT8Ohs2Q2Ac0msBqwRdxNCr2VVs= +github.com/karrick/godirwalk v1.15.8/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= @@ -493,18 +483,15 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= 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/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= 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 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= @@ -530,6 +517,8 @@ github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mholt/archiver v3.1.1+incompatible h1:1dCVxuqs0dJseYEhi5pl7MYPH9zDa1wBi7mF09cbNkU= github.com/mholt/archiver v3.1.1+incompatible/go.mod h1:Dh2dOXnSdiLxRiPoVfIr/fI1TwETms9B8CTWfeh7ROU= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= @@ -548,6 +537,7 @@ github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/I github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE= github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -558,28 +548,17 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nwaples/rardecode v1.0.0 h1:r7vGuS5akxOnR4JQSkko62RJ1ReCMXxQRPtxsiFMBOs= github.com/nwaples/rardecode v1.0.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.4.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -588,10 +567,11 @@ github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.14.1 h1:jMU0WaQrP0a/YAEq8eJmJKjBoMs+pClEr1vDMlM/Do4= +github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.3.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -599,26 +579,16 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.10.5 h1:7n6FEkpFmfCoo2t+YYqXH0evK+a9ICQz0xcAy9dYcaQ= +github.com/onsi/gomega v1.10.5/go.mod h1:gza4q3jKQJijlu05nKWRCW/GavJumGt8aNRxWg7mt48= github.com/packethost/packngo v0.0.0-20181217122008-b3b45f1b4979/go.mod h1:otzZQXgoO96RTzDB/Hycg0qZcXZsWJGJRSXbmEIJ+4M= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v0.0.0-20170612153648-e790cca94e6c/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.3.0+incompatible h1:CZzRn4Ut9GbUkHlQ7jqBXeZQV41ZSKWFc302ZU6lUTk= github.com/pierrec/lz4 v2.3.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -627,7 +597,6 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -636,18 +605,15 @@ github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prY github.com/prometheus/client_golang v0.9.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0 h1:BQ53HtBmfOitExawJ6LokA4x8ov/z0SYYb0+HxJfRI8= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.3.0 h1:miYCvYqFXtl/J9FIy8eNpBfYthAEFg+Ys0XyUVEcDsc= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.8.0 h1:zvJNkoCFAnYFNC24FV8nW4JdRJ3GIFcLbg65lL/JDcw= -github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -658,20 +624,17 @@ github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkpEo= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.14.0 h1:RHRyE8UocrbjU+6UvRzwi6HjiDfxrrBU91TtbKzkGp4= -github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURmKE= @@ -684,7 +647,6 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= @@ -698,10 +660,8 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -714,7 +674,6 @@ github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:s github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.3/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -724,6 +683,9 @@ github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v0.0.6 h1:breEStsVwemnKh2/s6gMvSdMEkwW0sK8vGStnlVBMCs= github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -734,9 +696,8 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -748,9 +709,10 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/texttheater/golang-levenshtein v0.0.0-20191208221605-eb6844b05fc6/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= @@ -758,10 +720,8 @@ github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljT github.com/ulikunitz/xz v0.5.6 h1:jGHAfXawEGZQ3blwU5wnWKQJvAraT7Ftq9EXjnXYgt8= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.3/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= -github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= @@ -770,15 +730,13 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1: github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v0.0.0-20181018215023-8dc6146f7569/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= @@ -786,31 +744,38 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.5.1 h1:rsqfU5vBkVknbhUGbAUwQKR2H4ItV8tjJ+6kJX4cxHM= go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v0.0.0-20180122172545-ddea229ff1df/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0 h1:f3WCSC2KzAcBXGATIxAB1E2XuCpNU255wNKZ505qi3E= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v0.0.0-20180814183419-67bc79d13d15/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0 h1:nR6NoDBgAf67s68NhaXbsojM+2gxp3S1hWkHDl27pVU= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.15.0 h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM= +go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/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-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -824,12 +789,23 @@ golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947 golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587 h1:5Uz0rkjCFu9BC9gCRN7EkwVvhNyQgGWb8KNJrPwBoHY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -841,6 +817,7 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f h1:J5lckAjkw6qYlOZNj90mLYNTEKDvWeuc1yieZ8qUzUE= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= @@ -848,6 +825,7 @@ golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCc golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= @@ -857,16 +835,13 @@ golang.org/x/net v0.0.0-20180112015858-5ccada7d0a7b/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-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-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-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-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -883,19 +858,26 @@ golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933 h1:e6HwijUxhDe+hPNjZQQn9bA5P golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 h1:efeOvDhwQ29Dj3SdAV/MJf8oukgn+8D8WgaCaRMchF8= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 h1:AeiKBIuRw3UomYXSbLy0Mc2dDLfdtbT/IVn4keq83P0= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb h1:eBmm0M9fYhWpKZLjQUUKka/LtIxf46G4fxeEz5KJr9U= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -912,13 +894,11 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/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= golang.org/x/sys v0.0.0-20190429190828-d89cdac9e872/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -932,18 +912,24 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 h1:ZBzSG/7F4eNKz2L3GE9o300RX0Az1Bw5HF7PDraD+qU= golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8 h1:JA8d3MPx/IToSyXZG/RhwYEtfrKO1Fxrqe8KrkiLXKM= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d h1:62ap6LNOjDU6uGmKXHJbSfciMoV+FeI1sRXx/pLDL44= golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= @@ -951,9 +937,9 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7NkNAQs+6Q8b9WEB/F4= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211 h1:9UQO31fZ+0aKQOFldThf7BKPMJTiBfWycGh/u3UoO88= -golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -963,19 +949,23 @@ golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190213192042-740235f6c0d8/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -988,9 +978,9 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -998,70 +988,115 @@ golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191127201027-ecd32218bd7f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191203134012-c197fd4bf371 h1:Cjq6sG3gnKDchzWy7ouGQklhxMtWvh4AhSNJ0qGIeo4= golang.org/x/tools v0.0.0-20191203134012-c197fd4bf371/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191230220329-2aa90c603ae3 h1:2+KluhQfJ1YhW+TB1KrISS2SfiG1pLEoseB0D4VF/bo= golang.org/x/tools v0.0.0-20191230220329-2aa90c603ae3/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200308013534-11ec41452d41/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200408032209-46bd65c8538f h1:rsqLea9h7rgdpXI+GnnbQkptKSzOybXLjn3gqcL2XZ0= golang.org/x/tools v0.0.0-20200408032209-46bd65c8538f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200422205258-72e4a01eba43 h1:Lcsc5ErIWemp8qAbYffG5vPrqjJ0zk82RTFGifeS1Pc= golang.org/x/tools v0.0.0-20200422205258-72e4a01eba43/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5 h1:UaoXseXAWUJUcuJ2E2oczJdLxAJXL0lOmVaBl7kuk+I= +golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +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= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1071,7 +1106,6 @@ gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -1081,7 +1115,6 @@ gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.0.0/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1097,20 +1130,31 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2 h1:XZx7nhd5GMaZpmDaEHFVafUZC7ya0fuo7cSJ3UCKYmM= gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -k8s.io/api v0.18.10 h1:M0/vqfuBAIIS7jsOOcosT0niiotZGqw6/zHTFpyi8iQ= -k8s.io/api v0.18.10/go.mod h1:xWtwPX1v47j5RTncmlMFGCx8b0avh+nP8OgZZ9hjo3M= -k8s.io/apiextensions-apiserver v0.18.10 h1:NDp1wS1mnN6ync6onO0oVWMymTYK/ZoyFj3D0YHVzAk= -k8s.io/apiextensions-apiserver v0.18.10/go.mod h1:XOE93YaGrb8Pa+ro00Jx3fhzRJ7UB0bU37jRTQXpTOM= -k8s.io/apimachinery v0.18.10 h1:Zupk3lPrUfhCF9puTpA8EvEfPsrhNZtrpOqdp66mKVs= -k8s.io/apimachinery v0.18.10/go.mod h1:PF5taHbXgTEJLU+xMypMmYTXTWPJ5LaW8bfsisxnEXk= +honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +istio.io/api v0.0.0-20201123152548-197f11e4ea09 h1:+3Q/a15sTRDAYN66nM+bqCDF1MsynIEpWm9CKPdPOPg= +istio.io/api v0.0.0-20201123152548-197f11e4ea09/go.mod h1:88HN3o1fSD1jo+Z1WTLlJfMm9biopur6Ct9BFKjiB64= +istio.io/client-go v1.8.1 h1:gIeAQBgXkyUuvQ5LUtvxIY5TdFuaCLZqXgxF3bigKww= +istio.io/client-go v1.8.1/go.mod h1:Qymv71lwIqjDTkaE2NqBYLL+Bl5KsCfzEDhntXypHYY= +istio.io/gogo-genproto v0.0.0-20190930162913-45029607206a h1:w7zILua2dnYo9CxImhpNW4NE/8ZxEoc/wfBfHrhUhrE= +istio.io/gogo-genproto v0.0.0-20190930162913-45029607206a/go.mod h1:OzpAts7jljZceG4Vqi5/zXy/pOg1b209T3jb7Nv5wIs= +k8s.io/api v0.20.2 h1:y/HR22XDZY3pniu9hIFDLpUCPq2w5eQ6aV/VFQ7uJMw= +k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= +k8s.io/apiextensions-apiserver v0.20.2 h1:rfrMWQ87lhd8EzQWRnbQ4gXrniL/yTRBgYH1x1+BLlo= +k8s.io/apiextensions-apiserver v0.20.2/go.mod h1:F6TXp389Xntt+LUq3vw6HFOLttPa0V8821ogLGwb6Zs= +k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= +k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apiserver v0.0.0-20190918160949-bfa5e2e684ad h1:IMoNR9pilTBaCS5WpwWnAdmoVYVeXowOD3bLrwxIAtQ= k8s.io/apiserver v0.0.0-20190918160949-bfa5e2e684ad/go.mod h1:XPCXEwhjaFN29a8NldXA901ElnKeKLrLtREO9ZhFyhg= k8s.io/apiserver v0.0.0-20191010014313-3893be10d307/go.mod h1:6bqaTSOSJavUIXUtfaR9Os9JtTCm8ZqH2SUl2S60C4w= @@ -1120,27 +1164,30 @@ k8s.io/apiserver v0.18.8 h1:Au4kMn8sb1zFdyKqc8iMHLsYLxRI6Y+iAhRNKKQtlBY= k8s.io/apiserver v0.18.8/go.mod h1:12u5FuGql8Cc497ORNj79rhPdiXQC4bf53X/skR/1YM= k8s.io/apiserver v0.18.10 h1:wFA61pz7st1WLi96aDqr3nr6o/frkBdfRa60tpkMdRs= k8s.io/apiserver v0.18.10/go.mod h1:N4FaJo9BeSgmtvVByXi4fPSQPRqhvvLMGqswwkddob8= +k8s.io/apiserver v0.20.2 h1:lGno2t3gcZnLtzsKH4oG0xA9/4GTiBzMO1DGp+K+Bak= +k8s.io/apiserver v0.20.2/go.mod h1:2nKd93WyMhZx4Hp3RfgH2K5PhwyTrprrkWYnI7id7jA= k8s.io/autoscaler v0.0.0-20190805135949-100e91ba756e h1:5AX59ZgftHpbmNupSWosdtW4q/rCnF4s/0J0dEfJkAQ= k8s.io/autoscaler v0.0.0-20190805135949-100e91ba756e/go.mod h1:QEXezc9uKPT91dwqhSJq3GNI3B1HxFRQHiku9kmrsSA= -k8s.io/client-go v0.18.10 h1:fETWvjTtnE3/s+h0SYr2wvlKWFDF+NrhwAL/ddqVa2Q= -k8s.io/client-go v0.18.10/go.mod h1:XBkFAqPrzqfwmGkV5ac+mlgBpWcz5TkhLw2808q8C3c= +k8s.io/client-go v0.20.2 h1:uuf+iIAbfnCSw8IGAv/Rg0giM+2bOzHLOsbbrwrdhNQ= +k8s.io/client-go v0.20.2/go.mod h1:kH5brqWqp7HDxUFKoEgiI4v8G1xzbe9giaCenUWJzgE= k8s.io/cluster-bootstrap v0.0.0-20190918163108-da9fdfce26bb/go.mod h1:mQVbtFRxlw/BzBqBaQwIMzjDTST1KrGtzWaR4CGlsTU= k8s.io/cluster-bootstrap v0.16.8 h1:94hV4G7aSIkNCX2G1Jk8URz8zLermBbrrwNre2Y8S9w= k8s.io/cluster-bootstrap v0.16.8/go.mod h1:fT1U/qWmXNmIColCsCBg4G881nWFaEqONL0xmP48rkI= k8s.io/cluster-bootstrap v0.18.8 h1:+gkx/sfGBtokxvRbVA5nVA8bPy1YvpDYRiGRqyEtSXc= k8s.io/cluster-bootstrap v0.18.8/go.mod h1:guq0Uc+QwazHgpS1yAw5Z7yUlBCtGppbgWQkbN3lxIY= -k8s.io/cluster-bootstrap v0.18.10 h1:M1fNZOg+GwCZ6axP3j/FKv0o/tOIjL0uYOWesQUjUoo= -k8s.io/cluster-bootstrap v0.18.10/go.mod h1:HTuFGIjxRohQP0IrigLxVtxL+ruDVo/ookmfs608WqQ= -k8s.io/code-generator v0.18.10 h1:54UFw4V1/D2y3rfr52zNw4ECSD5Z9snwFXkXxkvmyvE= -k8s.io/code-generator v0.18.10/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= -k8s.io/component-base v0.18.10 h1:WDjiLor7EbUKKuK61QjiPqL5RMNJ9oEY6+LRtLC87xM= -k8s.io/component-base v0.18.10/go.mod h1:ZzFXjzUBHKOcF0mnWkxBI1wDu5t+CV3GxXKKvHZBLf0= +k8s.io/cluster-bootstrap v0.20.2 h1:fuZH5boornwWn8+ejecZs1QK0Js7GhzwObMY3jrvpSE= +k8s.io/cluster-bootstrap v0.20.2/go.mod h1:2vQbXkXcZN1N6SnBlWBctKjARH9vj+Uzo4DPgzUJdqw= +k8s.io/code-generator v0.20.2 h1:SQaysped4EtUDk3u1zphnUJiOAwFdhHx9xS3WKAE0x8= +k8s.io/code-generator v0.20.2/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= +k8s.io/component-base v0.20.2 h1:LMmu5I0pLtwjpp5009KLuMGFqSc2S2isGw8t1hpYKLE= +k8s.io/component-base v0.20.2/go.mod h1:pzFtCiwe/ASD0iV7ySMu8SYVJjCapNM9bjvk7ptpKh0= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20190826232639-a874a240740c h1:HH5z+xQGPLMQ2MlS+UVaOaSFgaEqGw1Zb007B9yjZEY= k8s.io/gengo v0.0.0-20190826232639-a874a240740c/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac h1:sAvhNk5RRuc6FNYGqe7Ygz3PSo/2wGWbulskmzRX8Vs= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20201113003025-83324d819ded h1:JApXBKYyB7l9xx+DK7/+mFjC7A9Bt5A93FPvFD0HIFE= +k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/helm v2.13.1+incompatible h1:qt0LBsHQ7uxCtS3F2r3XI0DNm8ml0xQeSJixUorDyn0= k8s.io/helm v2.13.1+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -1151,6 +1198,9 @@ k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0 h1:Foj74zO6RbjjP4hBEKjnYtjjAhGg4jNynUdYF6fJrok= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-aggregator v0.0.0-20191004104030-d9d5f0cc7532/go.mod h1:8sbzT4QQKDEmSCIbfqjV0sd97GpUT7A4W626sBiYJmU= k8s.io/kube-aggregator v0.16.8 h1:Z7+kBXA5V/SKINY9W7QBvZn/Orf5jwPAcW4cPJnNxFA= k8s.io/kube-aggregator v0.16.8/go.mod h1:l73g+bVdjrgDz9nrISk6AgupGbv1n+4WjTbGaXz/YvI= @@ -1158,6 +1208,8 @@ k8s.io/kube-aggregator v0.18.8 h1:8VQxblQqRInpJ+DS2aGgbdWq6xP8UG/jzV6v8cFccOc= k8s.io/kube-aggregator v0.18.8/go.mod h1:CyLoGZB+io8eEwnn+6RbV7QWJQhj8a3TBH8ZM8sLbhI= k8s.io/kube-aggregator v0.18.10 h1:dEq7kt0hM0JLZK+NYeUDjmuPRWTBCct+2biXD4aJsE8= k8s.io/kube-aggregator v0.18.10/go.mod h1:4hDj1WpnMJTXhMlDHf14zB0B/hrFCY6dBN0ZHQNqiyQ= +k8s.io/kube-aggregator v0.20.2 h1:fzc2Re7AwGDn54mntt2g6n8qkfPUbcvF+kY2VGNHWIQ= +k8s.io/kube-aggregator v0.20.2/go.mod h1:j7ks4pWm6cjXzlVZB9tewvUdg2njjbiFuHp575ZKnqc= k8s.io/kube-openapi v0.0.0-20180731170545-e3762e86a74c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a h1:UcxjrRMyNx/i/y8G7kPvLyy7rfbeuf1PYyBf973pgyU= @@ -1165,15 +1217,17 @@ k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKf k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29 h1:NeQXVJ2XFSkRoPzRo8AId01ZER+j8oV4SZADT4iBOXQ= k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kubelet v0.16.8/go.mod h1:mzDpnryQg2dlB6V3/WAgb1baIamiICtWpXMFrPOFh6I= k8s.io/kubelet v0.18.8/go.mod h1:6z1jHCk0NPE6WshFStfqcgQ1bnD3tetcPmhC2915aio= -k8s.io/kubelet v0.18.10/go.mod h1:u0wQ2njU/1fcyI/EChi9wAA0WJmgCwA8t6y45CsI+hE= +k8s.io/kubelet v0.20.2/go.mod h1:i441hnZtH2wUiDNqpXVZYaNCqEOBd2sM7x2mV0n7dJs= k8s.io/metrics v0.0.0-20191004105854-2e8cf7d0888c h1:qkfVb8PX30hnQXqRj6rxnMtd9GagB/e8r6E+bS651CU= k8s.io/metrics v0.0.0-20191004105854-2e8cf7d0888c/go.mod h1:a25VAbm3QT3xiVl1jtoF1ueAKQM149UdZ+L93ePfV3M= k8s.io/metrics v0.16.8 h1:VHYjoncB4WjvizvQ36vQ2kga4jo7+hLhJIYi60JGru0= k8s.io/metrics v0.16.8/go.mod h1:uBIJKJKdga8vL76a1dl+eRlUqOAdCbBpvFHC28SbUIY= k8s.io/metrics v0.18.8/go.mod h1:j7JzZdiyhLP2BsJm/Fzjs+j5Lb1Y7TySjhPWqBPwRXA= -k8s.io/metrics v0.18.10/go.mod h1:7FQ0/pv0J15/kp8s8WvaeU6tz6jzAKk+xh1eHGwiaW8= +k8s.io/metrics v0.20.2/go.mod h1:yTck5nl5wt/lIeLcU6g0b8/AKJf2girwe0PQiaM4Mwk= k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20190801114015-581e00157fb1 h1:+ySTxfHnfzZb9ys375PXNlLhkJPLKgHajBU0N62BDvE= k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= @@ -1185,20 +1239,27 @@ k8s.io/utils v0.0.0-20200327001022-6496210b90e8/go.mod h1:sZAwmy6armz5eXlNoLmJcl k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20200619165400-6e3d28b6ed19 h1:7Nu2dTj82c6IaWvL7hImJzcXoTPz1MsSCH7r+0m6rfo= k8s.io/utils v0.0.0-20200619165400-6e3d28b6ed19/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= +k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/controller-runtime v0.2.0-beta.5/go.mod h1:HweyYKQ8fBuzdu2bdaeBJvsFgAi/OqBBnrVGXcqKhME= sigs.k8s.io/controller-runtime v0.4.0 h1:wATM6/m+3w8lj8FXNaO6Fs/rq/vqoOjO1Q116Z9NPsg= sigs.k8s.io/controller-runtime v0.4.0/go.mod h1:ApC79lpY3PHW9xj/w9pj+lYkLgwAAUZwfXkME1Lajns= sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= sigs.k8s.io/controller-runtime v0.6.3/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= +sigs.k8s.io/controller-runtime v0.8.3 h1:GMHvzjTmaWHQB8HadW+dIvBoJuLvZObYJ5YoZruPRao= +sigs.k8s.io/controller-runtime v0.8.3/go.mod h1:U/l+DUopBc1ecfRZ5aviA9JDmGFQKvLf5YkZNx2e0sU= sigs.k8s.io/controller-tools v0.2.0-beta.4/go.mod h1:8t/X+FVWvk6TaBcsa+UKUBbn7GMtvyBKX30SGl4em6Y= sigs.k8s.io/controller-tools v0.2.4/go.mod h1:m/ztfQNocGYBgTTCmFdnK94uVvgxeZeE3LtJvd/jIzA= sigs.k8s.io/controller-tools v0.2.9/go.mod h1:ArP7w60JQKkZf7UU2oWTVnEhoNGA+sOMyuSuS+JFNDQ= -sigs.k8s.io/controller-tools v0.3.0 h1:y3YD99XOyWaXkiF1kd41uRvfp/64teWcrEZFuHxPhJ4= -sigs.k8s.io/controller-tools v0.3.0/go.mod h1:enhtKGfxZD1GFEoMgP8Fdbu+uKQ/cq1/WGJhdVChfvI= +sigs.k8s.io/controller-tools v0.4.1 h1:VkuV0MxlRPmRu5iTgBZU4UxUX2LiR99n3sdQGRxZF4w= +sigs.k8s.io/controller-tools v0.4.1/go.mod h1:G9rHdZMVlBDocIxGkK3jHLWqcTMNvveypYJwrvYKjWU= sigs.k8s.io/kind v0.7.0/go.mod h1:An/AbWHT6pA/Lm0Og8j3ukGhfJP3RiVN/IBU6Lo3zl8= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff v0.0.0-20190817042607-6149e4549fca/go.mod h1:IIgPezJWb76P0hotTxzDbWsMYB8APh18qZnxkomBpxA= @@ -1208,6 +1269,8 @@ sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7m sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U= sigs.k8s.io/testing_frameworks v0.1.2 h1:vK0+tvjF0BZ/RYFeZ1E6BYBwHJJXhjuZ3TdsEKH+UQM= sigs.k8s.io/testing_frameworks v0.1.2/go.mod h1:ToQrwSC3s8Xf/lADdZp3Mktcql9CG0UAmdJG9th5i0w= @@ -1215,4 +1278,3 @@ sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/hack/update-github-templates.sh b/hack/update-github-templates.sh index 87f411c8..4fbf5719 100755 --- a/hack/update-github-templates.sh +++ b/hack/update-github-templates.sh @@ -26,6 +26,7 @@ for file in `find "$(dirname $0)"/../vendor/github.com/gardener/gardener/.github sed 's/to the Gardener project/for this extension/g' |\ sed 's/to Gardener/to this extension/g' |\ sed 's/- Gardener version:/- Gardener version (if relevant):\n- Extension version:/g' |\ - sed 's/\/priority normal/\/priority normal\n\/os ubuntu/g' \ + sed 's/\/priority 3/\/priority 3\n\/os ubuntu/g' |\ + sed 's/\/kind TODO/\/kind TODO\n\/os ubuntu/g' \ > "$(dirname $0)/../.github/${file#*.github/}" done diff --git a/vendor/github.com/gardener/gardener/.github/ISSUE_TEMPLATE/bug.md b/vendor/github.com/gardener/gardener/.github/ISSUE_TEMPLATE/bug.md index 3be75856..80e9dd96 100644 --- a/vendor/github.com/gardener/gardener/.github/ISSUE_TEMPLATE/bug.md +++ b/vendor/github.com/gardener/gardener/.github/ISSUE_TEMPLATE/bug.md @@ -16,11 +16,11 @@ If multiple identifiers make sense you can also state the commands multiple time "/area" identifiers: audit-logging|auto-scaling|backup|certification|control-plane-migration|control-plane|cost|delivery|dev-productivity|disaster-recovery|documentation|high-availability|logging|metering|monitoring|networking|open-source|operations|ops-productivity|os|performance|quality|robustness|scalability|security|storage|testing|usability|user-management "/kind" identifiers: api-change|bug|cleanup|discussion|enhancement|epic|impediment|poc|post-mortem|question|regression|task|technical-debt|test -"/priority" identifiers: normal|critical|blocker +"/priority" identifiers: 1|2|3|4|5 (ordered from greatest to least) --> /area TODO /kind bug -/priority normal +/priority 3 **What happened**: diff --git a/vendor/github.com/gardener/gardener/.github/ISSUE_TEMPLATE/feature.md b/vendor/github.com/gardener/gardener/.github/ISSUE_TEMPLATE/feature.md index 1dcd7a6e..e2549da8 100644 --- a/vendor/github.com/gardener/gardener/.github/ISSUE_TEMPLATE/feature.md +++ b/vendor/github.com/gardener/gardener/.github/ISSUE_TEMPLATE/feature.md @@ -16,11 +16,11 @@ If multiple identifiers make sense you can also state the commands multiple time "/area" identifiers: audit-logging|auto-scaling|backup|certification|control-plane-migration|control-plane|cost|delivery|dev-productivity|disaster-recovery|documentation|high-availability|logging|metering|monitoring|networking|open-source|operations|ops-productivity|os|performance|quality|robustness|scalability|security|storage|testing|usability|user-management "/kind" identifiers: api-change|bug|cleanup|discussion|enhancement|epic|impediment|poc|post-mortem|question|regression|task|technical-debt|test -"/priority" identifiers: normal|critical|blocker +"/priority" identifiers: 1|2|3|4|5 (ordered from greatest to least) --> /area TODO /kind enhancement -/priority normal +/priority 3 **What would you like to be added**: diff --git a/vendor/github.com/gardener/gardener/.github/ISSUE_TEMPLATE/flaking-test.md b/vendor/github.com/gardener/gardener/.github/ISSUE_TEMPLATE/flaking-test.md index 108e4a8f..d94bfdfd 100644 --- a/vendor/github.com/gardener/gardener/.github/ISSUE_TEMPLATE/flaking-test.md +++ b/vendor/github.com/gardener/gardener/.github/ISSUE_TEMPLATE/flaking-test.md @@ -19,11 +19,11 @@ If multiple identifiers make sense you can also state the commands multiple time "/area" identifiers: audit-logging|auto-scaling|backup|certification|control-plane-migration|control-plane|cost|delivery|dev-productivity|disaster-recovery|documentation|high-availability|logging|metering|monitoring|networking|open-source|operations|ops-productivity|os|performance|quality|robustness|scalability|security|storage|testing|usability|user-management "/kind" identifiers: api-change|bug|cleanup|discussion|enhancement|epic|impediment|poc|post-mortem|question|regression|task|technical-debt|test -"/priority" identifiers: normal|critical|blocker +"/priority" identifiers: 1|2|3|4|5 (ordered from greatest to least) --> /area testing /kind flake -/priority normal +/priority 3 **Which test(s)/suite(s) are flaking**: diff --git a/vendor/github.com/gardener/gardener/.github/pull_request_template.md b/vendor/github.com/gardener/gardener/.github/pull_request_template.md index 66a8b1be..a9cf9182 100644 --- a/vendor/github.com/gardener/gardener/.github/pull_request_template.md +++ b/vendor/github.com/gardener/gardener/.github/pull_request_template.md @@ -9,13 +9,11 @@ If multiple identifiers make sense you can also state the commands multiple time "/area" identifiers: audit-logging|auto-scaling|backup|certification|control-plane-migration|control-plane|cost|delivery|dev-productivity|disaster-recovery|documentation|high-availability|logging|metering|monitoring|networking|open-source|ops-productivity|os|performance|quality|robustness|scalability|security|storage|testing|usability|user-management "/kind" identifiers: api-change|bug|cleanup|discussion|enhancement|epic|impediment|poc|post-mortem|question|regression|task|technical-debt|test -"/priority" identifiers: normal|critical|blocker For Gardener Enhancement Proposals (GEPs), please check the following [documentation](https://github.com/gardener/gardener/tree/master/docs/proposals/README.md) before submitting this pull request. --> /area TODO /kind TODO -/priority normal **What this PR does / why we need it**: diff --git a/vendor/github.com/gardener/gardener/extensions/pkg/controller/cmd/options.go b/vendor/github.com/gardener/gardener/extensions/pkg/controller/cmd/options.go index ca216f55..ea58d7ba 100644 --- a/vendor/github.com/gardener/gardener/extensions/pkg/controller/cmd/options.go +++ b/vendor/github.com/gardener/gardener/extensions/pkg/controller/cmd/options.go @@ -18,19 +18,23 @@ import ( "fmt" "os" - extensionscontroller "github.com/gardener/gardener/extensions/pkg/controller" - "github.com/spf13/pflag" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" + "k8s.io/client-go/tools/leaderelection/resourcelock" "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/manager" + + extensionscontroller "github.com/gardener/gardener/extensions/pkg/controller" ) const ( // LeaderElectionFlag is the name of the command line flag to specify whether to do leader election or not. LeaderElectionFlag = "leader-election" + // LeaderElectionResourceLockFlag is the name of the command line flag to specify the resource type used for leader + // election. + LeaderElectionResourceLockFlag = "leader-election-resource-lock" // LeaderElectionIDFlag is the name of the command line flag to specify the leader election ID. LeaderElectionIDFlag = "leader-election-id" // LeaderElectionNamespaceFlag is the name of the command line flag to specify the leader election namespace. @@ -146,6 +150,20 @@ func (b *OptionAggregator) Complete() error { type ManagerOptions struct { // LeaderElection is whether leader election is turned on or not. LeaderElection bool + // LeaderElectionResourceLock is the resource type used for leader election (defaults to `configmapsleases`). + // + // When changing the default resource lock, please make sure to migrate via multilocks to + // avoid situations where multiple running instances of your controller have each acquired leadership + // through different resource locks (e.g. during upgrades) and thus act on the same resources concurrently. + // For example, if you want to migrate to the "leases" resource lock, you might do so by migrating + // to the respective multilock first ("configmapsleases" or "endpointsleases"), which will acquire + // a leader lock on both resources. After one release with the multilock as a default, you can + // go ahead and migrate to "leases". Please also keep in mind, that users might skip versions + // of your controller, so at least add a flashy release note when changing the default lock. + // + // Note: before controller-runtime version v0.7, the resource lock was set to "configmaps". + // Please keep this in mind, when planning a proper migration path for your controller. + LeaderElectionResourceLock string // LeaderElectionID is the id to do leader election with. LeaderElectionID string // LeaderElectionNamespace is the namespace to do leader election in. @@ -162,7 +180,18 @@ type ManagerOptions struct { // AddFlags implements Flagger.AddFlags. func (m *ManagerOptions) AddFlags(fs *pflag.FlagSet) { + defaultLeaderElectionResourceLock := m.LeaderElectionResourceLock + if defaultLeaderElectionResourceLock == "" { + // explicitly default to configmapleases if no default is specified for migration purposes + // same as in controller-runtime, see + // https://github.com/kubernetes-sigs/controller-runtime/blob/a763c9a36c6f18660799384c9765348942bda53a/pkg/leaderelection/leader_election.go#L59-L64 + // we might consider changing this default after many releases + defaultLeaderElectionResourceLock = resourcelock.ConfigMapsLeasesResourceLock + } + fs.BoolVar(&m.LeaderElection, LeaderElectionFlag, m.LeaderElection, "Whether to use leader election or not when running this controller manager.") + fs.StringVar(&m.LeaderElectionResourceLock, LeaderElectionResourceLockFlag, defaultLeaderElectionResourceLock, "Which resource type to use for leader election. "+ + "Supported options are 'endpoints', 'configmaps', 'leases', 'endpointsleases' and 'configmapsleases'.") fs.StringVar(&m.LeaderElectionID, LeaderElectionIDFlag, m.LeaderElectionID, "The leader election id to use.") fs.StringVar(&m.LeaderElectionNamespace, LeaderElectionNamespaceFlag, m.LeaderElectionNamespace, "The namespace to do leader election in.") fs.StringVar(&m.WebhookServerHost, WebhookServerHostFlag, m.WebhookServerHost, "The webhook server host.") @@ -172,7 +201,7 @@ func (m *ManagerOptions) AddFlags(fs *pflag.FlagSet) { // Complete implements Completer.Complete. func (m *ManagerOptions) Complete() error { - m.config = &ManagerConfig{m.LeaderElection, m.LeaderElectionID, m.LeaderElectionNamespace, m.WebhookServerHost, m.WebhookServerPort, m.WebhookCertDir} + m.config = &ManagerConfig{m.LeaderElection, m.LeaderElectionResourceLock, m.LeaderElectionID, m.LeaderElectionNamespace, m.WebhookServerHost, m.WebhookServerPort, m.WebhookCertDir} return nil } @@ -185,6 +214,8 @@ func (m *ManagerOptions) Completed() *ManagerConfig { type ManagerConfig struct { // LeaderElection is whether leader election is turned on or not. LeaderElection bool + // LeaderElectionResourceLock is the resource type used for leader election. + LeaderElectionResourceLock string // LeaderElectionID is the id to do leader election with. LeaderElectionID string // LeaderElectionNamespace is the namespace to do leader election in. @@ -200,6 +231,7 @@ type ManagerConfig struct { // Apply sets the values of this ManagerConfig in the given manager.Options. func (c *ManagerConfig) Apply(opts *manager.Options) { opts.LeaderElection = c.LeaderElection + opts.LeaderElectionResourceLock = c.LeaderElectionResourceLock opts.LeaderElectionID = c.LeaderElectionID opts.LeaderElectionNamespace = c.LeaderElectionNamespace opts.Host = c.WebhookServerHost diff --git a/vendor/github.com/gardener/gardener/extensions/pkg/controller/log.go b/vendor/github.com/gardener/gardener/extensions/pkg/controller/log.go index fb8593c1..18a55903 100644 --- a/vendor/github.com/gardener/gardener/extensions/pkg/controller/log.go +++ b/vendor/github.com/gardener/gardener/extensions/pkg/controller/log.go @@ -18,8 +18,7 @@ import ( "fmt" "github.com/go-logr/logr" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/event" ) @@ -61,54 +60,36 @@ func PrefixLogValues(prefix string, logValues []interface{}) []interface{} { return out } -func eventObjectLogValues(meta metav1.Object, obj runtime.Object) []interface{} { - var values []interface{} - if meta != nil { - values = append(values, MetaObjectLogValues(meta)...) - } - if obj != nil { - values = append(values, RuntimeObjectLogValues(obj)...) - } - return values -} - // CreateEventLogValues extracts the log values from the given CreateEvent. func CreateEventLogValues(event event.CreateEvent) []interface{} { - return eventObjectLogValues(event.Meta, event.Object) + return ObjectLogValues(event.Object) } // DeleteEventLogValues extracts the log values from the given DeleteEvent. func DeleteEventLogValues(event event.DeleteEvent) []interface{} { - return append(eventObjectLogValues(event.Meta, event.Object), "delete-state-unknown", event.DeleteStateUnknown) + return append(ObjectLogValues(event.Object), "delete-state-unknown", event.DeleteStateUnknown) } // GenericEventLogValues extracts the log values from the given GenericEvent. func GenericEventLogValues(event event.GenericEvent) []interface{} { - return eventObjectLogValues(event.Meta, event.Object) + return ObjectLogValues(event.Object) } // UpdateEventLogValues extracts the log values from the given UpdateEvent. func UpdateEventLogValues(event event.UpdateEvent) []interface{} { var values []interface{} - values = append(values, PrefixLogValues("old", eventObjectLogValues(event.MetaOld, event.ObjectOld))...) - values = append(values, PrefixLogValues("new", eventObjectLogValues(event.MetaNew, event.ObjectNew))...) + values = append(values, PrefixLogValues("old", ObjectLogValues(event.ObjectOld))...) + values = append(values, PrefixLogValues("new", ObjectLogValues(event.ObjectNew))...) return values } -// MetaObjectLogValues extracts the log values from the given metav1.Object. -func MetaObjectLogValues(obj metav1.Object) []interface{} { +// ObjectLogValues extracts the log values from the given client.Object. +func ObjectLogValues(obj client.Object) []interface{} { values := []interface{}{"meta.name", obj.GetName()} if namespace := obj.GetNamespace(); namespace != "" { values = append(values, "meta.namespace", namespace) } - return values -} - -// RuntimeObjectLogValues extracts the log values from the given runtime.Object. -func RuntimeObjectLogValues(obj runtime.Object) []interface{} { apiVersion, kind := obj.GetObjectKind().GroupVersionKind().ToAPIVersionAndKind() - return []interface{}{ - "object.apiVersion", apiVersion, - "object.kind", kind, - } + values = append(values, "object.apiVersion", apiVersion, "object.kind", kind) + return values } diff --git a/vendor/github.com/gardener/gardener/extensions/pkg/controller/operatingsystemconfig/reconciler.go b/vendor/github.com/gardener/gardener/extensions/pkg/controller/operatingsystemconfig/reconciler.go index f9f5a40b..d8c1572d 100644 --- a/vendor/github.com/gardener/gardener/extensions/pkg/controller/operatingsystemconfig/reconciler.go +++ b/vendor/github.com/gardener/gardener/extensions/pkg/controller/operatingsystemconfig/reconciler.go @@ -18,13 +18,6 @@ import ( "context" "fmt" - extensionscontroller "github.com/gardener/gardener/extensions/pkg/controller" - gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" - v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" - gardencorev1beta1helper "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" - extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" - contextutil "github.com/gardener/gardener/pkg/utils/context" - "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -35,6 +28,13 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/controller-runtime/pkg/runtime/inject" + + extensionscontroller "github.com/gardener/gardener/extensions/pkg/controller" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" + gardencorev1beta1helper "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" + extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" + "github.com/gardener/gardener/pkg/controllerutils" ) // reconciler reconciles OperatingSystemConfig resources of Gardener's `extensions.gardener.cloud` @@ -43,20 +43,21 @@ type reconciler struct { logger logr.Logger actuator Actuator - ctx context.Context client client.Client + reader client.Reader scheme *runtime.Scheme } -var _ reconcile.Reconciler = &reconciler{} - // NewReconciler creates a new reconcile.Reconciler that reconciles // OperatingSystemConfig resources of Gardener's `extensions.gardener.cloud` API group. func NewReconciler(actuator Actuator) reconcile.Reconciler { logger := log.Log.WithName(name) return extensionscontroller.OperationAnnotationWrapper( - &extensionsv1alpha1.OperatingSystemConfig{}, - &reconciler{logger: logger, actuator: actuator}, + func() client.Object { return &extensionsv1alpha1.OperatingSystemConfig{} }, + &reconciler{ + logger: logger, + actuator: actuator, + }, ) } @@ -71,29 +72,28 @@ func (r *reconciler) InjectClient(client client.Client) error { return nil } -func (r *reconciler) InjectScheme(scheme *runtime.Scheme) error { - r.scheme = scheme +func (r *reconciler) InjectAPIReader(reader client.Reader) error { + r.reader = reader return nil } -// InjectStopChannel is an implementation for getting the respective stop channel managed by the controller-runtime. -func (r *reconciler) InjectStopChannel(stopCh <-chan struct{}) error { - r.ctx = contextutil.FromStopChannel(stopCh) +func (r *reconciler) InjectScheme(scheme *runtime.Scheme) error { + r.scheme = scheme return nil } // Reconcile is the reconciler function that gets executed in case there are new events for the `OperatingSystemConfig` // resources. -func (r *reconciler) Reconcile(request reconcile.Request) (reconcile.Result, error) { +func (r *reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error) { osc := &extensionsv1alpha1.OperatingSystemConfig{} - if err := r.client.Get(r.ctx, request.NamespacedName, osc); err != nil { + if err := r.client.Get(ctx, request.NamespacedName, osc); err != nil { if apierrors.IsNotFound(err) { return reconcile.Result{}, nil } return reconcile.Result{}, fmt.Errorf("could not fetch OperatingSystemConfig: %+v", err) } - shoot, err := extensionscontroller.GetShoot(r.ctx, r.client, request.Namespace) + shoot, err := extensionscontroller.GetShoot(ctx, r.client, request.Namespace) if err != nil { return reconcile.Result{}, err } @@ -109,18 +109,18 @@ func (r *reconciler) Reconcile(request reconcile.Request) (reconcile.Result, err case extensionscontroller.IsMigrated(osc): return reconcile.Result{}, nil case operationType == gardencorev1beta1.LastOperationTypeMigrate: - return r.migrate(r.ctx, osc) + return r.migrate(ctx, osc) case osc.DeletionTimestamp != nil: - return r.delete(r.ctx, osc) + return r.delete(ctx, osc) case osc.Annotations[v1beta1constants.GardenerOperation] == v1beta1constants.GardenerOperationRestore: - return r.restore(r.ctx, osc) + return r.restore(ctx, osc) default: - return r.reconcile(r.ctx, osc, operationType) + return r.reconcile(ctx, osc, operationType) } } func (r *reconciler) reconcile(ctx context.Context, osc *extensionsv1alpha1.OperatingSystemConfig, operationType gardencorev1beta1.LastOperationType) (reconcile.Result, error) { - if err := extensionscontroller.EnsureFinalizer(ctx, r.client, FinalizerName, osc); err != nil { + if err := controllerutils.EnsureFinalizer(ctx, r.reader, r.client, osc, FinalizerName); err != nil { return reconcile.Result{}, err } @@ -150,7 +150,7 @@ func (r *reconciler) reconcile(ctx context.Context, osc *extensionsv1alpha1.Oper } func (r *reconciler) restore(ctx context.Context, osc *extensionsv1alpha1.OperatingSystemConfig) (reconcile.Result, error) { - if err := extensionscontroller.EnsureFinalizer(ctx, r.client, FinalizerName, osc); err != nil { + if err := controllerutils.EnsureFinalizer(ctx, r.reader, r.client, osc, FinalizerName); err != nil { return reconcile.Result{}, err } @@ -184,11 +184,7 @@ func (r *reconciler) restore(ctx context.Context, osc *extensionsv1alpha1.Operat } func (r *reconciler) delete(ctx context.Context, osc *extensionsv1alpha1.OperatingSystemConfig) (reconcile.Result, error) { - hasFinalizer, err := extensionscontroller.HasFinalizer(osc, FinalizerName) - if err != nil { - return reconcile.Result{}, fmt.Errorf("could not instantiate finalizer deletion: %+v", err) - } - if !hasFinalizer { + if !controllerutil.ContainsFinalizer(osc, FinalizerName) { r.logger.Info("Deleting operating system config causes a no-op as there is no finalizer.", "osc", osc.Name) return reconcile.Result{}, nil } @@ -207,7 +203,7 @@ func (r *reconciler) delete(ctx context.Context, osc *extensionsv1alpha1.Operati } r.logger.Info("Removing finalizer.", "osc", osc.Name) - if err := extensionscontroller.DeleteFinalizer(ctx, r.client, FinalizerName, osc); err != nil { + if err := controllerutils.RemoveFinalizer(ctx, r.reader, r.client, osc, FinalizerName); err != nil { return reconcile.Result{}, fmt.Errorf("error removing finalizer from OperationSystemConfig: %+v", err) } @@ -215,11 +211,7 @@ func (r *reconciler) delete(ctx context.Context, osc *extensionsv1alpha1.Operati } func (r *reconciler) migrate(ctx context.Context, osc *extensionsv1alpha1.OperatingSystemConfig) (reconcile.Result, error) { - hasFinalizer, err := extensionscontroller.HasFinalizer(osc, FinalizerName) - if err != nil { - return reconcile.Result{}, fmt.Errorf("could not instantiate finalizer deletion: %+v", err) - } - if !hasFinalizer { + if !controllerutil.ContainsFinalizer(osc, FinalizerName) { r.logger.Info("Migrating operating system config causes a no-op as there is no finalizer.", "osc", osc.Name) return reconcile.Result{}, nil } diff --git a/vendor/github.com/gardener/gardener/extensions/pkg/controller/reconciler.go b/vendor/github.com/gardener/gardener/extensions/pkg/controller/reconciler.go index 426356f0..f4b27437 100644 --- a/vendor/github.com/gardener/gardener/extensions/pkg/controller/reconciler.go +++ b/vendor/github.com/gardener/gardener/extensions/pkg/controller/reconciler.go @@ -18,10 +18,7 @@ import ( "context" v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" - contextutil "github.com/gardener/gardener/pkg/utils/context" - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/controller-runtime/pkg/runtime/inject" @@ -30,17 +27,16 @@ import ( type operationAnnotationWrapper struct { reconcile.Reconciler client client.Client - ctx context.Context - objectType runtime.Object + newObjFunc func() client.Object } // OperationAnnotationWrapper is a wrapper for an reconciler that // removes the Gardener operation annotation before `Reconcile` is called. // // This is useful in conjunction with the HasOperationAnnotationPredicate. -func OperationAnnotationWrapper(objectType runtime.Object, reconciler reconcile.Reconciler) reconcile.Reconciler { +func OperationAnnotationWrapper(newObjFunc func() client.Object, reconciler reconcile.Reconciler) reconcile.Reconciler { return &operationAnnotationWrapper{ - objectType: objectType, + newObjFunc: newObjFunc, Reconciler: reconciler, } } @@ -56,25 +52,14 @@ func (o *operationAnnotationWrapper) InjectFunc(f inject.Func) error { return f(o.Reconciler) } -// InjectStopChannel is an implementation for getting the respective stop channel managed by the controller-runtime. -func (o *operationAnnotationWrapper) InjectStopChannel(stopCh <-chan struct{}) error { - o.ctx = contextutil.FromStopChannel(stopCh) - return nil -} - // Reconcile removes the Gardener operation annotation if available and calls the inner `Reconcile`. -func (o *operationAnnotationWrapper) Reconcile(request reconcile.Request) (reconcile.Result, error) { - obj := o.objectType.DeepCopyObject() - if err := o.client.Get(o.ctx, request.NamespacedName, obj); client.IgnoreNotFound(err) != nil { - return reconcile.Result{}, err - } - - acc, err := meta.Accessor(obj) - if err != nil { +func (o *operationAnnotationWrapper) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error) { + obj := o.newObjFunc() + if err := o.client.Get(ctx, request.NamespacedName, obj); client.IgnoreNotFound(err) != nil { return reconcile.Result{}, err } - annotations := acc.GetAnnotations() + annotations := obj.GetAnnotations() if annotations[v1beta1constants.GardenerOperation] == v1beta1constants.GardenerOperationWaitForState { return reconcile.Result{}, nil } @@ -82,10 +67,10 @@ func (o *operationAnnotationWrapper) Reconcile(request reconcile.Request) (recon if annotations[v1beta1constants.GardenerOperation] == v1beta1constants.GardenerOperationReconcile { withOpAnnotation := obj.DeepCopyObject() delete(annotations, v1beta1constants.GardenerOperation) - acc.SetAnnotations(annotations) - if err := o.client.Patch(o.ctx, obj, client.MergeFrom(withOpAnnotation)); err != nil { + obj.SetAnnotations(annotations) + if err := o.client.Patch(ctx, obj, client.MergeFrom(withOpAnnotation)); err != nil { return reconcile.Result{}, err } } - return o.Reconciler.Reconcile(request) + return o.Reconciler.Reconcile(ctx, request) } diff --git a/vendor/github.com/gardener/gardener/extensions/pkg/controller/shoot.go b/vendor/github.com/gardener/gardener/extensions/pkg/controller/shoot.go index 330d6170..49ed0a84 100644 --- a/vendor/github.com/gardener/gardener/extensions/pkg/controller/shoot.go +++ b/vendor/github.com/gardener/gardener/extensions/pkg/controller/shoot.go @@ -20,7 +20,7 @@ import ( ) const ( - // ShootNoCleanupLabel is a constant for a label on a resource indicating the the Gardener cleaner should not delete this + // ShootNoCleanupLabel is a constant for a label on a resource indicating that the Gardener cleaner should not delete this // resource when cleaning a shoot during the deletion flow. ShootNoCleanupLabel = "shoot.gardener.cloud/no-cleanup" ) diff --git a/vendor/github.com/gardener/gardener/extensions/pkg/controller/utils.go b/vendor/github.com/gardener/gardener/extensions/pkg/controller/utils.go index 66e82257..80ec8c09 100644 --- a/vendor/github.com/gardener/gardener/extensions/pkg/controller/utils.go +++ b/vendor/github.com/gardener/gardener/extensions/pkg/controller/utils.go @@ -20,29 +20,22 @@ import ( "reflect" controllererror "github.com/gardener/gardener/extensions/pkg/controller/error" - "github.com/gardener/gardener/pkg/api/extensions" gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" - contextutil "github.com/gardener/gardener/pkg/utils/context" kutil "github.com/gardener/gardener/pkg/utils/kubernetes" resourcemanagerv1alpha1 "github.com/gardener/gardener-resource-manager/pkg/apis/resources/v1alpha1" autoscalingv1 "k8s.io/api/autoscaling/v1" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/util/sets" autoscalingv1beta2 "k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1beta2" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/util/retry" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/manager" - "sigs.k8s.io/controller-runtime/pkg/manager/signals" "sigs.k8s.io/controller-runtime/pkg/reconcile" ) @@ -91,11 +84,6 @@ func ReconcileErrCauseOrErr(err error) error { return err } -// SetupSignalHandlerContext sets up a context from signals.SetupSignalHandler stop channel. -func SetupSignalHandlerContext() context.Context { - return contextutil.FromStopChannel(signals.SetupSignalHandler()) -} - // AddToManagerBuilder aggregates various AddToManager functions. type AddToManagerBuilder []func(manager.Manager) error @@ -122,86 +110,16 @@ func (a *AddToManagerBuilder) AddToManager(m manager.Manager) error { return nil } -func finalizersAndAccessorOf(obj runtime.Object) (sets.String, metav1.Object, error) { - accessor, err := meta.Accessor(obj) - if err != nil { - return nil, nil, err - } - - return sets.NewString(accessor.GetFinalizers()...), accessor, nil -} - -// HasFinalizer checks if the given object has a finalizer with the given name. -func HasFinalizer(obj runtime.Object, finalizerName string) (bool, error) { - finalizers, _, err := finalizersAndAccessorOf(obj) - if err != nil { - return false, err - } - - return finalizers.Has(finalizerName), nil -} - -// EnsureFinalizer ensures that a finalizer of the given name is set on the given object. -// If the finalizer is not set, it adds it to the list of finalizers and updates the remote object. -func EnsureFinalizer(ctx context.Context, client client.Client, finalizerName string, obj runtime.Object) error { - finalizers, accessor, err := finalizersAndAccessorOf(obj) - if err != nil { - return err - } - - if finalizers.Has(finalizerName) { - return nil - } - - finalizers.Insert(finalizerName) - accessor.SetFinalizers(finalizers.UnsortedList()) - - return client.Update(ctx, obj) -} - -// DeleteFinalizer ensures that the given finalizer is not present anymore in the given object. -// If it is set, it removes it and issues an update. -func DeleteFinalizer(ctx context.Context, client client.Client, finalizerName string, obj runtime.Object) error { - finalizers, accessor, err := finalizersAndAccessorOf(obj) - if err != nil { - return err - } - - if !finalizers.Has(finalizerName) { - return nil - } - - finalizers.Delete(finalizerName) - accessor.SetFinalizers(finalizers.UnsortedList()) - - return client.Update(ctx, obj) -} - // DeleteAllFinalizers removes all finalizers from the object and issues an update. -func DeleteAllFinalizers(ctx context.Context, client client.Client, obj runtime.Object) error { +func DeleteAllFinalizers(ctx context.Context, client client.Client, obj client.Object) error { return TryUpdate(ctx, retry.DefaultBackoff, client, obj, func() error { - accessor, err := meta.Accessor(obj) - if err != nil { - return err - } - accessor.SetFinalizers(nil) + obj.SetFinalizers(nil) return nil }) } -// SecretReferenceToKey returns the key of the given SecretReference. -func SecretReferenceToKey(ref *corev1.SecretReference) client.ObjectKey { - return kutil.Key(ref.Namespace, ref.Name) -} - // GetSecretByReference returns the Secret object matching the given SecretReference. -func GetSecretByReference(ctx context.Context, c client.Client, ref *corev1.SecretReference) (*corev1.Secret, error) { - secret := &corev1.Secret{} - if err := c.Get(ctx, SecretReferenceToKey(ref), secret); err != nil { - return nil, err - } - return secret, nil -} +var GetSecretByReference = kutil.GetSecretByReference // TryPatch tries to apply the given transformation function onto the given object, and to patch it afterwards with optimistic locking. // It retries the patch with an exponential backoff. @@ -265,28 +183,19 @@ func GetVerticalPodAutoscalerObject() *unstructured.Unstructured { } // RemoveAnnotation removes an annotation key passed as annotation -func RemoveAnnotation(ctx context.Context, c client.Client, obj runtime.Object, annotation string) error { - accessor, err := meta.Accessor(obj) - if err != nil { - return err - } +func RemoveAnnotation(ctx context.Context, c client.Client, obj client.Object, annotation string) error { withAnnotation := obj.DeepCopyObject() - annotations := accessor.GetAnnotations() + annotations := obj.GetAnnotations() delete(annotations, annotation) - accessor.SetAnnotations(annotations) + obj.SetAnnotations(annotations) return c.Patch(ctx, obj, client.MergeFrom(withAnnotation)) } // IsMigrated checks if an extension object has been migrated -func IsMigrated(obj runtime.Object) bool { - acc, err := extensions.Accessor(obj) - if err != nil { - return false - } - - lastOp := acc.GetExtensionStatus().GetLastOperation() +func IsMigrated(obj extensionsv1alpha1.Object) bool { + lastOp := obj.GetExtensionStatus().GetLastOperation() return lastOp != nil && lastOp.Type == gardencorev1beta1.LastOperationTypeMigrate && lastOp.State == gardencorev1beta1.LastOperationStateSucceeded @@ -294,6 +203,6 @@ func IsMigrated(obj runtime.Object) bool { // GetObjectByReference gets an object by the given reference, in the given namespace. // If the object kind doesn't match the given reference kind this will result in an error. -func GetObjectByReference(ctx context.Context, c client.Client, ref *autoscalingv1.CrossVersionObjectReference, namespace string, obj runtime.Object) error { +func GetObjectByReference(ctx context.Context, c client.Client, ref *autoscalingv1.CrossVersionObjectReference, namespace string, obj client.Object) error { return c.Get(ctx, client.ObjectKey{Namespace: namespace, Name: v1beta1constants.ReferencedResourcesPrefix + ref.Name}, obj) } diff --git a/vendor/github.com/gardener/gardener/extensions/pkg/event/event.go b/vendor/github.com/gardener/gardener/extensions/pkg/event/event.go deleted file mode 100644 index a2b7abde..00000000 --- a/vendor/github.com/gardener/gardener/extensions/pkg/event/event.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package event - -import ( - "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/controller-runtime/pkg/event" -) - -// NewFromObject creates a new GenericEvent from the given runtime.Object. -// -// It tries to extract a metav1.Object from the given Object. If it fails, the Meta -// of the resulting GenericEvent will be `nil`. -func NewFromObject(obj runtime.Object) event.GenericEvent { - accessor, err := meta.Accessor(obj) - if err != nil { - return NewGeneric(nil, obj) - } - - return NewGeneric(accessor, obj) -} - -// NewGeneric creates a new GenericEvent from the given metav1.Object and runtime.Object. -func NewGeneric(meta metav1.Object, obj runtime.Object) event.GenericEvent { - return event.GenericEvent{ - Meta: meta, - Object: obj, - } -} diff --git a/vendor/github.com/gardener/gardener/extensions/pkg/predicate/mapper.go b/vendor/github.com/gardener/gardener/extensions/pkg/predicate/mapper.go index 2a199ac7..a24c79af 100644 --- a/vendor/github.com/gardener/gardener/extensions/pkg/predicate/mapper.go +++ b/vendor/github.com/gardener/gardener/extensions/pkg/predicate/mapper.go @@ -15,8 +15,6 @@ package predicate import ( - extensionsevent "github.com/gardener/gardener/extensions/pkg/event" - "sigs.k8s.io/controller-runtime/pkg/event" "sigs.k8s.io/controller-runtime/pkg/predicate" "sigs.k8s.io/controller-runtime/pkg/runtime/inject" @@ -74,7 +72,7 @@ func (m *mapperWithTriggers) InjectFunc(f inject.Func) error { // Create implements Predicate. func (m *mapperWithTriggers) Create(e event.CreateEvent) bool { if _, ok := m.triggers[CreateTrigger]; ok { - return m.mapper.Map(extensionsevent.NewGeneric(e.Meta, e.Object)) + return m.mapper.Map(event.GenericEvent(e)) } return true } @@ -82,7 +80,7 @@ func (m *mapperWithTriggers) Create(e event.CreateEvent) bool { // Delete implements Predicate. func (m *mapperWithTriggers) Delete(e event.DeleteEvent) bool { if _, ok := m.triggers[DeleteTrigger]; ok { - return m.mapper.Map(extensionsevent.NewGeneric(e.Meta, e.Object)) + return m.mapper.Map(event.GenericEvent{Object: e.Object}) } return true } @@ -90,10 +88,10 @@ func (m *mapperWithTriggers) Delete(e event.DeleteEvent) bool { // Update implements Predicate. func (m *mapperWithTriggers) Update(e event.UpdateEvent) bool { if _, ok := m.triggers[UpdateOldTrigger]; ok { - return m.mapper.Map(extensionsevent.NewGeneric(e.MetaOld, e.ObjectOld)) + return m.mapper.Map(event.GenericEvent{Object: e.ObjectOld}) } if _, ok := m.triggers[UpdateNewTrigger]; ok { - return m.mapper.Map(extensionsevent.NewGeneric(e.MetaNew, e.ObjectNew)) + return m.mapper.Map(event.GenericEvent{Object: e.ObjectNew}) } return true } @@ -101,7 +99,7 @@ func (m *mapperWithTriggers) Update(e event.UpdateEvent) bool { // Generic implements Predicate. func (m *mapperWithTriggers) Generic(e event.GenericEvent) bool { if _, ok := m.triggers[GenericTrigger]; ok { - return m.mapper.Map(extensionsevent.NewGeneric(e.Meta, e.Object)) + return m.mapper.Map(event.GenericEvent{Object: e.Object}) } return true } diff --git a/vendor/github.com/gardener/gardener/extensions/pkg/predicate/predicate.go b/vendor/github.com/gardener/gardener/extensions/pkg/predicate/predicate.go index d54a5e32..a61ce5a3 100644 --- a/vendor/github.com/gardener/gardener/extensions/pkg/predicate/predicate.go +++ b/vendor/github.com/gardener/gardener/extensions/pkg/predicate/predicate.go @@ -17,8 +17,9 @@ package predicate import ( "errors" + "sigs.k8s.io/controller-runtime/pkg/client" + extensionscontroller "github.com/gardener/gardener/extensions/pkg/controller" - extensionsevent "github.com/gardener/gardener/extensions/pkg/event" extensionsinject "github.com/gardener/gardener/extensions/pkg/inject" gardencore "github.com/gardener/gardener/pkg/api/core" "github.com/gardener/gardener/pkg/api/extensions" @@ -38,9 +39,8 @@ import ( var Log logr.Logger = log.Log // EvalGeneric returns true if all predicates match for the given object. -func EvalGeneric(obj runtime.Object, predicates ...predicate.Predicate) bool { - e := extensionsevent.NewFromObject(obj) - +func EvalGeneric(obj client.Object, predicates ...predicate.Predicate) bool { + e := event.GenericEvent{Object: obj} for _, p := range predicates { if !p.Generic(e) { return false @@ -58,18 +58,14 @@ type shootNotFailedMapper struct { } func (s *shootNotFailedMapper) Map(e event.GenericEvent) bool { - if e.Meta == nil { - return false - } - // Wait for cache sync because of backing client cache. - if !s.Cache.WaitForCacheSync(s.Context.Done()) { + if !s.Cache.WaitForCacheSync(s.Context) { err := errors.New("failed to wait for caches to sync") s.log.Error(err, "Could not wait for Cache to sync", "predicate", "ShootNotFailed") return false } - cluster, err := extensionscontroller.GetCluster(s.Context, s.Client, e.Meta.GetNamespace()) + cluster, err := extensionscontroller.GetCluster(s.Context, s.Client, e.Object.GetNamespace()) if err != nil { s.log.Error(err, "Could not retrieve corresponding cluster") return false @@ -104,22 +100,22 @@ func HasType(typeName string) predicate.Predicate { // HasName returns a predicate that matches the given name of a resource. func HasName(name string) predicate.Predicate { return FromMapper(MapperFunc(func(e event.GenericEvent) bool { - return e.Meta.GetName() == name + return e.Object.GetName() == name }), CreateTrigger, UpdateNewTrigger, DeleteTrigger, GenericTrigger) } // HasOperationAnnotation is a predicate for the operation annotation. func HasOperationAnnotation() predicate.Predicate { return FromMapper(MapperFunc(func(e event.GenericEvent) bool { - return e.Meta.GetAnnotations()[v1beta1constants.GardenerOperation] == v1beta1constants.GardenerOperationReconcile || - e.Meta.GetAnnotations()[v1beta1constants.GardenerOperation] == v1beta1constants.GardenerOperationRestore || - e.Meta.GetAnnotations()[v1beta1constants.GardenerOperation] == v1beta1constants.GardenerOperationMigrate + return e.Object.GetAnnotations()[v1beta1constants.GardenerOperation] == v1beta1constants.GardenerOperationReconcile || + e.Object.GetAnnotations()[v1beta1constants.GardenerOperation] == v1beta1constants.GardenerOperationRestore || + e.Object.GetAnnotations()[v1beta1constants.GardenerOperation] == v1beta1constants.GardenerOperationMigrate }), CreateTrigger, UpdateNewTrigger, GenericTrigger) } // LastOperationNotSuccessful is a predicate for unsuccessful last operations **only** for creation events. func LastOperationNotSuccessful() predicate.Predicate { - operationNotSucceeded := func(obj runtime.Object) bool { + operationNotSucceeded := func(obj client.Object) bool { acc, err := extensions.Accessor(obj) if err != nil { return false @@ -149,7 +145,7 @@ func LastOperationNotSuccessful() predicate.Predicate { // IsDeleting is a predicate for objects having a deletion timestamp. func IsDeleting() predicate.Predicate { return FromMapper(MapperFunc(func(e event.GenericEvent) bool { - return e.Meta.GetDeletionTimestamp() != nil + return e.Object.GetDeletionTimestamp() != nil }), CreateTrigger, UpdateNewTrigger, GenericTrigger) } @@ -195,7 +191,7 @@ func HasPurpose(purpose extensionsv1alpha1.Purpose) predicate.Predicate { // ClusterShootProviderType is a predicate for the provider type of the shoot in the cluster resource. func ClusterShootProviderType(decoder runtime.Decoder, providerType string) predicate.Predicate { - f := func(obj runtime.Object) bool { + f := func(obj client.Object) bool { if obj == nil { return false } @@ -231,7 +227,7 @@ func ClusterShootProviderType(decoder runtime.Decoder, providerType string) pred // GardenCoreProviderType is a predicate for the provider type of a `gardencore.Object` implementation. func GardenCoreProviderType(providerType string) predicate.Predicate { - f := func(obj runtime.Object) bool { + f := func(obj client.Object) bool { if obj == nil { return false } @@ -262,7 +258,7 @@ func GardenCoreProviderType(providerType string) predicate.Predicate { // ClusterShootKubernetesVersionAtLeast is a predicate for the kubernetes version of the shoot in the cluster resource. func ClusterShootKubernetesVersionAtLeast(decoder runtime.Decoder, kubernetesVersion string) predicate.Predicate { - f := func(obj runtime.Object) bool { + f := func(obj client.Object) bool { if obj == nil { return false } diff --git a/vendor/github.com/gardener/gardener/extensions/pkg/util/shoot.go b/vendor/github.com/gardener/gardener/extensions/pkg/util/shoot.go index 21b1b6aa..3f55bcb6 100644 --- a/vendor/github.com/gardener/gardener/extensions/pkg/util/shoot.go +++ b/vendor/github.com/gardener/gardener/extensions/pkg/util/shoot.go @@ -39,7 +39,7 @@ const CAChecksumAnnotation = "checksum/ca" // If the CA of an existing Kubeconfig has changed, it creates a new Kubeconfig. // Newly generated Kubeconfigs are applied with the given `client` to the given `namespace`. func GetOrCreateShootKubeconfig(ctx context.Context, c client.Client, certificateConfig secrets.CertificateSecretConfig, namespace string) (*corev1.Secret, error) { - caSecret, ca, err := secrets.LoadCAFromSecret(c, namespace, v1beta1constants.SecretNameCACluster) + caSecret, ca, err := secrets.LoadCAFromSecret(ctx, c, namespace, v1beta1constants.SecretNameCACluster) if err != nil { return nil, fmt.Errorf("error fetching CA secret %s/%s: %v", namespace, v1beta1constants.SecretNameCACluster, err) } diff --git a/vendor/github.com/gardener/gardener/hack/.ci/component_descriptor b/vendor/github.com/gardener/gardener/hack/.ci/component_descriptor index 7f62442f..c2668225 100755 --- a/vendor/github.com/gardener/gardener/hack/.ci/component_descriptor +++ b/vendor/github.com/gardener/gardener/hack/.ci/component_descriptor @@ -8,20 +8,14 @@ descriptor_out_file="${COMPONENT_DESCRIPTOR_PATH}" echo "enriching creating component descriptor from ${BASE_DEFINITION_PATH}" -if [[ -f "$repo_root_dir/charts/images.yaml" ]]; then - images="$(yaml2json < "$repo_root_dir/charts/images.yaml")" - eval "$(jq -r ".images | - map(select(.sourceRepository != \"$repo_name\") | - if (.name == \"hyperkube\" or .name == \"kube-apiserver\" or .name == \"kube-controller-manager\" or .name == \"kube-scheduler\" or .name == \"kube-proxy\" or .repository == \"k8s.gcr.io/hyperkube\") then - \"--generic-dependencies '{\\\"name\\\": \\\"\" + .name + \"\\\", \\\"version\\\": \\\"\" + .tag + \"\\\"}'\" - elif (.repository | startswith(\"eu.gcr.io/gardener-project/gardener\")) then - \"--component-dependencies '{\\\"name\\\": \\\"\" + .sourceRepository + \"\\\", \\\"version\\\": \\\"\" + .tag + \"\\\"}'\" - else - \"--container-image-dependencies '{\\\"name\\\": \\\"\" + .name + \"\\\", \\\"image_reference\\\": \\\"\" + .repository + \":\" + .tag + \"\\\", \\\"version\\\": \\\"\" + .tag + \"\\\"}'\" - end) | - \"${ADD_DEPENDENCIES_CMD} \\\\\n\" + - join(\" \\\\\n\")" <<< "$images")" -fi +# translates all images defined the images.yaml into component descriptor resources. +# For detailed documentation see https://github.com/gardener/component-cli/blob/main/docs/reference/components-cli_image-vector_add.md +# the konnectivity-server is temporary excluded until the component-descriptor for the replica-reloader is released +component-cli image-vector add --comp-desc ${BASE_DEFINITION_PATH} \ + --image-vector "$repo_root_dir/charts/images.yaml" \ + --component-prefixes eu.gcr.io/gardener-project/gardener \ + --exclude-component-reference konnectivity-server \ + --generic-dependencies hyperkube,kube-apiserver,kube-controller-manager,kube-scheduler,kube-proxy if [[ -d "$repo_root_dir/charts/" ]]; then for image_tpl_path in "$repo_root_dir/charts/"*"/templates/_images.tpl"; do diff --git a/vendor/github.com/gardener/gardener/hack/.ci/set_dependency_version b/vendor/github.com/gardener/gardener/hack/.ci/set_dependency_version index 0e149c7c..cfb4fbd9 100755 --- a/vendor/github.com/gardener/gardener/hack/.ci/set_dependency_version +++ b/vendor/github.com/gardener/gardener/hack/.ci/set_dependency_version @@ -15,19 +15,19 @@ # limitations under the License. import pathlib -import yaml import util -import product.model + dependency_type = util.check_env('DEPENDENCY_TYPE') if not dependency_type == 'component': - util.fail('don\'t know how to upgrade dependency type: ' + str(dependency_type)) + util.fail( + "don't know how to upgrade dependency type: " + f'{dependency_type}' + ) -component_reference = product.model.ComponentReference.create( - name=util.check_env('DEPENDENCY_NAME'), - version=util.check_env('DEPENDENCY_VERSION'), -) +dependency_name = util.check_env('DEPENDENCY_NAME') +dependency_version = util.check_env('DEPENDENCY_VERSION') images_file = pathlib.Path( util.check_env('REPO_DIR'), @@ -35,10 +35,12 @@ images_file = pathlib.Path( 'images.yaml', ) + class ImagesParser(object): ''' a naive YAML-parser crafted for the special case of processing - gardener's images.yaml file; crafted that way to preserve comments/empty lines + gardener's images.yaml file; crafted that way to preserve + comments/empty lines ''' def __init__( self, @@ -90,7 +92,9 @@ class ImagesParser(object): self._skip_to_next_tag() tag_line = self._line() indent = len(tag_line) - len(tag_line.lstrip()) - patched_line = ' ' * indent + 'tag: "{version}"'.format(version=self.target_version) + patched_line = ' ' * indent + 'tag: "{version}"'.format( + version=self.target_version, + ) self.lines[self._line_idx] = patched_line def write_updated_file(self): @@ -100,7 +104,7 @@ class ImagesParser(object): # handle special cases -name = component_reference.github_repo() +name = dependency_name.split('/')[-1] if name == 'autoscaler': names = ['cluster-autoscaler'] elif name == 'vpn': @@ -108,7 +112,7 @@ elif name == 'vpn': elif name == 'external-dns-management': names = ['dns-controller-manager'] elif name == 'logging': - names = ['fluent-bit-plugin-installer'] + names = ['fluent-bit-plugin-installer', 'loki-curator'] elif name == 'etcd-custom-image': names = ['etcd'] else: @@ -118,7 +122,7 @@ else: parser = ImagesParser( images_file=images_file, names=names, - target_version=str(component_reference.version()), + target_version=dependency_version, ) parser.set_versions() diff --git a/vendor/github.com/gardener/gardener/hack/cherry-pick-pull.sh b/vendor/github.com/gardener/gardener/hack/cherry-pick-pull.sh new file mode 100755 index 00000000..5f98c6a0 --- /dev/null +++ b/vendor/github.com/gardener/gardener/hack/cherry-pick-pull.sh @@ -0,0 +1,258 @@ +#!/usr/bin/env bash + +# Copyright 2015 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 copied from the kubernetes/kubernetes project +# https://github.com/kubernetes/kubernetes/blob/v1.20.0/hack/cherry_pick_pull.sh +# +# Modifications Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. + +# Usage Instructions: https://github.com/gardener/gardener/blob/master/docs/development/process.md#cherry-picks + +# Checkout a PR from GitHub. (Yes, this is sitting in a Git tree. How +# meta.) Assumes you care about pulls from remote "upstream" and +# checks them out to a branch named: +# automated-cherry-pick-of--- + +set -o errexit +set -o nounset +set -o pipefail + +REPO_ROOT="$(git rev-parse --show-toplevel)" +declare -r REPO_ROOT +cd "${REPO_ROOT}" + +STARTINGBRANCH=$(git symbolic-ref --short HEAD) +declare -r STARTINGBRANCH +declare -r REBASEMAGIC="${REPO_ROOT}/.git/rebase-apply" +DRY_RUN=${DRY_RUN:-""} +UPSTREAM_REMOTE=${UPSTREAM_REMOTE:-upstream} +FORK_REMOTE=${FORK_REMOTE:-origin} +MAIN_REPO_ORG=${MAIN_REPO_ORG:-$(git remote get-url "$UPSTREAM_REMOTE" | awk '{gsub(/http[s]:\/\/|git@/,"")}1' | awk -F'[@:./]' 'NR==1{print $3}')} +MAIN_REPO_NAME=${MAIN_REPO_NAME:-$(git remote get-url "$UPSTREAM_REMOTE" | awk '{gsub(/http[s]:\/\/|git@/,"")}1' | awk -F'[@:./]' 'NR==1{print $4}')} +DEPRECATED_RELEASE_NOTE_CATEGORY="|noteworthy|improvement|action" +RELEASE_NOTE_CATEGORY="(breaking|feature|bugfix|doc|other${DEPRECATED_RELEASE_NOTE_CATEGORY})" +RELEASE_NOTE_TARGET_GROUP="(user|operator|developer|dependency)" + +if [[ -z ${GITHUB_USER:-} ]]; then + echo "Please export GITHUB_USER= (or GH organization, if that's where your fork lives)" + exit 1 +fi + +if ! which hub > /dev/null; then + echo "Can't find 'hub' tool in PATH, please install from https://github.com/github/hub" + exit 1 +fi + +if [[ "$#" -lt 2 ]]; then + echo "${0} ...: cherry pick one or more onto and leave instructions for proposing pull request" + echo + echo " Checks out and handles the cherry-pick of (possibly multiple) for you." + echo " Examples:" + echo " $0 upstream/release-3.14 12345 # Cherry-picks PR 12345 onto upstream/release-3.14 and proposes that as a PR." + echo " $0 upstream/release-3.14 12345 56789 # Cherry-picks PR 12345, then 56789 and proposes the combination as a single PR." + echo + echo " Set the DRY_RUN environment var to skip git push and creating PR." + echo " This is useful for creating patches to a release branch without making a PR." + echo " When DRY_RUN is set the script will leave you in a branch containing the commits you cherry-picked." + echo + echo " Set UPSTREAM_REMOTE (default: upstream) and FORK_REMOTE (default: origin)" + echo " to override the default remote names to what you have locally." + exit 2 +fi + +if git_status=$(git status --porcelain --untracked=no 2>/dev/null) && [[ -n "${git_status}" ]]; then + echo "!!! Dirty tree. Clean up and try again." + exit 1 +fi + +if [[ -e "${REBASEMAGIC}" ]]; then + echo "!!! 'git rebase' or 'git am' in progress. Clean up and try again." + exit 1 +fi + +declare -r BRANCH="$1" +shift 1 +declare -r PULLS=( "$@" ) + +function join { local IFS="$1"; shift; echo "$*"; } +PULLDASH=$(join - "${PULLS[@]/#/#}") # Generates something like "#12345-#56789" +declare -r PULLDASH +PULLSUBJ=$(join " " "${PULLS[@]/#/#}") # Generates something like "#12345 #56789" +declare -r PULLSUBJ + +echo "+++ Updating remotes..." +git remote update "${UPSTREAM_REMOTE}" "${FORK_REMOTE}" + +if ! git log -n1 --format=%H "${BRANCH}" >/dev/null 2>&1; then + echo "!!! '${BRANCH}' not found. The second argument should be something like ${UPSTREAM_REMOTE}/release-0.21." + echo " (In particular, it needs to be a valid, existing remote branch that I can 'git checkout'.)" + exit 1 +fi + +NEWBRANCHREQ="automated-cherry-pick-of-${PULLDASH}" # "Required" portion for tools. +declare -r NEWBRANCHREQ +NEWBRANCH="$(echo "${NEWBRANCHREQ}-${BRANCH}" | sed 's/\//-/g')" +declare -r NEWBRANCH +NEWBRANCHUNIQ="${NEWBRANCH}-$(date +%s)" +declare -r NEWBRANCHUNIQ +echo "+++ Creating local branch ${NEWBRANCHUNIQ}" + +cleanbranch="" +prtext="" +gitamcleanup=false +function return_to_kansas { + if [[ "${gitamcleanup}" == "true" ]]; then + echo + echo "+++ Aborting in-progress git am." + git am --abort >/dev/null 2>&1 || true + fi + + # return to the starting branch and delete the PR text file + if [[ -z "${DRY_RUN}" ]]; then + echo + echo "+++ Returning you to the ${STARTINGBRANCH} branch and cleaning up." + git checkout -f "${STARTINGBRANCH}" >/dev/null 2>&1 || true + if [[ -n "${cleanbranch}" ]]; then + git branch -D "${cleanbranch}" >/dev/null 2>&1 || true + fi + if [[ -n "${prtext}" ]]; then + rm "${prtext}" + fi + fi +} +trap return_to_kansas EXIT + +SUBJECTS=() +RELEASE_NOTES=() +function make-a-pr() { + local rel + rel="$(basename "${BRANCH}")" + echo + echo "+++ Creating a pull request on GitHub at ${GITHUB_USER}:${NEWBRANCH}" + + # This looks like an unnecessary use of a tmpfile, but it avoids + # https://github.com/github/hub/issues/976 Otherwise stdin is stolen + # when we shove the heredoc at hub directly, tickling the ioctl + # crash. + prtext="$(mktemp -t prtext.XXXX)" # cleaned in return_to_kansas + local numandtitle + numandtitle=$(printf '%s\n' "${SUBJECTS[@]}") + relnotes=$(printf "${RELEASE_NOTES[@]}") + cat >"${prtext}" <&2 + exit 1 + fi + done + + if [[ "${conflicts}" != "true" ]]; then + echo "!!! git am failed, likely because of an in-progress 'git am' or 'git rebase'" + exit 1 + fi + } + + # set the subject + subject=$(grep -m 1 "^Subject" "/tmp/${pull}.patch" | sed -e 's/Subject: \[PATCH//g' | sed 's/.*] //') + SUBJECTS+=("#${pull}: ${subject}") + + # remove the patch file from /tmp + rm -f "/tmp/${pull}.patch" + + # get the release notes + notes=$(curl "https://api.github.com/repos/${MAIN_REPO_ORG}/${MAIN_REPO_NAME}/pulls/${pull}" -sS | jq '.body' | grep -Po "\`\`\` *${RELEASE_NOTE_CATEGORY} ${RELEASE_NOTE_TARGET_GROUP}.*?\`\`\`") + RELEASE_NOTES+=("${notes}") +done +gitamcleanup=false + +if [[ -n "${DRY_RUN}" ]]; then + echo "!!! Skipping git push and PR creation because you set DRY_RUN." + echo "To return to the branch you were in when you invoked this script:" + echo + echo " git checkout ${STARTINGBRANCH}" + echo + echo "To delete this branch:" + echo + echo " git branch -D ${NEWBRANCHUNIQ}" + exit 0 +fi + +if git remote -v | grep ^"${FORK_REMOTE}" | grep "${MAIN_REPO_ORG}/${MAIN_REPO_NAME}.git"; then + echo "!!! You have ${FORK_REMOTE} configured as your ${MAIN_REPO_ORG}/${MAIN_REPO_NAME}.git" + echo "This isn't normal. Leaving you with push instructions:" + echo + echo "+++ First manually push the branch this script created:" + echo + echo " git push REMOTE ${NEWBRANCHUNIQ}:${NEWBRANCH}" + echo + echo "where REMOTE is your personal fork (maybe ${UPSTREAM_REMOTE}? Consider swapping those.)." + echo "OR consider setting UPSTREAM_REMOTE and FORK_REMOTE to different values." + echo + make-a-pr + cleanbranch="" + exit 0 +fi + +echo +echo "+++ I'm about to do the following to push to GitHub (and I'm assuming ${FORK_REMOTE} is your personal fork):" +echo +echo " git push ${FORK_REMOTE} ${NEWBRANCHUNIQ}:${NEWBRANCH}" +echo +read -p "+++ Proceed (anything but 'y' aborts the cherry-pick)? [y/n] " -r +if ! [[ "${REPLY}" =~ ^[yY]$ ]]; then + echo "Aborting." >&2 + exit 1 +fi + +git push "${FORK_REMOTE}" -f "${NEWBRANCHUNIQ}:${NEWBRANCH}" +make-a-pr diff --git a/vendor/github.com/gardener/gardener/hack/clean.sh b/vendor/github.com/gardener/gardener/hack/clean.sh index c2b2a06c..44b3f618 100755 --- a/vendor/github.com/gardener/gardener/hack/clean.sh +++ b/vendor/github.com/gardener/gardener/hack/clean.sh @@ -20,5 +20,16 @@ echo "> Clean" for source_tree in $@; do find "$(dirname "$source_tree")" -type f -name "zz_*.go" -exec rm '{}' \; - grep -lr --include="*.go" "//go:generate packr2" . | xargs -I {} packr2 clean "{}/.." + find "$(dirname "$source_tree")" -type f -name "generated.proto" -exec rm '{}' \; + find "$(dirname "$source_tree")" -type f -name "generated.pb.go" -exec rm '{}' \; + find "$(dirname "$source_tree")" -type f -name "openapi_generated.go" -exec rm '{}' \; + grep -lr '// Code generated by MockGen. DO NOT EDIT' "$(dirname "$source_tree")" | xargs rm -f + grep -lr '// Code generated by client-gen. DO NOT EDIT' "$(dirname "$source_tree")" | xargs rm -f + grep -lr '// Code generated by informer-gen. DO NOT EDIT' "$(dirname "$source_tree")" | xargs rm -f + grep -lr '// Code generated by lister-gen. DO NOT EDIT' "$(dirname "$source_tree")" | xargs rm -f + grep -lr --include="*.go" "//go:generate packr2" "$(dirname "$source_tree")" | xargs -I {} packr2 clean "{}/.." done + +if [ -d "$PWD/hack/api-reference" ]; then + find ./hack/api-reference/ -type f -name "*.md" -exec rm '{}' \; +fi diff --git a/vendor/github.com/gardener/gardener/hack/generate-imagename-constants.sh b/vendor/github.com/gardener/gardener/hack/generate-imagename-constants.sh new file mode 100755 index 00000000..36caf016 --- /dev/null +++ b/vendor/github.com/gardener/gardener/hack/generate-imagename-constants.sh @@ -0,0 +1,51 @@ +#!/bin/bash +# +# Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +# +# 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. + +set -o errexit +set -o nounset +set -o pipefail + +function camelCase { + sed -r 's/(.)-+(.)/\1\U\2/g;s/^[a-z]/\U&/' <<< "$1" +} + +PATH_CHARTS="$(dirname $0)/../charts" + +out=" +$(cat "$(dirname $0)/LICENSE_BOILERPLATE.txt" | sed "s/YEAR/$(date +%Y)/g") + +// Code generated by $(basename $0). DO NOT EDIT. + +package charts + +const (" + +for image_name in $(yaml2json < "$PATH_CHARTS/images.yaml" | jq -r '[.images[].name] | unique | .[]'); do + variable_name="$(camelCase "$image_name")" + + out=" +$out + // ImageName$variable_name is a constant for an image in the image vector with name '$image_name'. + ImageName$variable_name = \"$image_name\"" +done + +out=" +$out +) +" + +echo "$out" > "$PATH_CHARTS/images.go" +goimports -l -w "$PATH_CHARTS/images.go" diff --git a/vendor/github.com/gardener/gardener/hack/generate-parallel.sh b/vendor/github.com/gardener/gardener/hack/generate-parallel.sh new file mode 100755 index 00000000..71236d26 --- /dev/null +++ b/vendor/github.com/gardener/gardener/hack/generate-parallel.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# +# Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +# +# 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. + +set -o errexit +set -o nounset +set -o pipefail + +CURRENT_DIR="$(dirname $0)" +PROJECT_ROOT="${CURRENT_DIR}"/.. +if [ "${PROJECT_ROOT#/}" == "${PROJECT_ROOT}" ]; then + PROJECT_ROOT="./$PROJECT_ROOT" +fi + +pushd "$PROJECT_ROOT" > /dev/null +ROOTS=${ROOTS:-$(git grep --files-with-matches -e '//go:generate' "$@" | \ + xargs -n 1 dirname | \ + sed 's,^,github.com/gardener/gardener/,;' | \ + sort | uniq +)} +popd > /dev/null + +read -ra PACKAGES <<< $(echo ${ROOTS}) + +# We need to explicitly pass GO111MODULE=off to k8s.io/code-generator as it is significantly slower otherwise, +# see https://github.com/kubernetes/code-generator/issues/100. +GO111MODULE=off parallel --will-cite echo Generate {}';' go generate -mod=vendor {} ::: ${PACKAGES[@]} diff --git a/vendor/github.com/gardener/gardener/hack/generate.sh b/vendor/github.com/gardener/gardener/hack/generate.sh index 0b3338a1..4217a4fc 100755 --- a/vendor/github.com/gardener/gardener/hack/generate.sh +++ b/vendor/github.com/gardener/gardener/hack/generate.sh @@ -18,4 +18,6 @@ set -e echo "> Generate" -GO111MODULE=on go generate -mod=vendor $@ +# We need to explicitly pass GO111MODULE=off to k8s.io/code-generator as it is significantly slower otherwise, +# see https://github.com/kubernetes/code-generator/issues/100. +GO111MODULE=off go generate -mod=vendor $@ diff --git a/vendor/github.com/gardener/gardener/hack/get-build-ld-flags.sh b/vendor/github.com/gardener/gardener/hack/get-build-ld-flags.sh index b2037ecf..df9b855b 100755 --- a/vendor/github.com/gardener/gardener/hack/get-build-ld-flags.sh +++ b/vendor/github.com/gardener/gardener/hack/get-build-ld-flags.sh @@ -14,11 +14,23 @@ # See the License for the specific language governing permissions and # limitations under the License. -SOURCE_REPOSITORY="${1:-github.com/gardener/gardener}" +PACKAGE_PATH="${1:-k8s.io/component-base}" VERSION_PATH="${2:-$(dirname $0)/../VERSION}" +PROGRAM_NAME="${3:-Gardener}" VERSION_VERSIONFILE="$(cat "$VERSION_PATH")" VERSION="${EFFECTIVE_VERSION:-$VERSION_VERSIONFILE}" +MAJOR_VERSION="" +MINOR_VERSION="" + +if [[ "${VERSION}" =~ ^v([0-9]+)\.([0-9]+)(\.[0-9]+)?([-].*)?([+].*)?$ ]]; then + MAJOR_VERSION=${BASH_REMATCH[1]} + MINOR_VERSION=${BASH_REMATCH[2]} + if [[ -n "${BASH_REMATCH[4]}" ]]; then + MINOR_VERSION+="+" + fi +fi + # .dockerignore ignores all files unrelevant for build (e.g. docs) to only copy relevant source files to the build # container. Hence, git will always detect a dirty work tree when building in a container (many deleted files). # This command filters out all deleted files that are ignored by .dockerignore to only detect changes to relevant files @@ -27,7 +39,10 @@ VERSION="${EFFECTIVE_VERSION:-$VERSION_VERSIONFILE}" # version-to-build in our pipelines (see https://github.com/gardener/cc-utils/issues/431). TREE_STATE="$([ -z "$(git status --porcelain 2>/dev/null | grep -vf <(git ls-files --deleted --ignored --exclude-from=.dockerignore) -e 'VERSION')" ] && echo clean || echo dirty)" -echo "-X $SOURCE_REPOSITORY/pkg/version.gitVersion=$VERSION - -X $SOURCE_REPOSITORY/pkg/version.gitTreeState=$TREE_STATE - -X $SOURCE_REPOSITORY/pkg/version.gitCommit=$(git rev-parse --verify HEAD) - -X $SOURCE_REPOSITORY/pkg/version.buildDate=$(date '+%Y-%m-%dT%H:%M:%S%z' | sed 's/\([0-9][0-9]\)$/:\1/g')" +echo "-X $PACKAGE_PATH/version.gitMajor=$MAJOR_VERSION + -X $PACKAGE_PATH/version.gitMinor=$MINOR_VERSION + -X $PACKAGE_PATH/version.gitVersion=$VERSION + -X $PACKAGE_PATH/version.gitTreeState=$TREE_STATE + -X $PACKAGE_PATH/version.gitCommit=$(git rev-parse --verify HEAD) + -X $PACKAGE_PATH/version.buildDate=$(date '+%Y-%m-%dT%H:%M:%S%z' | sed 's/\([0-9][0-9]\)$/:\1/g') + -X $PACKAGE_PATH/version/verflag.programName=$PROGRAM_NAME" diff --git a/vendor/github.com/gardener/gardener/hack/hook-me.sh b/vendor/github.com/gardener/gardener/hack/hook-me.sh index 8506f748..0ec64587 100755 --- a/vendor/github.com/gardener/gardener/hack/hook-me.sh +++ b/vendor/github.com/gardener/gardener/hack/hook-me.sh @@ -27,7 +27,7 @@ providerName=${2:-} [[ -z $providerName ]] && echo "Please specify the provider name (aws,gcp,azure,..etc.)!" && exit 1 tmpService=$(mktemp) -kubectl get svc gardener-extension-provider-$providerName -o yaml --export > $tmpService +kubectl get svc gardener-extension-provider-$providerName -o yaml > $tmpService cat < ./hack/hook-me.sh " - echo "> \`make EXTENSION_NAMESPACE= start\`" + echo "> ./hack/hook-me.sh " + echo "> \`make EXTENSION_NAMESPACE= WEBHOOK_CONFIG_MODE=service start\`" echo "==================================================================================================================================" echo "" @@ -294,7 +294,7 @@ if [[ "${BASH_SOURCE[0]}" = "$0" ]]; then createOrUpdateWebhookSVC $namespace $providerName echo "[STEP 7] Initializing the inlets client"; - echo "[Info] Inlets initialized, you are ready to go ahead and run \"make EXTENSION_NAMESPACE=$namespace start\"" + echo "[Info] Inlets initialized, you are ready to go ahead and run \"make EXTENSION_NAMESPACE=$namespace WEBHOOK_CONFIG_MODE=service start\"" echo "[Info] It will take about 5 seconds for the connection to succeeed!" inlets client --remote ws://$loadbalancerIPOrHostName:8000 --upstream https://localhost:$webhookServerPort --token=21d809ed61915c9177fbceeaa87e307e766be5f2 diff --git a/vendor/github.com/gardener/gardener/hack/install-promtool.sh b/vendor/github.com/gardener/gardener/hack/install-promtool.sh new file mode 100755 index 00000000..350faa29 --- /dev/null +++ b/vendor/github.com/gardener/gardener/hack/install-promtool.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# +# Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +# +# 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. + +set -e + +echo "> Installing promtool" + +if which promtool &>/dev/null; then + echo "promtool is already installed, skipping the installation..." + exit 0 +fi + +platform=$(uname -s | tr '[:upper:]' '[:lower:]') +version="2.24.1" +archive_name="prometheus-${version}.${platform}-amd64" +file_name="${archive_name}.tar.gz" + +temp_dir="$(mktemp -d)" +function cleanup { + rm -rf "${temp_dir}" +} +trap cleanup EXIT ERR INT TERM + +curl \ + -L \ + --output ${temp_dir}/${file_name} \ + "https://github.com/prometheus/prometheus/releases/download/v${version}/${file_name}" + +tar -xzm -C "${temp_dir}" -f "${temp_dir}/${file_name}" +mv "${temp_dir}/${archive_name}/promtool" /usr/local/bin/ +chmod +x /usr/local/bin/promtool diff --git a/vendor/github.com/gardener/gardener/hack/install-requirements.sh b/vendor/github.com/gardener/gardener/hack/install-requirements.sh index 0b34709a..465d311f 100755 --- a/vendor/github.com/gardener/gardener/hack/install-requirements.sh +++ b/vendor/github.com/gardener/gardener/hack/install-requirements.sh @@ -24,7 +24,16 @@ export GO111MODULE=on curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.27.0 curl -s "https://raw.githubusercontent.com/helm/helm/v2.17.0/scripts/get" | bash -s -- --version 'v2.17.0' -if [[ "$(uname -s)" == *"Darwin"* ]]; then +platform=$(uname -s) +if [[ ${platform} == "Linux" ]]; then + if ! which jq &>/dev/null; then + echo "Installing jq ..." + curl -L -o /usr/local/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 + chmod +x /usr/local/bin/jq + fi +fi + +if [[ ${platform} == *"Darwin"* ]]; then cat < Install" LD_FLAGS="${LD_FLAGS:-$($(dirname $0)/get-build-ld-flags.sh)}" -CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on \ +CGO_ENABLED=0 GOOS=$(go env GOOS) GOARCH=$(go env GOARCH) GO111MODULE=on \ go install -mod=vendor -ldflags "$LD_FLAGS" \ $@ diff --git a/vendor/github.com/gardener/gardener/hack/setup-envtest.sh b/vendor/github.com/gardener/gardener/hack/setup-envtest.sh index e984688f..783f930d 100755 --- a/vendor/github.com/gardener/gardener/hack/setup-envtest.sh +++ b/vendor/github.com/gardener/gardener/hack/setup-envtest.sh @@ -13,14 +13,8 @@ # 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 copied and modified from the kubernetes-sigs/controller-runtime project -# https://github.com/kubernetes-sigs/controller-runtime/blob/a9bd9117a77a2f84bbc546e28991136fe0000dc0/hack/setup-envtest.sh -# -# Modifications copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. set -o errexit -set -o nounset set -o pipefail # Turn colors in this script off by setting the NO_COLOR variable in your @@ -46,11 +40,11 @@ function setup_envtest_env { # Setup env vars KUBEBUILDER_ASSETS=${KUBEBUILDER_ASSETS:-""} if [[ -z "${KUBEBUILDER_ASSETS}" ]]; then - export KUBEBUILDER_ASSETS="$1/bin" + export KUBEBUILDER_ASSETS=$1/bin fi } -# Fetch k8s API gen tools and make it available under KUBEBUILDER_ASSETS. +# fetch k8s API gen tools and make it available under envtest_root_dir/bin. # # Skip fetching and untaring the tools by setting the SKIP_FETCH_TOOLS variable # in your environment to any value: @@ -68,7 +62,7 @@ function fetch_envtest_tools { tmp_root=/tmp envtest_root_dir=$tmp_root/envtest - k8s_version="${ENVTEST_K8S_VERSION:-1.17.9}" + k8s_version="${ENVTEST_K8S_VERSION:-1.19.2}" goarch="$(go env GOARCH)" goos="$(go env GOOS)" @@ -100,10 +94,3 @@ function fetch_envtest_tools { mkdir -p "${dest_dir}" tar -C "${dest_dir}" --strip-components=1 -zvxf "$envtest_tools_archive_path" } - -bin_dir="$(git rev-parse --show-toplevel)/bin" -kb_root_dir="$bin_dir/kubebuilder" - -mkdir -p "$kb_root_dir" -fetch_envtest_tools "$kb_root_dir" -setup_envtest_env "$kb_root_dir" diff --git a/vendor/github.com/gardener/gardener/hack/test-cover.sh b/vendor/github.com/gardener/gardener/hack/test-cover.sh index a3e4f08b..232103d2 100755 --- a/vendor/github.com/gardener/gardener/hack/test-cover.sh +++ b/vendor/github.com/gardener/gardener/hack/test-cover.sh @@ -15,11 +15,19 @@ # limitations under the License. set -e +TEST_BIN_DIR="$(dirname "${0}")/../dev/testbin" +mkdir -p ${TEST_BIN_DIR} + +ENVTEST_ASSETS_DIR="$(realpath ${TEST_BIN_DIR})" + source "$(dirname $0)/setup-envtest.sh" +fetch_envtest_tools ${ENVTEST_ASSETS_DIR} +setup_envtest_env ${ENVTEST_ASSETS_DIR} + echo "> Test Cover" -GO111MODULE=on ginkgo -cover -race -mod=vendor $@ +GO111MODULE=on ginkgo -cover -timeout=2m -race -mod=vendor $@ REPO_ROOT="$(git rev-parse --show-toplevel)" COVERPROFILE="$REPO_ROOT/test.coverprofile" diff --git a/vendor/github.com/gardener/gardener/hack/test.sh b/vendor/github.com/gardener/gardener/hack/test.sh index f9f98d2c..9a96f1d4 100755 --- a/vendor/github.com/gardener/gardener/hack/test.sh +++ b/vendor/github.com/gardener/gardener/hack/test.sh @@ -15,8 +15,16 @@ # limitations under the License. set -e +TEST_BIN_DIR="$(dirname "${0}")/../dev/testbin" +mkdir -p ${TEST_BIN_DIR} + +ENVTEST_ASSETS_DIR="$(realpath ${TEST_BIN_DIR})" + source "$(dirname $0)/setup-envtest.sh" +fetch_envtest_tools ${ENVTEST_ASSETS_DIR} +setup_envtest_env ${ENVTEST_ASSETS_DIR} + echo "> Test" GO111MODULE=on go test -race -mod=vendor $@ | grep -v 'no test files' diff --git a/vendor/github.com/gardener/gardener/hack/update-codegen.sh b/vendor/github.com/gardener/gardener/hack/update-codegen.sh index 380f6b1c..75aa25d7 100755 --- a/vendor/github.com/gardener/gardener/hack/update-codegen.sh +++ b/vendor/github.com/gardener/gardener/hack/update-codegen.sh @@ -22,169 +22,259 @@ rm -f ${GOPATH}/bin/*-gen CURRENT_DIR=$(dirname $0) PROJECT_ROOT="${CURRENT_DIR}"/.. +export PROJECT_ROOT # core.gardener.cloud APIs -bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ - deepcopy,defaulter,client,lister,informer \ - github.com/gardener/gardener/pkg/client/core \ - github.com/gardener/gardener/pkg/apis \ - github.com/gardener/gardener/pkg/apis \ - "core:v1alpha1,v1beta1" \ - -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" - -bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ - conversion \ - github.com/gardener/gardener/pkg/client/core \ - github.com/gardener/gardener/pkg/apis \ - github.com/gardener/gardener/pkg/apis \ - "core:v1alpha1,v1beta1" \ - -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +core_groups() { + echo "Generating API groups for pkg/apis/core" + + bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ + deepcopy,defaulter,client,lister,informer \ + github.com/gardener/gardener/pkg/client/core \ + github.com/gardener/gardener/pkg/apis \ + github.com/gardener/gardener/pkg/apis \ + "core:v1alpha1,v1beta1" \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" + + bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ + conversion \ + github.com/gardener/gardener/pkg/client/core \ + github.com/gardener/gardener/pkg/apis \ + github.com/gardener/gardener/pkg/apis \ + "core:v1alpha1,v1beta1" \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +} +export -f core_groups # extensions.gardener.cloud APIs -bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-groups.sh \ - "deepcopy,client,informer,lister" \ - github.com/gardener/gardener/pkg/client/extensions \ - github.com/gardener/gardener/pkg/apis \ - "extensions:v1alpha1" \ - -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +extensions_groups() { + echo "Generating API groups for pkg/apis/extensions" + + bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-groups.sh \ + "deepcopy,client,informer,lister" \ + github.com/gardener/gardener/pkg/client/extensions \ + github.com/gardener/gardener/pkg/apis \ + "extensions:v1alpha1" \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +} +export -f extensions_groups + +# seedmanagement.gardener.cloud APIs + +seedmanagement_groups() { + echo "Generating API groups for pkg/apis/seedmanagement" + + bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-groups.sh \ + "all" \ + github.com/gardener/gardener/pkg/client/seedmanagement \ + github.com/gardener/gardener/pkg/apis \ + "seedmanagement:v1alpha1" \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" + + bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ + "deepcopy,defaulter,conversion" \ + github.com/gardener/gardener/pkg/client/seedmanagement \ + github.com/gardener/gardener/pkg/apis \ + github.com/gardener/gardener/pkg/apis \ + "seedmanagement:v1alpha1" \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +} +export -f seedmanagement_groups # settings.gardener.cloud APIs -bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-groups.sh \ - "all" \ - github.com/gardener/gardener/pkg/client/settings \ - github.com/gardener/gardener/pkg/apis \ - "settings:v1alpha1" \ - -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" - -bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ - "deepcopy,defaulter,conversion" \ - github.com/gardener/gardener/pkg/client/settings \ - github.com/gardener/gardener/pkg/apis \ - github.com/gardener/gardener/pkg/apis \ - "settings:v1alpha1" \ - -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +settings_groups() { + echo "Generating API groups for pkg/apis/settings" + + bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-groups.sh \ + "all" \ + github.com/gardener/gardener/pkg/client/settings \ + github.com/gardener/gardener/pkg/apis \ + "settings:v1alpha1" \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" + + bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ + "deepcopy,defaulter,conversion" \ + github.com/gardener/gardener/pkg/client/settings \ + github.com/gardener/gardener/pkg/apis \ + github.com/gardener/gardener/pkg/apis \ + "settings:v1alpha1" \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +} +export -f settings_groups # Componentconfig for controller-manager -bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ - deepcopy,defaulter \ - github.com/gardener/gardener/pkg/client/componentconfig \ - github.com/gardener/gardener/pkg/controllermanager/apis \ - github.com/gardener/gardener/pkg/controllermanager/apis \ - "config:v1alpha1" \ - -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" - -bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ - conversion \ - github.com/gardener/gardener/pkg/client/componentconfig \ - github.com/gardener/gardener/pkg/controllermanager/apis \ - github.com/gardener/gardener/pkg/controllermanager/apis \ - "config:v1alpha1" \ - --extra-peer-dirs=github.com/gardener/gardener/pkg/controllermanager/apis/config,github.com/gardener/gardener/pkg/controllermanager/apis/config/v1alpha1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/conversion,k8s.io/apimachinery/pkg/runtime,k8s.io/component-base/config,k8s.io/component-base/config/v1alpha1 \ - -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +controllermanager_groups() { + echo "Generating API groups for pkg/controllermanager/apis/config" + + bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ + deepcopy,defaulter \ + github.com/gardener/gardener/pkg/client/componentconfig \ + github.com/gardener/gardener/pkg/controllermanager/apis \ + github.com/gardener/gardener/pkg/controllermanager/apis \ + "config:v1alpha1" \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" + + bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ + conversion \ + github.com/gardener/gardener/pkg/client/componentconfig \ + github.com/gardener/gardener/pkg/controllermanager/apis \ + github.com/gardener/gardener/pkg/controllermanager/apis \ + "config:v1alpha1" \ + --extra-peer-dirs=github.com/gardener/gardener/pkg/controllermanager/apis/config,github.com/gardener/gardener/pkg/controllermanager/apis/config/v1alpha1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/conversion,k8s.io/apimachinery/pkg/runtime,k8s.io/component-base/config,k8s.io/component-base/config/v1alpha1 \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +} +export -f controllermanager_groups # Componentconfig for admission controller -bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ - deepcopy,defaulter \ - github.com/gardener/gardener/pkg/client/admissioncontrollerconfig \ - github.com/gardener/gardener/pkg/admissioncontroller/apis \ - github.com/gardener/gardener/pkg/admissioncontroller/apis \ - "config:v1alpha1" \ - -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" - -bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ - conversion \ - github.com/gardener/gardener/pkg/client/admissioncontrollerconfig \ - github.com/gardener/gardener/pkg/admissioncontroller/apis \ - github.com/gardener/gardener/pkg/admissioncontroller/apis \ - "config:v1alpha1" \ - --extra-peer-dirs=github.com/gardener/gardener/pkg/admissioncontroller/apis/config,github.com/gardener/gardener/pkg/admissioncontroller/apis/config/v1alpha1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/conversion,k8s.io/apimachinery/pkg/runtime,k8s.io/component-base/config,k8s.io/component-base/config/v1alpha1 \ - -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +admissioncontroller_groups() { + echo "Generating API groups for pkg/admissioncontroller/apis/config" + + bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ + deepcopy,defaulter \ + github.com/gardener/gardener/pkg/client/admissioncontrollerconfig \ + github.com/gardener/gardener/pkg/admissioncontroller/apis \ + github.com/gardener/gardener/pkg/admissioncontroller/apis \ + "config:v1alpha1" \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" + + bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ + conversion \ + github.com/gardener/gardener/pkg/client/admissioncontrollerconfig \ + github.com/gardener/gardener/pkg/admissioncontroller/apis \ + github.com/gardener/gardener/pkg/admissioncontroller/apis \ + "config:v1alpha1" \ + --extra-peer-dirs=github.com/gardener/gardener/pkg/admissioncontroller/apis/config,github.com/gardener/gardener/pkg/admissioncontroller/apis/config/v1alpha1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/conversion,k8s.io/apimachinery/pkg/runtime,k8s.io/component-base/config,k8s.io/component-base/config/v1alpha1 \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +} +export -f admissioncontroller_groups # Configuration for gardener scheduler -bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ - deepcopy,defaulter \ - github.com/gardener/gardener/pkg/scheduler/client \ - github.com/gardener/gardener/pkg/scheduler/apis \ - github.com/gardener/gardener/pkg/scheduler/apis \ - "config:v1alpha1" \ - -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" - -bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ - conversion \ - github.com/gardener/gardener/pkg/scheduler/client \ - github.com/gardener/gardener/pkg/scheduler/apis \ - github.com/gardener/gardener/pkg/scheduler/apis \ - "config:v1alpha1" \ - --extra-peer-dirs=github.com/gardener/gardener/pkg/scheduler/apis/config,github.com/gardener/gardener/pkg/scheduler/apis/config/v1alpha1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/conversion,k8s.io/apimachinery/pkg/runtime,k8s.io/component-base/config,k8s.io/component-base/config/v1alpha1 \ - -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +scheduler_groups() { + echo "Generating API groups for pkg/scheduler/apis/config" + + bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ + deepcopy,defaulter \ + github.com/gardener/gardener/pkg/scheduler/client \ + github.com/gardener/gardener/pkg/scheduler/apis \ + github.com/gardener/gardener/pkg/scheduler/apis \ + "config:v1alpha1" \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" + + bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ + conversion \ + github.com/gardener/gardener/pkg/scheduler/client \ + github.com/gardener/gardener/pkg/scheduler/apis \ + github.com/gardener/gardener/pkg/scheduler/apis \ + "config:v1alpha1" \ + --extra-peer-dirs=github.com/gardener/gardener/pkg/scheduler/apis/config,github.com/gardener/gardener/pkg/scheduler/apis/config/v1alpha1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/conversion,k8s.io/apimachinery/pkg/runtime,k8s.io/component-base/config,k8s.io/component-base/config/v1alpha1 \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +} +export -f scheduler_groups # Componentconfig for gardenlet -bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ - deepcopy,defaulter \ - github.com/gardener/gardener/pkg/client/componentconfig \ - github.com/gardener/gardener/pkg/gardenlet/apis \ - github.com/gardener/gardener/pkg/gardenlet/apis \ - "config:v1alpha1" \ - -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" - -bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ - conversion \ - github.com/gardener/gardener/pkg/client/componentconfig \ - github.com/gardener/gardener/pkg/gardenlet/apis \ - github.com/gardener/gardener/pkg/gardenlet/apis \ - "config:v1alpha1" \ - --extra-peer-dirs=github.com/gardener/gardener/pkg/gardenlet/apis/config,github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/conversion,k8s.io/apimachinery/pkg/runtime,k8s.io/component-base/config,k8s.io/component-base/config/v1alpha1 \ - -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +gardenlet_groups() { + echo "Generating API groups for pkg/gardenlet/apis/config" + + bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ + deepcopy,defaulter \ + github.com/gardener/gardener/pkg/client/componentconfig \ + github.com/gardener/gardener/pkg/gardenlet/apis \ + github.com/gardener/gardener/pkg/gardenlet/apis \ + "config:v1alpha1" \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" + + bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ + conversion \ + github.com/gardener/gardener/pkg/client/componentconfig \ + github.com/gardener/gardener/pkg/gardenlet/apis \ + github.com/gardener/gardener/pkg/gardenlet/apis \ + "config:v1alpha1" \ + --extra-peer-dirs=github.com/gardener/gardener/pkg/gardenlet/apis/config,github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/conversion,k8s.io/apimachinery/pkg/runtime,k8s.io/component-base/config,k8s.io/component-base/config/v1alpha1 \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +} +export -f gardenlet_groups # Componentconfig for admission plugins -bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ - deepcopy,defaulter \ - github.com/gardener/gardener/pkg/client/componentconfig \ - github.com/gardener/gardener/plugin/pkg/shoot/tolerationrestriction/apis \ - github.com/gardener/gardener/plugin/pkg/shoot/tolerationrestriction/apis \ - "shoottolerationrestriction:v1alpha1" \ - -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" - -bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ - conversion \ - github.com/gardener/gardener/pkg/client/componentconfig \ - github.com/gardener/gardener/plugin/pkg/shoot/tolerationrestriction/apis \ - github.com/gardener/gardener/plugin/pkg/shoot/tolerationrestriction/apis \ - "shoottolerationrestriction:v1alpha1" \ - --extra-peer-dirs=github.com/gardener/gardener/plugin/pkg/shoot/tolerationrestriction/apis/shoottolerationrestriction,github.com/gardener/gardener/plugin/pkg/shoot/tolerationrestriction/apis/shoottolerationrestriction/v1alpha1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/conversion,k8s.io/apimachinery/pkg/runtime,k8s.io/component-base/config,k8s.io/component-base/config/v1alpha1 \ - -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +shoottolerationrestriction_groups() { + echo "Generating API groups for plugin/pkg/shoot/tolerationrestriction/apis/shoottolerationrestriction" + + bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ + deepcopy,defaulter \ + github.com/gardener/gardener/pkg/client/componentconfig \ + github.com/gardener/gardener/plugin/pkg/shoot/tolerationrestriction/apis \ + github.com/gardener/gardener/plugin/pkg/shoot/tolerationrestriction/apis \ + "shoottolerationrestriction:v1alpha1" \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" + + bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \ + conversion \ + github.com/gardener/gardener/pkg/client/componentconfig \ + github.com/gardener/gardener/plugin/pkg/shoot/tolerationrestriction/apis \ + github.com/gardener/gardener/plugin/pkg/shoot/tolerationrestriction/apis \ + "shoottolerationrestriction:v1alpha1" \ + --extra-peer-dirs=github.com/gardener/gardener/plugin/pkg/shoot/tolerationrestriction/apis/shoottolerationrestriction,github.com/gardener/gardener/plugin/pkg/shoot/tolerationrestriction/apis/shoottolerationrestriction/v1alpha1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/conversion,k8s.io/apimachinery/pkg/runtime,k8s.io/component-base/config,k8s.io/component-base/config/v1alpha1 \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +} +export -f shoottolerationrestriction_groups # OpenAPI definitions -echo "Generating openapi definitions" -rm -Rf ./${PROJECT_ROOT}/openapi/openapi_generated.go -go install ./${PROJECT_ROOT}/vendor/k8s.io/kube-openapi/cmd/openapi-gen -${GOPATH}/bin/openapi-gen "$@" \ - --v 1 \ - --logtostderr \ - --input-dirs=github.com/gardener/gardener/pkg/apis/core/v1alpha1 \ - --input-dirs=github.com/gardener/gardener/pkg/apis/core/v1beta1 \ - --input-dirs=github.com/gardener/gardener/pkg/apis/settings/v1alpha1 \ - --input-dirs=k8s.io/api/core/v1 \ - --input-dirs=k8s.io/api/rbac/v1 \ - --input-dirs=k8s.io/api/autoscaling/v1 \ - --input-dirs=k8s.io/apimachinery/pkg/apis/meta/v1 \ - --input-dirs=k8s.io/apimachinery/pkg/api/resource \ - --input-dirs=k8s.io/apimachinery/pkg/types \ - --input-dirs=k8s.io/apimachinery/pkg/version \ - --input-dirs=k8s.io/apimachinery/pkg/runtime \ - --input-dirs=k8s.io/apimachinery/pkg/util/intstr \ - --report-filename=${PROJECT_ROOT}/pkg/openapi/api_violations.report \ - --output-package=github.com/gardener/gardener/pkg/openapi \ - -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" - -echo -echo "NOTE: If you changed the API then consider updating the example manifests." +openapi_definitions() { + echo "Generating openapi definitions" + rm -Rf ./${PROJECT_ROOT}/openapi/openapi_generated.go + go install ./${PROJECT_ROOT}/vendor/k8s.io/kube-openapi/cmd/openapi-gen + ${GOPATH}/bin/openapi-gen "$@" \ + --v 1 \ + --logtostderr \ + --input-dirs=github.com/gardener/gardener/pkg/apis/core/v1alpha1 \ + --input-dirs=github.com/gardener/gardener/pkg/apis/core/v1beta1 \ + --input-dirs=github.com/gardener/gardener/pkg/apis/settings/v1alpha1 \ + --input-dirs=github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1 \ + --input-dirs=k8s.io/api/core/v1 \ + --input-dirs=k8s.io/api/rbac/v1 \ + --input-dirs=k8s.io/api/autoscaling/v1 \ + --input-dirs=k8s.io/apimachinery/pkg/apis/meta/v1 \ + --input-dirs=k8s.io/apimachinery/pkg/api/resource \ + --input-dirs=k8s.io/apimachinery/pkg/types \ + --input-dirs=k8s.io/apimachinery/pkg/version \ + --input-dirs=k8s.io/apimachinery/pkg/runtime \ + --input-dirs=k8s.io/apimachinery/pkg/util/intstr \ + --report-filename=${PROJECT_ROOT}/pkg/openapi/api_violations.report \ + --output-package=github.com/gardener/gardener/pkg/openapi \ + -h "${PROJECT_ROOT}/hack/LICENSE_BOILERPLATE.txt" +} +export -f openapi_definitions + +if [[ $# -gt 0 && "$1" == "--parallel" ]]; then + shift 1 + parallel --will-cite ::: \ + core_groups \ + extensions_groups \ + seedmanagement_groups \ + settings_groups \ + controllermanager_groups \ + admissioncontroller_groups \ + scheduler_groups \ + gardenlet_groups \ + shoottolerationrestriction_groups +else + core_groups + extensions_groups + seedmanagement_groups + settings_groups + controllermanager_groups + admissioncontroller_groups + scheduler_groups + gardenlet_groups + shoottolerationrestriction_groups +fi + +openapi_definitions "$@" diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/types_common.go b/vendor/github.com/gardener/gardener/pkg/apis/core/types_common.go index abb184a3..b7285670 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/types_common.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/types_common.go @@ -23,19 +23,26 @@ type ErrorCode string const ( // ErrorInfraUnauthorized indicates that the last error occurred due to invalid infrastructure credentials. + // It is classified as a non-retryable error code. ErrorInfraUnauthorized ErrorCode = "ERR_INFRA_UNAUTHORIZED" // ErrorInfraInsufficientPrivileges indicates that the last error occurred due to insufficient infrastructure privileges. + // It is classified as a non-retryable error code. ErrorInfraInsufficientPrivileges ErrorCode = "ERR_INFRA_INSUFFICIENT_PRIVILEGES" // ErrorInfraQuotaExceeded indicates that the last error occurred due to infrastructure quota limits. + // It is classified as a non-retryable error code. ErrorInfraQuotaExceeded ErrorCode = "ERR_INFRA_QUOTA_EXCEEDED" // ErrorInfraDependencies indicates that the last error occurred due to dependent objects on the infrastructure level. + // It is classified as a non-retryable error code. ErrorInfraDependencies ErrorCode = "ERR_INFRA_DEPENDENCIES" // ErrorInfraResourcesDepleted indicates that the last error occurred due to depleted resource in the infrastructure. ErrorInfraResourcesDepleted ErrorCode = "ERR_INFRA_RESOURCES_DEPLETED" // ErrorCleanupClusterResources indicates that the last error occurred due to resources in the cluster that are stuck in deletion. ErrorCleanupClusterResources ErrorCode = "ERR_CLEANUP_CLUSTER_RESOURCES" // ErrorConfigurationProblem indicates that the last error occurred due to a configuration problem. + // It is classified as a non-retryable error code. ErrorConfigurationProblem ErrorCode = "ERR_CONFIGURATION_PROBLEM" + // ErrorRetryableConfigurationProblem indicates that the last error occurred due to a retryable configuration problem. + ErrorRetryableConfigurationProblem ErrorCode = "ERR_RETRYABLE_CONFIGURATION_PROBLEM" ) // LastError indicates the last occurred error for an operation on a resource. diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/types_project.go b/vendor/github.com/gardener/gardener/pkg/apis/core/types_project.go index 7e0ee7ad..5593986b 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/types_project.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/types_project.go @@ -63,7 +63,7 @@ type ProjectSpec struct { // Namespace is the name of the namespace that has been created for the Project object. // A nil value means that Gardener will determine the name of the namespace. Namespace *string - // Tolerations contains the default tolerations and a whitelist for taints on seed clusters. + // Tolerations contains the default tolerations and a list for allowed taints on seed clusters. Tolerations *ProjectTolerations } @@ -136,6 +136,8 @@ const ( ProjectEventNamespaceReconcileFailed = "NamespaceReconcileFailed" // ProjectEventNamespaceReconcileSuccessful indicates that the namespace reconciliation has succeeded. ProjectEventNamespaceReconcileSuccessful = "NamespaceReconcileSuccessful" + // ProjectEventNamespaceNotEmpty indicates that the namespace cannot be released because it is not empty. + ProjectEventNamespaceNotEmpty = "NamespaceNotEmpty" // ProjectEventNamespaceDeletionFailed indicates that the namespace deletion failed. ProjectEventNamespaceDeletionFailed = "NamespaceDeletionFailed" // ProjectEventNamespaceMarkedForDeletion indicates that the namespace has been successfully marked for deletion. diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/types_seed.go b/vendor/github.com/gardener/gardener/pkg/apis/core/types_seed.go index 6619ff8a..ba37874d 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/types_seed.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/types_seed.go @@ -47,6 +47,14 @@ type SeedList struct { Items []Seed } +// SeedTemplate is a template for creating a Seed object. +type SeedTemplate struct { + // Standard object metadata. + metav1.ObjectMeta + // Specification of the desired behavior of the Seed. + Spec SeedSpec +} + // SeedSpec is the specification of a Seed. type SeedSpec struct { // Backup holds the object store configuration for the backups of shoot (currently only etcd). @@ -268,6 +276,8 @@ type SeedVolumeProvider struct { } const ( + // SeedBackupBucketsReady is a constant for a condition type indicating that associated BackupBuckets are ready. + SeedBackupBucketsReady ConditionType = "BackupBucketsReady" // SeedBootstrapped is a constant for a condition type indicating that the seed cluster has been // bootstrapped. SeedBootstrapped ConditionType = "Bootstrapped" diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/types_shoot.go b/vendor/github.com/gardener/gardener/pkg/apis/core/types_shoot.go index 028663d2..1942b59d 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/types_shoot.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/types_shoot.go @@ -50,6 +50,14 @@ type ShootList struct { Items []Shoot } +// ShootTemplate is a template for creating a Shoot object. +type ShootTemplate struct { + // Standard object metadata. + metav1.ObjectMeta + // Specification of the desired behavior of the Shoot. + Spec ShootSpec +} + // ShootSpec is the specification of a Shoot. type ShootSpec struct { // Addons contains information about enabled/disabled addons and their configuration. @@ -162,7 +170,7 @@ const ( // NginxIngress describes configuration values for the nginx-ingress addon. type NginxIngress struct { Addon - // LoadBalancerSourceRanges is list of whitelist IP sources for NginxIngress + // LoadBalancerSourceRanges is list of allowed IP sources for NginxIngress LoadBalancerSourceRanges []string // Config contains custom configuration for the nginx-ingress-controller configuration. // See https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/configmap.md#configuration-options @@ -834,6 +842,7 @@ type WorkerSystemComponents struct { // WorkerKubernetes contains configuration for Kubernetes components related to this worker pool. type WorkerKubernetes struct { // Kubelet contains configuration settings for all kubelets of this worker pool. + // If set, all `spec.kubernetes.kubelet` settings will be overwritten for this worker pool (no merge of settings). Kubelet *KubeletConfig } diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/generated.proto b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/generated.proto index 5234fa25..c9f83d6b 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/generated.proto +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/generated.proto @@ -16,7 +16,7 @@ limitations under the License. // This file was autogenerated by go-to-protobuf. Do not edit it manually! -syntax = 'proto2'; +syntax = "proto2"; package github.com.gardener.gardener.pkg.apis.core.v1alpha1; @@ -1288,7 +1288,7 @@ message Networking { message NginxIngress { optional Addon addon = 4; - // LoadBalancerSourceRanges is list of whitelist IP sources for NginxIngress + // LoadBalancerSourceRanges is list of allowed IP sources for NginxIngress // +optional repeated string loadBalancerSourceRanges = 1; @@ -2332,6 +2332,7 @@ message Worker { // WorkerKubernetes contains configuration for Kubernetes components related to this worker pool. message WorkerKubernetes { // Kubelet contains configuration settings for all kubelets of this worker pool. + // If set, all `spec.kubernetes.kubelet` settings will be overwritten for this worker pool (no merge of settings). // +optional optional KubeletConfig kubelet = 1; } diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_common.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_common.go index 17bd41c3..2ef77f8d 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_common.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_common.go @@ -21,19 +21,26 @@ type ErrorCode string const ( // ErrorInfraUnauthorized indicates that the last error occurred due to invalid infrastructure credentials. + // It is classified as a non-retryable error code. ErrorInfraUnauthorized ErrorCode = "ERR_INFRA_UNAUTHORIZED" // ErrorInfraInsufficientPrivileges indicates that the last error occurred due to insufficient infrastructure privileges. + // It is classified as a non-retryable error code. ErrorInfraInsufficientPrivileges ErrorCode = "ERR_INFRA_INSUFFICIENT_PRIVILEGES" // ErrorInfraQuotaExceeded indicates that the last error occurred due to infrastructure quota limits. + // It is classified as a non-retryable error code. ErrorInfraQuotaExceeded ErrorCode = "ERR_INFRA_QUOTA_EXCEEDED" // ErrorInfraDependencies indicates that the last error occurred due to dependent objects on the infrastructure level. + // It is classified as a non-retryable error code. ErrorInfraDependencies ErrorCode = "ERR_INFRA_DEPENDENCIES" // ErrorInfraResourcesDepleted indicates that the last error occurred due to depleted resource in the infrastructure. ErrorInfraResourcesDepleted ErrorCode = "ERR_INFRA_RESOURCES_DEPLETED" // ErrorCleanupClusterResources indicates that the last error occurred due to resources in the cluster that are stuck in deletion. ErrorCleanupClusterResources ErrorCode = "ERR_CLEANUP_CLUSTER_RESOURCES" // ErrorConfigurationProblem indicates that the last error occurred due to a configuration problem. + // It is classified as a non-retryable error code. ErrorConfigurationProblem ErrorCode = "ERR_CONFIGURATION_PROBLEM" + // ErrorRetryableConfigurationProblem indicates that the last error occurred due to a retryable configuration problem. + ErrorRetryableConfigurationProblem ErrorCode = "ERR_RETRYABLE_CONFIGURATION_PROBLEM" ) // LastError indicates the last occurred error for an operation on a resource. diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_project.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_project.go index b09dee7e..b48ec447 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_project.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_project.go @@ -167,6 +167,8 @@ const ( ProjectEventNamespaceReconcileFailed = "NamespaceReconcileFailed" // ProjectEventNamespaceReconcileSuccessful indicates that the namespace reconciliation has succeeded. ProjectEventNamespaceReconcileSuccessful = "NamespaceReconcileSuccessful" + // ProjectEventNamespaceNotEmpty indicates that the namespace cannot be released because it is not empty. + ProjectEventNamespaceNotEmpty = "NamespaceNotEmpty" // ProjectEventNamespaceDeletionFailed indicates that the namespace deletion failed. ProjectEventNamespaceDeletionFailed = "NamespaceDeletionFailed" // ProjectEventNamespaceMarkedForDeletion indicates that the namespace has been successfully marked for deletion. diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_shoot.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_shoot.go index 881c5947..083e0677 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_shoot.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_shoot.go @@ -193,7 +193,7 @@ const ( // NginxIngress describes configuration values for the nginx-ingress addon. type NginxIngress struct { Addon `json:",inline" protobuf:"bytes,4,opt,name=addon"` - // LoadBalancerSourceRanges is list of whitelist IP sources for NginxIngress + // LoadBalancerSourceRanges is list of allowed IP sources for NginxIngress // +optional LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty" protobuf:"bytes,1,rep,name=loadBalancerSourceRanges"` // Config contains custom configuration for the nginx-ingress-controller configuration. @@ -1038,6 +1038,7 @@ type WorkerSystemComponents struct { // WorkerKubernetes contains configuration for Kubernetes components related to this worker pool. type WorkerKubernetes struct { // Kubelet contains configuration settings for all kubelets of this worker pool. + // If set, all `spec.kubernetes.kubelet` settings will be overwritten for this worker pool (no merge of settings). // +optional Kubelet *KubeletConfig `json:"kubelet,omitempty" protobuf:"bytes,1,opt,name=kubelet"` } diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/constants/types_constants.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/constants/types_constants.go index 29645e7f..c386ce21 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/constants/types_constants.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/constants/types_constants.go @@ -152,6 +152,8 @@ const ( GardenRoleMonitoring = "monitoring" // GardenRoleOptionalAddon is the value of the GardenRole key indicating type 'optional-addon'. GardenRoleOptionalAddon = "optional-addon" + // GardenRoleCloudConfig is the value of the GardenRole key indicating type 'cloud-config'. + GardenRoleCloudConfig = "cloud-config" // GardenRoleKubeconfig is the value of the GardenRole key indicating type 'kubeconfig'. GardenRoleKubeconfig = "kubeconfig" // GardenRoleSSHKeyPair is the value of the GardenRole key indicating type 'ssh-keypair'. @@ -165,6 +167,8 @@ const ( // ShootUID is an annotation key for the shoot namespace in the seed cluster, // which value will be the value of `shoot.status.uid` ShootUID = "shoot.gardener.cloud/uid" + // ShootPurpose is a constant for the shoot purpose. + ShootPurpose = "shoot.gardener.cloud/purpose" // SeedResourceManagerClass is the resource-class managed by the Gardener-Resource-Manager // instance in the garden namespace on the seeds. @@ -253,6 +257,8 @@ const ( // AnnotationShootUseAsSeed is a constant for an annotation on a Shoot resource indicating that the Shoot shall be registered as Seed in the // Garden cluster once successfully created. AnnotationShootUseAsSeed = "shoot.gardener.cloud/use-as-seed" + // AnnotationManagedSeedAPIServer is a constant for an annotation on a Shoot resource containing the API server settings for a managed seed. + AnnotationManagedSeedAPIServer = "shoot.gardener.cloud/managed-seed-api-server" // AnnotationShootIgnoreAlerts is the key for an annotation of a Shoot cluster whose value indicates // if alerts for this cluster should be ignored AnnotationShootIgnoreAlerts = "shoot.gardener.cloud/ignore-alerts" @@ -327,4 +333,18 @@ const ( IngressKindNginx = "nginx" // ShootNginxIngressClass defines the ingress class for the seed nginx ingress controller ShootNginxIngressClass = "nginx" + + // SeedsGroup is the identity group for gardenlets when authenticating to the API server. + SeedsGroup = "gardener.cloud:system:seeds" + // SeedUserNamePrefix is the identity user name prefix for gardenlets when authenticating to the API server. + SeedUserNamePrefix = "gardener.cloud:system:seed:" + // SeedUserNameSuffixAmbiguous is the default seed name in case the gardenlet config.SeedConfig is not set + SeedUserNameSuffixAmbiguous = "" ) + +// ControlPlaneSecretRoles contains all role values used for control plane secrets synced to the Garden cluster. +var ControlPlaneSecretRoles = []string{ + GardenRoleKubeconfig, + GardenRoleSSHKeyPair, + GardenRoleMonitoring, +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/generated.pb.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/generated.pb.go index 8f09d53e..d99627bd 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/generated.pb.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/generated.pb.go @@ -3245,10 +3245,38 @@ func (m *SeedTaint) XXX_DiscardUnknown() { var xxx_messageInfo_SeedTaint proto.InternalMessageInfo +func (m *SeedTemplate) Reset() { *m = SeedTemplate{} } +func (*SeedTemplate) ProtoMessage() {} +func (*SeedTemplate) Descriptor() ([]byte, []int) { + return fileDescriptor_ca37af0df9a5bbd2, []int{114} +} +func (m *SeedTemplate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SeedTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SeedTemplate) XXX_Merge(src proto.Message) { + xxx_messageInfo_SeedTemplate.Merge(m, src) +} +func (m *SeedTemplate) XXX_Size() int { + return m.Size() +} +func (m *SeedTemplate) XXX_DiscardUnknown() { + xxx_messageInfo_SeedTemplate.DiscardUnknown(m) +} + +var xxx_messageInfo_SeedTemplate proto.InternalMessageInfo + func (m *SeedVolume) Reset() { *m = SeedVolume{} } func (*SeedVolume) ProtoMessage() {} func (*SeedVolume) Descriptor() ([]byte, []int) { - return fileDescriptor_ca37af0df9a5bbd2, []int{114} + return fileDescriptor_ca37af0df9a5bbd2, []int{115} } func (m *SeedVolume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3276,7 +3304,7 @@ var xxx_messageInfo_SeedVolume proto.InternalMessageInfo func (m *SeedVolumeProvider) Reset() { *m = SeedVolumeProvider{} } func (*SeedVolumeProvider) ProtoMessage() {} func (*SeedVolumeProvider) Descriptor() ([]byte, []int) { - return fileDescriptor_ca37af0df9a5bbd2, []int{115} + return fileDescriptor_ca37af0df9a5bbd2, []int{116} } func (m *SeedVolumeProvider) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3304,7 +3332,7 @@ var xxx_messageInfo_SeedVolumeProvider proto.InternalMessageInfo func (m *ServiceAccountConfig) Reset() { *m = ServiceAccountConfig{} } func (*ServiceAccountConfig) ProtoMessage() {} func (*ServiceAccountConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_ca37af0df9a5bbd2, []int{116} + return fileDescriptor_ca37af0df9a5bbd2, []int{117} } func (m *ServiceAccountConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3332,7 +3360,7 @@ var xxx_messageInfo_ServiceAccountConfig proto.InternalMessageInfo func (m *Shoot) Reset() { *m = Shoot{} } func (*Shoot) ProtoMessage() {} func (*Shoot) Descriptor() ([]byte, []int) { - return fileDescriptor_ca37af0df9a5bbd2, []int{117} + return fileDescriptor_ca37af0df9a5bbd2, []int{118} } func (m *Shoot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3360,7 +3388,7 @@ var xxx_messageInfo_Shoot proto.InternalMessageInfo func (m *ShootList) Reset() { *m = ShootList{} } func (*ShootList) ProtoMessage() {} func (*ShootList) Descriptor() ([]byte, []int) { - return fileDescriptor_ca37af0df9a5bbd2, []int{118} + return fileDescriptor_ca37af0df9a5bbd2, []int{119} } func (m *ShootList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3388,7 +3416,7 @@ var xxx_messageInfo_ShootList proto.InternalMessageInfo func (m *ShootMachineImage) Reset() { *m = ShootMachineImage{} } func (*ShootMachineImage) ProtoMessage() {} func (*ShootMachineImage) Descriptor() ([]byte, []int) { - return fileDescriptor_ca37af0df9a5bbd2, []int{119} + return fileDescriptor_ca37af0df9a5bbd2, []int{120} } func (m *ShootMachineImage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3416,7 +3444,7 @@ var xxx_messageInfo_ShootMachineImage proto.InternalMessageInfo func (m *ShootNetworks) Reset() { *m = ShootNetworks{} } func (*ShootNetworks) ProtoMessage() {} func (*ShootNetworks) Descriptor() ([]byte, []int) { - return fileDescriptor_ca37af0df9a5bbd2, []int{120} + return fileDescriptor_ca37af0df9a5bbd2, []int{121} } func (m *ShootNetworks) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3444,7 +3472,7 @@ var xxx_messageInfo_ShootNetworks proto.InternalMessageInfo func (m *ShootSpec) Reset() { *m = ShootSpec{} } func (*ShootSpec) ProtoMessage() {} func (*ShootSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_ca37af0df9a5bbd2, []int{121} + return fileDescriptor_ca37af0df9a5bbd2, []int{122} } func (m *ShootSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3472,7 +3500,7 @@ var xxx_messageInfo_ShootSpec proto.InternalMessageInfo func (m *ShootStatus) Reset() { *m = ShootStatus{} } func (*ShootStatus) ProtoMessage() {} func (*ShootStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ca37af0df9a5bbd2, []int{122} + return fileDescriptor_ca37af0df9a5bbd2, []int{123} } func (m *ShootStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3497,10 +3525,38 @@ func (m *ShootStatus) XXX_DiscardUnknown() { var xxx_messageInfo_ShootStatus proto.InternalMessageInfo +func (m *ShootTemplate) Reset() { *m = ShootTemplate{} } +func (*ShootTemplate) ProtoMessage() {} +func (*ShootTemplate) Descriptor() ([]byte, []int) { + return fileDescriptor_ca37af0df9a5bbd2, []int{124} +} +func (m *ShootTemplate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ShootTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ShootTemplate) XXX_Merge(src proto.Message) { + xxx_messageInfo_ShootTemplate.Merge(m, src) +} +func (m *ShootTemplate) XXX_Size() int { + return m.Size() +} +func (m *ShootTemplate) XXX_DiscardUnknown() { + xxx_messageInfo_ShootTemplate.DiscardUnknown(m) +} + +var xxx_messageInfo_ShootTemplate proto.InternalMessageInfo + func (m *Toleration) Reset() { *m = Toleration{} } func (*Toleration) ProtoMessage() {} func (*Toleration) Descriptor() ([]byte, []int) { - return fileDescriptor_ca37af0df9a5bbd2, []int{123} + return fileDescriptor_ca37af0df9a5bbd2, []int{125} } func (m *Toleration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3528,7 +3584,7 @@ var xxx_messageInfo_Toleration proto.InternalMessageInfo func (m *VerticalPodAutoscaler) Reset() { *m = VerticalPodAutoscaler{} } func (*VerticalPodAutoscaler) ProtoMessage() {} func (*VerticalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptor_ca37af0df9a5bbd2, []int{124} + return fileDescriptor_ca37af0df9a5bbd2, []int{126} } func (m *VerticalPodAutoscaler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3556,7 +3612,7 @@ var xxx_messageInfo_VerticalPodAutoscaler proto.InternalMessageInfo func (m *Volume) Reset() { *m = Volume{} } func (*Volume) ProtoMessage() {} func (*Volume) Descriptor() ([]byte, []int) { - return fileDescriptor_ca37af0df9a5bbd2, []int{125} + return fileDescriptor_ca37af0df9a5bbd2, []int{127} } func (m *Volume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3584,7 +3640,7 @@ var xxx_messageInfo_Volume proto.InternalMessageInfo func (m *VolumeType) Reset() { *m = VolumeType{} } func (*VolumeType) ProtoMessage() {} func (*VolumeType) Descriptor() ([]byte, []int) { - return fileDescriptor_ca37af0df9a5bbd2, []int{126} + return fileDescriptor_ca37af0df9a5bbd2, []int{128} } func (m *VolumeType) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3612,7 +3668,7 @@ var xxx_messageInfo_VolumeType proto.InternalMessageInfo func (m *WatchCacheSizes) Reset() { *m = WatchCacheSizes{} } func (*WatchCacheSizes) ProtoMessage() {} func (*WatchCacheSizes) Descriptor() ([]byte, []int) { - return fileDescriptor_ca37af0df9a5bbd2, []int{127} + return fileDescriptor_ca37af0df9a5bbd2, []int{129} } func (m *WatchCacheSizes) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3640,7 +3696,7 @@ var xxx_messageInfo_WatchCacheSizes proto.InternalMessageInfo func (m *Worker) Reset() { *m = Worker{} } func (*Worker) ProtoMessage() {} func (*Worker) Descriptor() ([]byte, []int) { - return fileDescriptor_ca37af0df9a5bbd2, []int{128} + return fileDescriptor_ca37af0df9a5bbd2, []int{130} } func (m *Worker) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3668,7 +3724,7 @@ var xxx_messageInfo_Worker proto.InternalMessageInfo func (m *WorkerKubernetes) Reset() { *m = WorkerKubernetes{} } func (*WorkerKubernetes) ProtoMessage() {} func (*WorkerKubernetes) Descriptor() ([]byte, []int) { - return fileDescriptor_ca37af0df9a5bbd2, []int{129} + return fileDescriptor_ca37af0df9a5bbd2, []int{131} } func (m *WorkerKubernetes) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3696,7 +3752,7 @@ var xxx_messageInfo_WorkerKubernetes proto.InternalMessageInfo func (m *WorkerSystemComponents) Reset() { *m = WorkerSystemComponents{} } func (*WorkerSystemComponents) ProtoMessage() {} func (*WorkerSystemComponents) Descriptor() ([]byte, []int) { - return fileDescriptor_ca37af0df9a5bbd2, []int{130} + return fileDescriptor_ca37af0df9a5bbd2, []int{132} } func (m *WorkerSystemComponents) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3846,6 +3902,7 @@ func init() { proto.RegisterMapType((k8s_io_api_core_v1.ResourceList)(nil), "github.com.gardener.gardener.pkg.apis.core.v1beta1.SeedStatus.AllocatableEntry") proto.RegisterMapType((k8s_io_api_core_v1.ResourceList)(nil), "github.com.gardener.gardener.pkg.apis.core.v1beta1.SeedStatus.CapacityEntry") proto.RegisterType((*SeedTaint)(nil), "github.com.gardener.gardener.pkg.apis.core.v1beta1.SeedTaint") + proto.RegisterType((*SeedTemplate)(nil), "github.com.gardener.gardener.pkg.apis.core.v1beta1.SeedTemplate") proto.RegisterType((*SeedVolume)(nil), "github.com.gardener.gardener.pkg.apis.core.v1beta1.SeedVolume") proto.RegisterType((*SeedVolumeProvider)(nil), "github.com.gardener.gardener.pkg.apis.core.v1beta1.SeedVolumeProvider") proto.RegisterType((*ServiceAccountConfig)(nil), "github.com.gardener.gardener.pkg.apis.core.v1beta1.ServiceAccountConfig") @@ -3855,6 +3912,7 @@ func init() { proto.RegisterType((*ShootNetworks)(nil), "github.com.gardener.gardener.pkg.apis.core.v1beta1.ShootNetworks") proto.RegisterType((*ShootSpec)(nil), "github.com.gardener.gardener.pkg.apis.core.v1beta1.ShootSpec") proto.RegisterType((*ShootStatus)(nil), "github.com.gardener.gardener.pkg.apis.core.v1beta1.ShootStatus") + proto.RegisterType((*ShootTemplate)(nil), "github.com.gardener.gardener.pkg.apis.core.v1beta1.ShootTemplate") proto.RegisterType((*Toleration)(nil), "github.com.gardener.gardener.pkg.apis.core.v1beta1.Toleration") proto.RegisterType((*VerticalPodAutoscaler)(nil), "github.com.gardener.gardener.pkg.apis.core.v1beta1.VerticalPodAutoscaler") proto.RegisterType((*Volume)(nil), "github.com.gardener.gardener.pkg.apis.core.v1beta1.Volume") @@ -3872,561 +3930,563 @@ func init() { } var fileDescriptor_ca37af0df9a5bbd2 = []byte{ - // 8855 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x7d, 0x6d, 0x8c, 0x24, 0xc7, - 0x75, 0x18, 0x7b, 0xf6, 0x6b, 0xf6, 0xcd, 0x7e, 0xd6, 0x7d, 0x70, 0xb9, 0x24, 0x6f, 0x4e, 0x2d, - 0x51, 0x20, 0x23, 0x69, 0xcf, 0xa4, 0x24, 0x53, 0x24, 0x45, 0x91, 0x3b, 0x33, 0x7b, 0x77, 0xa3, - 0xbb, 0xdd, 0x1b, 0xd6, 0xdc, 0x1e, 0x25, 0x3a, 0x61, 0xd4, 0xdb, 0x5d, 0x3b, 0xdb, 0xdc, 0x9e, - 0xee, 0x61, 0x77, 0xcf, 0xde, 0xee, 0xc9, 0x81, 0x14, 0x21, 0xb2, 0xf3, 0xe1, 0x38, 0x86, 0x63, - 0x45, 0x88, 0x95, 0xc0, 0x32, 0x82, 0xc4, 0x08, 0x1c, 0xc8, 0x0e, 0x12, 0x19, 0x09, 0x92, 0x00, - 0x86, 0x8d, 0x40, 0xb2, 0x91, 0x00, 0x42, 0x10, 0x21, 0x0a, 0x12, 0xaf, 0xa2, 0x0d, 0x20, 0x24, - 0x48, 0xfe, 0x19, 0xf9, 0x73, 0x30, 0x10, 0xa3, 0x3e, 0xba, 0xba, 0xba, 0xa7, 0x7b, 0x77, 0xb6, - 0x67, 0xf7, 0x48, 0xfe, 0xda, 0x9d, 0x7a, 0x55, 0xef, 0x55, 0x57, 0xbd, 0x7a, 0xf5, 0xde, 0xab, - 0x57, 0xaf, 0xa0, 0xd6, 0xb1, 0xc3, 0x9d, 0xfe, 0xd6, 0x8a, 0xe9, 0x75, 0xaf, 0x75, 0x0c, 0xdf, - 0x22, 0x2e, 0xf1, 0xe3, 0x7f, 0x7a, 0xbb, 0x9d, 0x6b, 0x46, 0xcf, 0x0e, 0xae, 0x99, 0x9e, 0x4f, - 0xae, 0xed, 0x3d, 0xbf, 0x45, 0x42, 0xe3, 0xf9, 0x6b, 0x1d, 0x0a, 0x33, 0x42, 0x62, 0xad, 0xf4, - 0x7c, 0x2f, 0xf4, 0xd0, 0x0b, 0x31, 0x8e, 0x95, 0xa8, 0x69, 0xfc, 0x4f, 0x6f, 0xb7, 0xb3, 0x42, - 0x71, 0xac, 0x50, 0x1c, 0x2b, 0x02, 0xc7, 0xf2, 0x27, 0x54, 0xba, 0x5e, 0xc7, 0xbb, 0xc6, 0x50, - 0x6d, 0xf5, 0xb7, 0xd9, 0x2f, 0xf6, 0x83, 0xfd, 0xc7, 0x49, 0x2c, 0x3f, 0xb7, 0xfb, 0x99, 0x60, - 0xc5, 0xf6, 0x68, 0x67, 0xae, 0x19, 0xfd, 0xd0, 0x0b, 0x4c, 0xc3, 0xb1, 0xdd, 0xce, 0xb5, 0xbd, - 0x81, 0xde, 0x2c, 0xeb, 0x4a, 0x55, 0xd1, 0xed, 0x63, 0xeb, 0xf8, 0x5b, 0x86, 0x99, 0x55, 0xe7, - 0x53, 0x71, 0x9d, 0xae, 0x61, 0xee, 0xd8, 0x2e, 0xf1, 0x0f, 0xa2, 0x01, 0xb9, 0xe6, 0x93, 0xc0, - 0xeb, 0xfb, 0x26, 0x39, 0x55, 0xab, 0xe0, 0x5a, 0x97, 0x84, 0x46, 0x16, 0xad, 0x6b, 0x79, 0xad, - 0xfc, 0xbe, 0x1b, 0xda, 0xdd, 0x41, 0x32, 0x3f, 0x7b, 0x52, 0x83, 0xc0, 0xdc, 0x21, 0x5d, 0x63, - 0xa0, 0xdd, 0x27, 0xf3, 0xda, 0xf5, 0x43, 0xdb, 0xb9, 0x66, 0xbb, 0x61, 0x10, 0xfa, 0xe9, 0x46, - 0xfa, 0x0b, 0x30, 0xb1, 0x6a, 0x59, 0x9e, 0x8b, 0x9e, 0x83, 0x29, 0xe2, 0x1a, 0x5b, 0x0e, 0xb1, - 0x96, 0xb4, 0xab, 0xda, 0xb3, 0xe5, 0xda, 0xfc, 0xf7, 0x0f, 0xab, 0x8f, 0x1d, 0x1d, 0x56, 0xa7, - 0xd6, 0x78, 0x31, 0x8e, 0xe0, 0xfa, 0x37, 0x4a, 0x30, 0xc9, 0x1a, 0x05, 0xe8, 0x57, 0x35, 0xb8, - 0xb0, 0xdb, 0xdf, 0x22, 0xbe, 0x4b, 0x42, 0x12, 0x34, 0x8c, 0x60, 0x67, 0xcb, 0x33, 0x7c, 0x8e, - 0xa2, 0xf2, 0xc2, 0x8d, 0x95, 0xd3, 0x73, 0xcf, 0xca, 0xad, 0x41, 0x74, 0xb5, 0xc7, 0x8f, 0x0e, - 0xab, 0x17, 0x32, 0x00, 0x38, 0x8b, 0x38, 0xda, 0x83, 0x19, 0xb7, 0x63, 0xbb, 0xfb, 0x4d, 0xb7, - 0xe3, 0x93, 0x20, 0x58, 0x2a, 0xb1, 0xce, 0xbc, 0x5e, 0xa4, 0x33, 0x1b, 0x0a, 0x9e, 0xda, 0xc2, - 0xd1, 0x61, 0x75, 0x46, 0x2d, 0xc1, 0x09, 0x3a, 0xfa, 0x2f, 0x68, 0x30, 0xbf, 0x6a, 0x75, 0xed, - 0x20, 0xb0, 0x3d, 0xb7, 0xe5, 0xf4, 0x3b, 0xb6, 0x8b, 0xae, 0xc2, 0xb8, 0x6b, 0x74, 0x09, 0x1b, - 0x90, 0xe9, 0xda, 0x8c, 0x18, 0xd3, 0xf1, 0x0d, 0xa3, 0x4b, 0x30, 0x83, 0xa0, 0x37, 0x60, 0xd2, - 0xf4, 0xdc, 0x6d, 0xbb, 0x23, 0xfa, 0xf9, 0x89, 0x15, 0x3e, 0x8f, 0x2b, 0xea, 0x3c, 0xb2, 0xee, - 0x89, 0xf9, 0x5f, 0xc1, 0xc6, 0xfd, 0xb5, 0xfd, 0x90, 0xb8, 0x94, 0x4c, 0x0d, 0x8e, 0x0e, 0xab, - 0x93, 0x75, 0x86, 0x00, 0x0b, 0x44, 0xfa, 0x75, 0x28, 0xaf, 0x3a, 0xc4, 0x0f, 0x6d, 0xb7, 0x83, - 0x5e, 0x86, 0x39, 0xd2, 0x35, 0x6c, 0x07, 0x13, 0x93, 0xd8, 0x7b, 0xc4, 0x0f, 0x96, 0xb4, 0xab, - 0x63, 0xcf, 0x4e, 0xd7, 0xd0, 0xd1, 0x61, 0x75, 0x6e, 0x2d, 0x01, 0xc1, 0xa9, 0x9a, 0xfa, 0x5f, - 0xd5, 0xa0, 0xb2, 0xda, 0xb7, 0xec, 0x90, 0xe3, 0x47, 0x3e, 0x54, 0x0c, 0xfa, 0xb3, 0xe5, 0x39, - 0xb6, 0x79, 0x20, 0x26, 0xf9, 0xb5, 0x22, 0xe3, 0xba, 0x1a, 0xa3, 0xa9, 0xcd, 0x1f, 0x1d, 0x56, - 0x2b, 0x4a, 0x01, 0x56, 0x89, 0xe8, 0x3b, 0xa0, 0xc2, 0xd0, 0x17, 0x61, 0x86, 0x7f, 0xe4, 0xba, - 0xd1, 0xc3, 0x64, 0x5b, 0xf4, 0xe1, 0xc3, 0xca, 0x98, 0x45, 0x84, 0x56, 0xee, 0x6c, 0xbd, 0x43, - 0xcc, 0x10, 0x93, 0x6d, 0xe2, 0x13, 0xd7, 0x24, 0x7c, 0xfa, 0xea, 0x4a, 0x63, 0x9c, 0x40, 0xa5, - 0xff, 0x58, 0x83, 0x85, 0xd5, 0x3d, 0xc3, 0x76, 0x8c, 0x2d, 0xdb, 0xb1, 0xc3, 0x83, 0xb7, 0x3c, - 0x97, 0x0c, 0x31, 0x7f, 0x9b, 0xf0, 0x78, 0xdf, 0x35, 0x78, 0x3b, 0x87, 0xac, 0xf3, 0x19, 0xbb, - 0x7b, 0xd0, 0x23, 0x94, 0xf1, 0xe8, 0x48, 0x3f, 0x79, 0x74, 0x58, 0x7d, 0x7c, 0x33, 0xbb, 0x0a, - 0xce, 0x6b, 0x8b, 0x30, 0x5c, 0x56, 0x40, 0xf7, 0x3c, 0xa7, 0xdf, 0x15, 0x58, 0xc7, 0x18, 0xd6, - 0xe5, 0xa3, 0xc3, 0xea, 0xe5, 0xcd, 0xcc, 0x1a, 0x38, 0xa7, 0xa5, 0xfe, 0xfd, 0x12, 0xcc, 0xd4, - 0x0c, 0x73, 0xb7, 0xdf, 0xab, 0xf5, 0xcd, 0x5d, 0x12, 0xa2, 0x2f, 0x41, 0x99, 0x8a, 0x2d, 0xcb, - 0x08, 0x0d, 0x31, 0x92, 0x3f, 0x93, 0xcb, 0x7d, 0x6c, 0x12, 0x69, 0xed, 0x78, 0x6c, 0xd7, 0x49, - 0x68, 0xd4, 0x90, 0x18, 0x13, 0x88, 0xcb, 0xb0, 0xc4, 0x8a, 0xb6, 0x61, 0x3c, 0xe8, 0x11, 0x53, - 0xf0, 0x76, 0xa3, 0x08, 0xaf, 0xa8, 0x3d, 0x6e, 0xf7, 0x88, 0x19, 0xcf, 0x02, 0xfd, 0x85, 0x19, - 0x7e, 0xe4, 0xc2, 0x64, 0x10, 0x1a, 0x61, 0x9f, 0x0e, 0x0f, 0xa5, 0x74, 0x7d, 0x64, 0x4a, 0x0c, - 0x5b, 0x6d, 0x4e, 0xd0, 0x9a, 0xe4, 0xbf, 0xb1, 0xa0, 0xa2, 0xff, 0x17, 0x0d, 0x16, 0xd4, 0xea, - 0xb7, 0xed, 0x20, 0x44, 0x7f, 0x71, 0x60, 0x38, 0x57, 0x86, 0x1b, 0x4e, 0xda, 0x9a, 0x0d, 0xe6, - 0x82, 0x20, 0x57, 0x8e, 0x4a, 0x94, 0xa1, 0x24, 0x30, 0x61, 0x87, 0xa4, 0xcb, 0xd9, 0xaa, 0xa0, - 0x3c, 0x53, 0xbb, 0x5c, 0x9b, 0x15, 0xc4, 0x26, 0x9a, 0x14, 0x2d, 0xe6, 0xd8, 0xf5, 0x2f, 0xc1, - 0x45, 0xb5, 0x56, 0xcb, 0xf7, 0xf6, 0x6c, 0x8b, 0xf8, 0x74, 0x25, 0x84, 0x07, 0xbd, 0x81, 0x95, - 0x40, 0x39, 0x0b, 0x33, 0x08, 0xfa, 0x28, 0x4c, 0xfa, 0xa4, 0x63, 0x7b, 0x2e, 0x9b, 0xed, 0xe9, - 0x78, 0xec, 0x30, 0x2b, 0xc5, 0x02, 0xaa, 0xff, 0xbf, 0x52, 0x72, 0xec, 0xe8, 0x34, 0xa2, 0x3d, - 0x28, 0xf7, 0x04, 0x29, 0x31, 0x76, 0x37, 0x47, 0xfd, 0xc0, 0xa8, 0xeb, 0xf1, 0xa8, 0x46, 0x25, - 0x58, 0xd2, 0x42, 0x36, 0xcc, 0x45, 0xff, 0xd7, 0x47, 0x10, 0xc3, 0x4c, 0x9c, 0xb6, 0x12, 0x88, - 0x70, 0x0a, 0x31, 0xba, 0x0b, 0xd3, 0x01, 0x31, 0x7d, 0x42, 0x65, 0x92, 0x60, 0xd3, 0x4c, 0xc1, - 0xd5, 0x8e, 0x2a, 0x09, 0xc1, 0xb5, 0x28, 0xba, 0x3f, 0x2d, 0x01, 0x38, 0x46, 0x84, 0x9e, 0x85, - 0x72, 0x40, 0x88, 0x45, 0x25, 0xd2, 0xd2, 0x38, 0x9f, 0x1b, 0xfa, 0xa9, 0x6d, 0x51, 0x86, 0x25, - 0x54, 0xff, 0xf6, 0x38, 0xa0, 0x41, 0x16, 0x57, 0x47, 0x80, 0x97, 0x88, 0xf1, 0x1f, 0x65, 0x04, - 0xc4, 0x6a, 0x49, 0x21, 0x46, 0x0f, 0x60, 0xd6, 0x31, 0x82, 0xf0, 0x4e, 0x8f, 0xea, 0x20, 0x11, - 0xa3, 0x54, 0x5e, 0x58, 0x2d, 0x32, 0xd3, 0xb7, 0x55, 0x44, 0xb5, 0xc5, 0xa3, 0xc3, 0xea, 0x6c, - 0xa2, 0x08, 0x27, 0x49, 0xa1, 0x77, 0x60, 0x9a, 0x16, 0xac, 0xf9, 0xbe, 0xe7, 0x8b, 0xd1, 0x7f, - 0xb5, 0x28, 0x5d, 0x86, 0xa4, 0x36, 0x4b, 0xe7, 0x44, 0xfe, 0xc4, 0x31, 0x7a, 0xf4, 0x79, 0x40, - 0xde, 0x56, 0x40, 0xfc, 0x3d, 0x62, 0xdd, 0xe0, 0x0a, 0x17, 0xfd, 0x58, 0x3a, 0x3b, 0x63, 0xb5, - 0x65, 0x31, 0x9b, 0xe8, 0xce, 0x40, 0x0d, 0x9c, 0xd1, 0x0a, 0xed, 0x02, 0x92, 0x4a, 0x9b, 0x64, - 0x80, 0xa5, 0x89, 0xe1, 0xd9, 0xe7, 0x32, 0x25, 0x76, 0x63, 0x00, 0x05, 0xce, 0x40, 0xab, 0xff, - 0xfb, 0x12, 0x54, 0x38, 0x8b, 0xac, 0xb9, 0xa1, 0x7f, 0xf0, 0x08, 0x36, 0x08, 0x92, 0xd8, 0x20, - 0xea, 0xc5, 0xd7, 0x3c, 0xeb, 0x70, 0xee, 0xfe, 0xd0, 0x4d, 0xed, 0x0f, 0x6b, 0xa3, 0x12, 0x3a, - 0x7e, 0x7b, 0xf8, 0xa1, 0x06, 0xf3, 0x4a, 0xed, 0x47, 0xb0, 0x3b, 0x58, 0xc9, 0xdd, 0xe1, 0xb5, - 0x11, 0xbf, 0x2f, 0x67, 0x73, 0xf0, 0x12, 0x9f, 0xc5, 0x04, 0xf7, 0x0b, 0x00, 0x5b, 0x4c, 0x9c, - 0x6c, 0xc4, 0x7a, 0x92, 0x9c, 0xf2, 0x9a, 0x84, 0x60, 0xa5, 0x56, 0x42, 0x66, 0x95, 0x8e, 0x95, - 0x59, 0xdf, 0x2b, 0xc1, 0xe2, 0xc0, 0xb0, 0x0f, 0xca, 0x11, 0xed, 0x3d, 0x92, 0x23, 0xa5, 0xf7, - 0x42, 0x8e, 0x8c, 0x15, 0x91, 0x23, 0xfa, 0x1f, 0x68, 0x30, 0x56, 0xc7, 0x4d, 0xf4, 0xb1, 0x84, - 0x46, 0xfb, 0xb8, 0xaa, 0xd1, 0x3e, 0x3c, 0xac, 0x4e, 0xd5, 0x71, 0x53, 0x51, 0x6e, 0xff, 0xb6, - 0x06, 0x8b, 0xa6, 0xe7, 0x86, 0x06, 0x65, 0x4d, 0xcc, 0xc5, 0x7e, 0xc4, 0x62, 0x85, 0x94, 0xb9, - 0x7a, 0x0a, 0x59, 0xed, 0x09, 0xd1, 0x81, 0xc5, 0x34, 0x24, 0xc0, 0x83, 0x94, 0xf5, 0x4d, 0x98, - 0xae, 0x3b, 0x5e, 0xdf, 0x6a, 0xba, 0xdb, 0xde, 0x19, 0x6a, 0x24, 0x3f, 0xd2, 0x60, 0x86, 0xe1, - 0x6d, 0xf9, 0xde, 0xb6, 0xed, 0x90, 0x0f, 0x86, 0x62, 0xac, 0xf6, 0x38, 0x4f, 0xf0, 0x31, 0x45, - 0x55, 0xad, 0xf8, 0x01, 0x51, 0x54, 0xd5, 0x2e, 0xe7, 0xc8, 0xa2, 0x6f, 0x4c, 0x25, 0xbf, 0x8c, - 0x49, 0xa3, 0x67, 0xa1, 0x6c, 0x1a, 0xb5, 0xbe, 0x6b, 0x39, 0x92, 0x2f, 0x68, 0x2f, 0xeb, 0xab, - 0xbc, 0x0c, 0x4b, 0x28, 0x7a, 0x00, 0x10, 0x3b, 0x0f, 0xc4, 0x34, 0x5c, 0x1f, 0xcd, 0x61, 0xd1, - 0x26, 0x21, 0xb5, 0xb9, 0x83, 0x78, 0xea, 0x63, 0x18, 0x56, 0xa8, 0xa1, 0xbf, 0x02, 0xb3, 0x62, - 0x90, 0x9b, 0x5d, 0xa3, 0x23, 0x6c, 0xba, 0x82, 0x23, 0xb5, 0xae, 0x20, 0xaa, 0x5d, 0x12, 0x84, - 0x67, 0xd5, 0xd2, 0x00, 0x27, 0xa9, 0xa1, 0x03, 0x98, 0xe9, 0xaa, 0x76, 0xea, 0x78, 0xf1, 0x2d, - 0x43, 0xb1, 0x59, 0x6b, 0x17, 0x05, 0xf1, 0x99, 0x84, 0x85, 0x9b, 0x20, 0x95, 0xa1, 0x6e, 0x4f, - 0x9c, 0x97, 0xba, 0x4d, 0x60, 0x8a, 0x2f, 0xef, 0x60, 0x69, 0x92, 0x7d, 0xe0, 0xcb, 0x45, 0x3e, - 0x90, 0x4b, 0x8a, 0xd8, 0x1b, 0xc6, 0x7f, 0x07, 0x38, 0xc2, 0x8d, 0xf6, 0x60, 0x86, 0xee, 0x56, - 0x6d, 0xe2, 0x10, 0x33, 0xf4, 0xfc, 0xa5, 0xa9, 0xe2, 0xde, 0xa6, 0xb6, 0x82, 0x87, 0xbb, 0x2b, - 0xd4, 0x12, 0x9c, 0xa0, 0x23, 0xa5, 0x5f, 0x39, 0x57, 0xfa, 0xf5, 0xa1, 0xb2, 0xa7, 0xf8, 0x0d, - 0xa6, 0xd9, 0x20, 0x7c, 0xae, 0x48, 0xc7, 0x62, 0x27, 0x42, 0xed, 0x82, 0x20, 0x54, 0x51, 0x1d, - 0x0e, 0x2a, 0x1d, 0xfd, 0x17, 0x27, 0x61, 0xb1, 0xee, 0xf4, 0x83, 0x90, 0xf8, 0xab, 0xc2, 0x9d, - 0x4b, 0x7c, 0xf4, 0x35, 0x0d, 0x2e, 0xb3, 0x7f, 0x1b, 0xde, 0x7d, 0xb7, 0x41, 0x1c, 0xe3, 0x60, - 0x75, 0x9b, 0xd6, 0xb0, 0xac, 0xd3, 0x49, 0xa0, 0x46, 0x5f, 0xec, 0xd4, 0xcc, 0x01, 0xd2, 0xce, - 0xc4, 0x88, 0x73, 0x28, 0xa1, 0xbf, 0xa5, 0xc1, 0x13, 0x19, 0xa0, 0x06, 0x71, 0x48, 0x48, 0x84, - 0x0c, 0x38, 0x6d, 0x3f, 0x9e, 0x3e, 0x3a, 0xac, 0x3e, 0xd1, 0xce, 0x43, 0x8a, 0xf3, 0xe9, 0xa1, - 0x5f, 0xd6, 0x60, 0x39, 0x03, 0x7a, 0xdd, 0xb0, 0x9d, 0xbe, 0x4f, 0x84, 0xa2, 0x7a, 0xda, 0xee, - 0x5c, 0x39, 0x3a, 0xac, 0x2e, 0xb7, 0x73, 0xb1, 0xe2, 0x63, 0x28, 0xa2, 0xaf, 0xc0, 0x25, 0x09, - 0xdd, 0x74, 0x5d, 0x42, 0x2c, 0x62, 0xdd, 0xb5, 0x85, 0x5d, 0x79, 0xfa, 0xae, 0x3c, 0x71, 0x74, - 0x58, 0xbd, 0xd4, 0xce, 0x42, 0x88, 0xb3, 0xe9, 0xa0, 0x0e, 0x3c, 0x1d, 0x03, 0x42, 0xdb, 0xb1, - 0x1f, 0x30, 0x4c, 0x77, 0x77, 0x7c, 0x12, 0xec, 0x78, 0x8e, 0xc5, 0x84, 0x85, 0x56, 0xfb, 0xd0, - 0xd1, 0x61, 0xf5, 0xe9, 0xf6, 0x71, 0x15, 0xf1, 0xf1, 0x78, 0x90, 0x05, 0x33, 0x81, 0x69, 0xb8, - 0x4d, 0x37, 0x24, 0xfe, 0x9e, 0xe1, 0x2c, 0x4d, 0x16, 0xfa, 0x40, 0xbe, 0x44, 0x15, 0x3c, 0x38, - 0x81, 0x55, 0xff, 0xdf, 0x1a, 0x54, 0xc4, 0x4a, 0x60, 0x0a, 0xcb, 0x16, 0x4c, 0x98, 0x74, 0xc3, - 0x12, 0x1c, 0xff, 0x6a, 0xe1, 0x8d, 0x91, 0x62, 0x8b, 0x77, 0x45, 0x56, 0x84, 0x39, 0x6a, 0xb4, - 0x97, 0xb1, 0xad, 0xd5, 0x46, 0xdb, 0xd6, 0x18, 0xb5, 0x13, 0xb6, 0x34, 0xfd, 0x70, 0x0c, 0xa6, - 0xeb, 0x9e, 0x6b, 0xd9, 0x4c, 0x49, 0x7e, 0x3e, 0xa1, 0x9a, 0x3d, 0xad, 0x0a, 0xa7, 0x87, 0x87, - 0xd5, 0x59, 0x59, 0x51, 0x91, 0x56, 0x2f, 0x49, 0x0b, 0x8d, 0xeb, 0x6a, 0x1f, 0x4a, 0x9a, 0x56, - 0x0f, 0x0f, 0xab, 0xf3, 0xb2, 0x59, 0xd2, 0xda, 0x42, 0x7b, 0x80, 0xa8, 0xce, 0x7c, 0xd7, 0x37, - 0xdc, 0x80, 0xa3, 0xa5, 0x4c, 0xcb, 0xd7, 0xcf, 0x5f, 0x18, 0x6e, 0x4e, 0x69, 0x8b, 0x58, 0xa5, - 0xbe, 0x3d, 0x80, 0x0d, 0x67, 0x50, 0x40, 0xef, 0xc0, 0x1c, 0x2d, 0xdd, 0xec, 0x59, 0x46, 0x48, - 0x94, 0x85, 0x72, 0x1a, 0x9a, 0x97, 0x05, 0xcd, 0xb9, 0xdb, 0x09, 0x4c, 0x38, 0x85, 0x99, 0xab, - 0xb2, 0x46, 0xe0, 0xb9, 0x6c, 0x0d, 0x24, 0x54, 0x59, 0x5a, 0x8a, 0x05, 0x14, 0x3d, 0x07, 0x53, - 0x5d, 0x12, 0x04, 0x46, 0x87, 0x30, 0xa6, 0x9e, 0x8e, 0x77, 0xae, 0x75, 0x5e, 0x8c, 0x23, 0x38, - 0xfa, 0x38, 0x4c, 0x98, 0x9e, 0x45, 0x82, 0xa5, 0x29, 0xe6, 0x51, 0xbe, 0xcc, 0x78, 0x89, 0x16, - 0x3c, 0x3c, 0xac, 0x4e, 0x33, 0x03, 0x84, 0xfe, 0xc2, 0xbc, 0x92, 0xfe, 0x1b, 0x54, 0x91, 0x4c, - 0x29, 0xe4, 0x43, 0xa8, 0xe0, 0x8f, 0xce, 0xbf, 0xa6, 0xff, 0xa0, 0x04, 0x17, 0x69, 0x0f, 0x7d, - 0xcf, 0x71, 0xa8, 0x90, 0xed, 0x39, 0xde, 0x41, 0x97, 0xb8, 0xe1, 0xfb, 0xaa, 0x97, 0xe8, 0x75, - 0x98, 0xec, 0xf1, 0xf3, 0x93, 0x31, 0xd6, 0x9d, 0x67, 0xe9, 0x24, 0xf2, 0xd3, 0x8d, 0x87, 0x87, - 0xd5, 0xe5, 0xac, 0x0f, 0x10, 0xe7, 0x22, 0xa2, 0x1d, 0xb2, 0x53, 0x1a, 0x07, 0x67, 0xba, 0x4f, - 0x0e, 0xa9, 0xc1, 0x1b, 0x5b, 0xc4, 0x19, 0x56, 0xc9, 0xd0, 0x7f, 0x5a, 0x82, 0xcb, 0x71, 0x8f, - 0x9a, 0x6e, 0x10, 0x1a, 0x8e, 0xc3, 0xed, 0xe0, 0xf3, 0x37, 0x91, 0x7a, 0x09, 0x13, 0x69, 0xa3, - 0xa8, 0xb9, 0x39, 0xd8, 0xf7, 0x5c, 0x2f, 0xd1, 0x7e, 0xca, 0x4b, 0xd4, 0x3a, 0x43, 0x9a, 0xc7, - 0x3b, 0x8c, 0xfe, 0x8f, 0x06, 0xcb, 0xd9, 0x0d, 0x1f, 0x81, 0xc1, 0xe6, 0x25, 0x0d, 0xb6, 0xcf, - 0x9f, 0xdd, 0x57, 0xe7, 0x98, 0x6e, 0xff, 0x39, 0xf7, 0x6b, 0x99, 0x11, 0xb7, 0x0d, 0xf3, 0x54, - 0xbb, 0x0e, 0x42, 0xe1, 0xce, 0x38, 0xdd, 0x39, 0x5f, 0xe4, 0xd2, 0x98, 0xc7, 0x49, 0x1c, 0x38, - 0x8d, 0x14, 0x6d, 0xc0, 0x14, 0xe5, 0x76, 0x8a, 0xbf, 0x34, 0x3c, 0x7e, 0x29, 0x50, 0xdb, 0xbc, - 0x2d, 0x8e, 0x90, 0xe8, 0x7f, 0xa6, 0xc1, 0x53, 0xc7, 0xcd, 0x3e, 0x7a, 0x17, 0xc0, 0x8c, 0xf6, - 0x30, 0x7e, 0x10, 0x5b, 0x54, 0x0b, 0x88, 0xb0, 0xc4, 0x4b, 0x48, 0x16, 0x05, 0x58, 0x21, 0x92, - 0xe1, 0xdd, 0x2f, 0x9d, 0x93, 0x77, 0x5f, 0xff, 0xbf, 0x9a, 0x2a, 0x2c, 0xd4, 0xd1, 0xff, 0xa0, - 0x09, 0x0b, 0xb5, 0xef, 0xb9, 0x9e, 0x95, 0xe4, 0x92, 0x55, 0x9b, 0x7c, 0xe0, 0x96, 0xac, 0xda, - 0xf9, 0x9c, 0x25, 0xfb, 0x77, 0x4a, 0x79, 0x5f, 0xcb, 0x96, 0xec, 0x7d, 0x98, 0x8e, 0xe2, 0x66, - 0x22, 0xc6, 0xbe, 0x3e, 0x6a, 0x9f, 0x38, 0xba, 0xf8, 0xf8, 0x2b, 0x2a, 0x09, 0x70, 0x4c, 0x0b, - 0xed, 0x03, 0x58, 0x72, 0xa3, 0x14, 0xb3, 0x7f, 0x73, 0x34, 0xca, 0xf1, 0xc6, 0x5b, 0x9b, 0xa3, - 0xfc, 0x16, 0xff, 0xc6, 0x0a, 0x2d, 0xfd, 0x77, 0x4b, 0x80, 0x06, 0xbb, 0x4b, 0x95, 0x8d, 0x5d, - 0xdb, 0xb5, 0xd2, 0xca, 0xc6, 0x2d, 0xdb, 0xb5, 0x30, 0x83, 0x48, 0x75, 0xa4, 0x94, 0xab, 0x8e, - 0xbc, 0x0a, 0xf3, 0x1d, 0xc7, 0xdb, 0x32, 0x1c, 0xe7, 0x40, 0x44, 0xdf, 0xb0, 0x0d, 0xa9, 0x5c, - 0xbb, 0x40, 0xe5, 0xda, 0x8d, 0x24, 0x08, 0xa7, 0xeb, 0xa2, 0x1e, 0x2c, 0xf8, 0xc4, 0xf4, 0x5c, - 0xd3, 0x76, 0x98, 0xf2, 0xe8, 0xf5, 0xc3, 0x82, 0x26, 0xdc, 0xc5, 0xa3, 0xc3, 0xea, 0x02, 0x4e, - 0xe1, 0xc2, 0x03, 0xd8, 0xd1, 0x33, 0x30, 0xd5, 0xf3, 0xed, 0xae, 0xe1, 0x1f, 0x30, 0xf5, 0xb4, - 0x5c, 0xab, 0x50, 0x01, 0xd9, 0xe2, 0x45, 0x38, 0x82, 0xe9, 0xdf, 0xd2, 0x60, 0xac, 0xb1, 0xd1, - 0x46, 0x3a, 0x4c, 0x5a, 0x5e, 0xd7, 0xb0, 0x5d, 0x31, 0x4a, 0x2c, 0x88, 0xa5, 0xc1, 0x4a, 0xb0, - 0x80, 0xa0, 0x1e, 0x4c, 0x47, 0xf2, 0x65, 0xa4, 0x43, 0x8d, 0xc6, 0x46, 0x5b, 0x1e, 0x04, 0x4b, - 0x56, 0x8a, 0x4a, 0x02, 0x1c, 0x13, 0xd1, 0x0d, 0x58, 0x6c, 0x6c, 0xb4, 0x9b, 0xae, 0xe9, 0xf4, - 0x2d, 0xb2, 0xb6, 0xcf, 0xfe, 0xd0, 0x2f, 0xb3, 0x79, 0x89, 0x08, 0x9c, 0x61, 0x5f, 0x26, 0x2a, - 0xe1, 0x08, 0x46, 0xab, 0x11, 0xde, 0x42, 0x44, 0x7d, 0xb0, 0x6a, 0x02, 0x09, 0x8e, 0x60, 0xfa, - 0x8f, 0x4a, 0x50, 0x51, 0x3a, 0x84, 0x1c, 0x98, 0xe2, 0x9f, 0x1b, 0x1d, 0xba, 0xae, 0x15, 0xfc, - 0xc4, 0x64, 0xaf, 0x39, 0x75, 0x3e, 0xa0, 0x01, 0x8e, 0x48, 0xa8, 0xb3, 0x54, 0xca, 0x9f, 0x25, - 0xb4, 0x02, 0xc0, 0x8f, 0x97, 0xd9, 0xf9, 0x0c, 0xd7, 0x52, 0xd9, 0x42, 0x68, 0xcb, 0x52, 0xac, - 0xd4, 0x40, 0x4f, 0x09, 0x7e, 0xe6, 0xa7, 0xcf, 0xe5, 0x14, 0x2f, 0x6f, 0xc3, 0xc4, 0x03, 0xcf, - 0x25, 0x81, 0x70, 0xf4, 0x9d, 0xd1, 0x07, 0x4e, 0x53, 0x01, 0xf5, 0x16, 0xc5, 0x8b, 0x39, 0x7a, - 0xfd, 0x37, 0x35, 0x80, 0x86, 0x11, 0x1a, 0xdc, 0x2f, 0x35, 0x44, 0xe0, 0xce, 0x53, 0x89, 0x65, - 0x58, 0x1e, 0x38, 0x3a, 0x18, 0x0f, 0xec, 0x07, 0xd1, 0xe7, 0xcb, 0xbd, 0x87, 0x63, 0x6f, 0xdb, - 0x0f, 0x08, 0x66, 0x70, 0xf4, 0x31, 0x98, 0x26, 0xae, 0xe9, 0x1f, 0xf4, 0x42, 0x62, 0xb1, 0x11, - 0x28, 0xf3, 0xf3, 0x9c, 0xb5, 0xa8, 0x10, 0xc7, 0x70, 0x7d, 0x0f, 0xca, 0x6b, 0xae, 0xd5, 0xf3, - 0x6c, 0x6e, 0x94, 0x9c, 0xd0, 0xc1, 0xa7, 0x61, 0xac, 0xef, 0x3b, 0xa2, 0x7f, 0x15, 0x51, 0x61, - 0x6c, 0x13, 0xdf, 0xc6, 0xb4, 0x9c, 0x5a, 0x7a, 0xbd, 0xbe, 0xdf, 0xf3, 0x82, 0xa8, 0x93, 0x52, - 0x31, 0x69, 0xf1, 0x62, 0x1c, 0xc1, 0xf5, 0x87, 0x1a, 0x2c, 0xac, 0xed, 0xf7, 0x6c, 0x9f, 0x45, - 0x04, 0x11, 0x9f, 0x6e, 0xe9, 0xb4, 0xfd, 0x1e, 0xff, 0x57, 0xf4, 0x41, 0xb6, 0x17, 0x35, 0x70, - 0x04, 0x47, 0xdb, 0x30, 0x47, 0x58, 0x73, 0x2a, 0x14, 0x1a, 0x86, 0xf4, 0x95, 0x9d, 0xc6, 0xd0, - 0xe5, 0x01, 0x67, 0x09, 0x2c, 0x38, 0x85, 0x15, 0xb5, 0x61, 0xce, 0x74, 0x8c, 0x20, 0xb0, 0xb7, - 0x6d, 0x33, 0x3e, 0xeb, 0x9a, 0xae, 0x7d, 0x8c, 0xb6, 0xad, 0x27, 0x20, 0x0f, 0x0f, 0xab, 0x97, - 0x44, 0x3f, 0x93, 0x00, 0x9c, 0x42, 0xa1, 0xff, 0x81, 0x06, 0xd3, 0x52, 0x91, 0x79, 0x7f, 0xd9, - 0x82, 0xcf, 0x42, 0xd9, 0xb2, 0x03, 0x55, 0xc0, 0xb3, 0xd3, 0x8a, 0x86, 0x28, 0xc3, 0x12, 0xaa, - 0x07, 0x50, 0xbe, 0x21, 0xd6, 0x08, 0x5a, 0x86, 0x92, 0x1d, 0xed, 0x2f, 0x20, 0x3e, 0xa0, 0xd4, - 0x6c, 0xe0, 0x92, 0x6d, 0x49, 0xae, 0x2a, 0xe5, 0x72, 0x95, 0x32, 0xed, 0x63, 0xc7, 0x4f, 0xbb, - 0xfe, 0x1d, 0x0d, 0x2a, 0x37, 0xed, 0x2d, 0xe2, 0xbb, 0x5c, 0x8b, 0x7b, 0x26, 0x1d, 0x23, 0x5a, - 0xc9, 0x8a, 0x0f, 0x45, 0xfb, 0x30, 0x1d, 0x98, 0x3b, 0xc4, 0xea, 0x3b, 0xf2, 0xac, 0xb0, 0x50, - 0x24, 0xa8, 0x42, 0xba, 0x2d, 0xf0, 0x29, 0xb1, 0x30, 0x11, 0x05, 0x1c, 0x13, 0xd3, 0xbf, 0x0c, - 0x17, 0x32, 0x1a, 0xa1, 0x2a, 0x4c, 0x04, 0xa1, 0xe1, 0x87, 0x62, 0xcc, 0x98, 0xec, 0x68, 0xd3, - 0x02, 0xcc, 0xcb, 0xd1, 0x13, 0x30, 0x46, 0x5c, 0x4b, 0x0c, 0xda, 0x14, 0x5d, 0x65, 0x6b, 0xae, - 0x85, 0x69, 0x19, 0x9d, 0x22, 0xc7, 0x4b, 0x30, 0x23, 0x9b, 0xa2, 0xdb, 0xa2, 0x0c, 0x4b, 0xa8, - 0xfe, 0x4b, 0x93, 0xf0, 0xf4, 0x4d, 0xcf, 0xb7, 0x1f, 0x78, 0x6e, 0x68, 0x38, 0x2d, 0xcf, 0x8a, - 0xbd, 0xdf, 0x62, 0xba, 0xbf, 0xae, 0xc1, 0xe3, 0x66, 0xaf, 0xdf, 0x74, 0xed, 0xd0, 0x36, 0x22, - 0xa7, 0x64, 0x8b, 0xf8, 0xb6, 0x57, 0xd4, 0x09, 0xce, 0x62, 0x0b, 0xeb, 0xad, 0xcd, 0x2c, 0x94, - 0x38, 0x8f, 0x16, 0x7a, 0x07, 0xe6, 0x2c, 0xef, 0xbe, 0xcb, 0x5d, 0xa4, 0xc4, 0x31, 0x0e, 0x0a, - 0xba, 0xbe, 0x19, 0x8b, 0x37, 0x12, 0x98, 0x70, 0x0a, 0x33, 0xf3, 0xfb, 0xcb, 0xa2, 0x76, 0xc8, - 0x62, 0x2b, 0x1f, 0xc4, 0xc3, 0x59, 0xd0, 0xef, 0xdf, 0xc8, 0xc4, 0x88, 0x73, 0x28, 0xa1, 0xaf, - 0xc0, 0x25, 0x9b, 0x0f, 0x04, 0x26, 0x86, 0x65, 0xbb, 0x24, 0x08, 0xf8, 0x77, 0x8f, 0xe0, 0xd8, - 0x6e, 0x66, 0x21, 0xc4, 0xd9, 0x74, 0xd0, 0xdb, 0x00, 0xc1, 0x81, 0x6b, 0x8a, 0xb9, 0x9e, 0x28, - 0x44, 0x95, 0x6f, 0xc1, 0x12, 0x0b, 0x56, 0x30, 0xd2, 0x5d, 0x28, 0xf4, 0x1c, 0xe2, 0x1b, 0xae, - 0xc9, 0xfd, 0x7e, 0x1a, 0xdf, 0x85, 0xee, 0x46, 0x85, 0x38, 0x86, 0x23, 0x0b, 0x66, 0xfa, 0x3d, - 0x65, 0xf2, 0xa7, 0x8a, 0x3b, 0xbf, 0x37, 0x15, 0x3c, 0x38, 0x81, 0x55, 0xff, 0x67, 0x1a, 0x4c, - 0x89, 0xc8, 0x68, 0xf4, 0xd1, 0x94, 0xbe, 0x27, 0xbd, 0x20, 0x29, 0x9d, 0xef, 0x80, 0xd9, 0xc7, - 0x42, 0xa3, 0x16, 0x4c, 0x59, 0x48, 0x61, 0x10, 0x84, 0x63, 0xf5, 0x3c, 0x61, 0x27, 0x47, 0x2a, - 0xbb, 0x42, 0x4c, 0xff, 0xb6, 0x06, 0x8b, 0x03, 0xad, 0x86, 0x50, 0xe6, 0x1f, 0xa1, 0x7f, 0xf3, - 0xd7, 0x00, 0x58, 0x10, 0xfc, 0x6a, 0xab, 0xd9, 0x26, 0xfe, 0x9e, 0x14, 0x2b, 0x7f, 0x53, 0x83, - 0x85, 0xd8, 0x13, 0x2f, 0x7a, 0xa1, 0x15, 0x8f, 0x2b, 0xb8, 0x95, 0xc2, 0x55, 0x5b, 0x12, 0xdf, - 0xbd, 0x90, 0x86, 0xe0, 0x01, 0xba, 0xe8, 0x6f, 0x68, 0xb0, 0x60, 0x24, 0x83, 0xe0, 0xa3, 0x4d, - 0xa0, 0x50, 0x70, 0x57, 0x2a, 0xa0, 0x3e, 0xee, 0x4b, 0x0a, 0x10, 0xe0, 0x01, 0xb2, 0xe8, 0x53, - 0x30, 0x63, 0xf4, 0xec, 0xd5, 0xbe, 0x65, 0x13, 0xd7, 0x94, 0x91, 0xd3, 0x8c, 0x71, 0x57, 0x5b, - 0x4d, 0x59, 0x8e, 0x13, 0xb5, 0x64, 0x94, 0xbb, 0x18, 0xc8, 0xf1, 0x11, 0xa3, 0xdc, 0xc5, 0x18, - 0xc6, 0x51, 0xee, 0x62, 0xe8, 0x54, 0x22, 0xe8, 0xe7, 0xe0, 0x09, 0xbe, 0x7b, 0xd6, 0x8c, 0xc0, - 0x36, 0x57, 0xfb, 0xe1, 0x0e, 0x71, 0xc3, 0x48, 0x07, 0xe2, 0x16, 0x15, 0x3b, 0x67, 0x5c, 0xcb, - 0xab, 0x84, 0xf3, 0xdb, 0x23, 0x17, 0xc0, 0xb3, 0x2d, 0x53, 0x7c, 0x0f, 0x3f, 0xea, 0x2a, 0x74, - 0x0c, 0x7c, 0xa7, 0xd9, 0xa8, 0x8b, 0xcf, 0x61, 0xc2, 0x28, 0xfe, 0x8d, 0x15, 0x0a, 0xe8, 0x9b, - 0x1a, 0xcc, 0x0a, 0x26, 0x17, 0x34, 0xa7, 0xd8, 0xfc, 0xbf, 0x55, 0x94, 0x19, 0x53, 0x0c, 0xbf, - 0x82, 0x55, 0xe4, 0x3c, 0x5c, 0x4d, 0x06, 0x3e, 0x24, 0x60, 0x38, 0xd9, 0x0f, 0xf4, 0xf7, 0x34, - 0xb8, 0x18, 0x10, 0x7f, 0xcf, 0x36, 0xc9, 0xaa, 0x69, 0x7a, 0x7d, 0x37, 0x9a, 0xe4, 0x72, 0x71, - 0xbf, 0x41, 0x3b, 0x03, 0x5f, 0x6d, 0xe9, 0xe8, 0xb0, 0x7a, 0x31, 0x0b, 0x82, 0x33, 0xe9, 0xd3, - 0x5d, 0x72, 0xfe, 0xbe, 0x11, 0x9a, 0x3b, 0x75, 0xc3, 0xdc, 0x61, 0xe6, 0x45, 0xb0, 0x34, 0x5d, - 0x3c, 0x22, 0xf2, 0xcd, 0x24, 0x2a, 0xee, 0x36, 0x48, 0x15, 0xe2, 0x34, 0x41, 0x14, 0x40, 0xd9, - 0x27, 0xef, 0xf6, 0x49, 0x10, 0x06, 0x4b, 0xc0, 0x88, 0x37, 0x47, 0x9e, 0x31, 0x2c, 0x10, 0x72, - 0xad, 0x29, 0xfa, 0x85, 0x25, 0xa1, 0xe5, 0xd7, 0x01, 0x0d, 0x4e, 0x27, 0x5a, 0x80, 0xb1, 0x5d, - 0xc2, 0x6f, 0x98, 0x4c, 0x63, 0xfa, 0x2f, 0xba, 0x08, 0x13, 0x7b, 0x86, 0xd3, 0xe7, 0x9a, 0x6d, - 0x19, 0xf3, 0x1f, 0x2f, 0x97, 0x3e, 0xa3, 0xe9, 0xbf, 0xa7, 0xc1, 0xa5, 0x4c, 0x9a, 0x08, 0xc3, - 0xe5, 0xae, 0xb1, 0xbf, 0xe1, 0xb9, 0xeb, 0xfd, 0xd0, 0x08, 0x6d, 0xb7, 0xd3, 0x74, 0xb7, 0x1d, - 0xbb, 0xb3, 0xc3, 0x15, 0xc1, 0x09, 0xae, 0x4a, 0xac, 0x67, 0xd6, 0xc0, 0x39, 0x2d, 0x51, 0x13, - 0x2e, 0x74, 0x8d, 0xfd, 0x01, 0x84, 0x25, 0x86, 0x90, 0xdd, 0x53, 0x5a, 0x1f, 0x04, 0xe3, 0xac, - 0x36, 0xfa, 0x37, 0xc6, 0xe1, 0x49, 0xda, 0xf1, 0x78, 0xbf, 0x59, 0x37, 0x5c, 0xa3, 0xf3, 0xfe, - 0x94, 0xeb, 0xdf, 0xd1, 0xe0, 0xf1, 0x9d, 0x6c, 0xed, 0x56, 0xec, 0x78, 0x6f, 0x14, 0xd2, 0xf1, - 0x8f, 0x53, 0x98, 0xf9, 0x41, 0xff, 0xb1, 0x55, 0x70, 0x5e, 0xa7, 0xd0, 0xeb, 0xb0, 0xe0, 0x7a, - 0x16, 0xa9, 0x37, 0x1b, 0x78, 0xdd, 0x08, 0x76, 0xdb, 0x91, 0x31, 0x3f, 0xc1, 0x9d, 0x5a, 0x1b, - 0x29, 0x18, 0x1e, 0xa8, 0x8d, 0xf6, 0x00, 0xf5, 0x3c, 0x6b, 0x6d, 0xcf, 0x36, 0xa3, 0x13, 0xdf, - 0xe2, 0x8e, 0x34, 0x16, 0x84, 0xdd, 0x1a, 0xc0, 0x86, 0x33, 0x28, 0xe8, 0x7f, 0xa4, 0xc1, 0x3c, - 0x9d, 0x91, 0x96, 0xef, 0xed, 0x1f, 0xbc, 0x1f, 0x79, 0xe1, 0x39, 0x18, 0xef, 0x7a, 0x56, 0x64, - 0x64, 0x5e, 0xa2, 0x1a, 0xd1, 0xba, 0x67, 0x91, 0x87, 0xdc, 0xb1, 0xb6, 0x7f, 0x40, 0x7f, 0x60, - 0x56, 0x45, 0xff, 0x6f, 0x1a, 0xd7, 0x59, 0x22, 0x5b, 0xec, 0x7d, 0xc9, 0xdb, 0x2f, 0xc2, 0x2c, - 0x2d, 0x5b, 0x37, 0xf6, 0x5b, 0x8d, 0x7b, 0x9e, 0x13, 0x45, 0x20, 0xb0, 0x58, 0xe0, 0x5b, 0x2a, - 0x00, 0x27, 0xeb, 0xe9, 0xdf, 0x9c, 0x05, 0x56, 0xc1, 0x21, 0xe1, 0xfb, 0xf1, 0xbb, 0x9e, 0x87, - 0x8a, 0xd9, 0xeb, 0xd7, 0xaf, 0xb7, 0xdf, 0xe8, 0x7b, 0xa1, 0x21, 0x7c, 0x7e, 0x4c, 0x11, 0xa9, - 0xb7, 0x36, 0xa3, 0x62, 0xac, 0xd6, 0xa1, 0xab, 0xc6, 0xec, 0xf5, 0x85, 0x1c, 0x6a, 0xa9, 0xe7, - 0xd4, 0x6c, 0xd5, 0xd4, 0x5b, 0x9b, 0x09, 0x18, 0x1e, 0xa8, 0x8d, 0xbe, 0x02, 0x33, 0x44, 0x30, - 0xf4, 0x4d, 0xc3, 0xb7, 0xc4, 0x7a, 0x29, 0xbc, 0x93, 0xc8, 0xa1, 0x8d, 0x56, 0x09, 0xd7, 0xdf, - 0xd6, 0x14, 0x12, 0x38, 0x41, 0x90, 0xe9, 0x52, 0xe2, 0x37, 0x9d, 0x29, 0xcf, 0xba, 0xe1, 0x1b, - 0x26, 0x51, 0x4c, 0xaf, 0x09, 0xa1, 0x4b, 0xe5, 0x55, 0xc2, 0xf9, 0xed, 0xd1, 0x6f, 0x6b, 0x70, - 0x59, 0x42, 0x6d, 0xd7, 0xee, 0xf6, 0xbb, 0x98, 0x98, 0x8e, 0x61, 0x77, 0x85, 0x62, 0xf5, 0xe6, - 0x99, 0x7d, 0x68, 0x12, 0x3d, 0xdf, 0xac, 0xb2, 0x61, 0x38, 0xa7, 0x4b, 0xe8, 0xdb, 0x1a, 0x5c, - 0x8d, 0x40, 0x2d, 0x6a, 0xda, 0xf4, 0x7d, 0x12, 0xc7, 0xb0, 0x88, 0x21, 0x29, 0x66, 0xfe, 0x7d, - 0xe4, 0xe8, 0xb0, 0x7a, 0x75, 0xed, 0x04, 0xdc, 0xf8, 0x44, 0xea, 0x2a, 0xbb, 0xb4, 0xbd, 0xed, - 0x50, 0x68, 0x62, 0xe7, 0xc5, 0x2e, 0x94, 0x04, 0x4e, 0x10, 0x44, 0xbf, 0xa3, 0xc1, 0xe3, 0x6a, - 0x81, 0xca, 0x2d, 0x5c, 0x05, 0xfb, 0xc2, 0x99, 0x75, 0x26, 0x85, 0x9f, 0xbb, 0x6f, 0x72, 0x80, - 0x38, 0xaf, 0x57, 0xe8, 0x19, 0x98, 0xea, 0x32, 0xc6, 0xe4, 0x6a, 0xda, 0x04, 0x77, 0xc3, 0x71, - 0x5e, 0x0d, 0x70, 0x04, 0xa3, 0xd6, 0x4f, 0xcf, 0xb3, 0x5a, 0xb6, 0x15, 0xdc, 0xb6, 0xbb, 0x76, - 0xb8, 0x54, 0x61, 0xd7, 0x06, 0xd8, 0x70, 0xb4, 0x3c, 0xab, 0xd5, 0x6c, 0xf0, 0x72, 0x9c, 0xa8, - 0xc5, 0x42, 0x24, 0xed, 0xae, 0xd1, 0x21, 0xad, 0xbe, 0xe3, 0xb4, 0x7c, 0x8f, 0x59, 0xc4, 0x0d, - 0x62, 0x58, 0x8e, 0xed, 0x92, 0xa5, 0x99, 0xe2, 0x21, 0x92, 0xcd, 0x3c, 0xa4, 0x38, 0x9f, 0x1e, - 0x5a, 0x01, 0xd8, 0x36, 0x6c, 0xa7, 0x7d, 0xdf, 0xe8, 0xdd, 0x71, 0x97, 0x66, 0x99, 0x00, 0x63, - 0xa6, 0xc7, 0x75, 0x59, 0x8a, 0x95, 0x1a, 0x94, 0x9b, 0xa8, 0x14, 0xc4, 0x84, 0x5f, 0x7f, 0x58, - 0x9a, 0x3b, 0x23, 0x6e, 0x8a, 0x10, 0xf2, 0xe1, 0xbb, 0xa5, 0x90, 0xc0, 0x09, 0x82, 0xe8, 0xeb, - 0x1a, 0xcc, 0x05, 0x07, 0x41, 0x48, 0xba, 0xb2, 0x0f, 0xf3, 0x67, 0xdd, 0x07, 0xe6, 0x2b, 0x68, - 0x27, 0x88, 0xe0, 0x14, 0x51, 0xfd, 0xb0, 0xc4, 0x95, 0xe2, 0x01, 0x16, 0x44, 0xaf, 0xc2, 0x7c, - 0x97, 0x74, 0x3d, 0xff, 0x60, 0x35, 0xba, 0x22, 0x2c, 0xbc, 0x1b, 0xcc, 0x48, 0x58, 0x4f, 0x82, - 0x70, 0xba, 0x2e, 0xdd, 0x20, 0xd8, 0x74, 0x5d, 0x6f, 0xc7, 0xed, 0x4b, 0xf1, 0x06, 0xd1, 0x4c, - 0xc1, 0xf0, 0x40, 0x6d, 0x54, 0x87, 0x45, 0x51, 0xd6, 0xa4, 0x2a, 0x57, 0x70, 0xdd, 0x27, 0xd1, - 0x09, 0x06, 0x55, 0x25, 0x16, 0x9b, 0x69, 0x20, 0x1e, 0xac, 0x4f, 0xbf, 0x82, 0xfe, 0x50, 0x7b, - 0x31, 0x1e, 0x7f, 0xc5, 0x46, 0x12, 0x84, 0xd3, 0x75, 0x23, 0xe5, 0x30, 0xd1, 0x85, 0x89, 0xf8, - 0x2b, 0x36, 0x52, 0x30, 0x3c, 0x50, 0x5b, 0xff, 0xef, 0xe3, 0xf0, 0xe1, 0x21, 0xc4, 0x36, 0xea, - 0x66, 0x0f, 0xf7, 0x09, 0x8b, 0x68, 0x25, 0x3a, 0xe0, 0x5e, 0x79, 0xa3, 0x6f, 0xb8, 0xa1, 0x1d, - 0x1e, 0x0c, 0x39, 0x3d, 0xbd, 0x9c, 0xe9, 0x39, 0x3d, 0xbd, 0x61, 0xa7, 0x33, 0xc8, 0x9b, 0xce, - 0xd3, 0x93, 0x1c, 0x7e, 0xfa, 0xbb, 0xd9, 0xd3, 0x5f, 0x70, 0x54, 0x4f, 0x64, 0x97, 0x5e, 0x0e, - 0xbb, 0x14, 0x1c, 0xd5, 0x21, 0xd8, 0xeb, 0x4f, 0xc6, 0xe1, 0x23, 0xc3, 0x6c, 0x21, 0x05, 0xf9, - 0x2b, 0x43, 0x48, 0x9f, 0x2b, 0x7f, 0xe5, 0x85, 0x16, 0x9c, 0x23, 0x7f, 0x65, 0x90, 0x3c, 0x6f, - 0xfe, 0xca, 0x1b, 0xd5, 0xf3, 0xe2, 0xaf, 0xbc, 0x51, 0x1d, 0x82, 0xbf, 0xfe, 0x34, 0xbd, 0x3f, - 0xc8, 0x1d, 0xac, 0x09, 0x63, 0x66, 0xaf, 0x5f, 0x50, 0x48, 0xb1, 0xb3, 0xb3, 0x7a, 0x6b, 0x13, - 0x53, 0x1c, 0x08, 0xc3, 0x24, 0xe7, 0x9f, 0x82, 0x22, 0x88, 0x85, 0x85, 0x70, 0x96, 0xc4, 0x02, - 0x13, 0x1d, 0x2a, 0xd2, 0xdb, 0x21, 0x5d, 0xe2, 0x1b, 0x4e, 0x3b, 0xf4, 0x7c, 0xa3, 0x53, 0x54, - 0xda, 0xb0, 0xa1, 0x5a, 0x4b, 0xe1, 0xc2, 0x03, 0xd8, 0xe9, 0x80, 0xf4, 0x6c, 0xab, 0xa0, 0x7c, - 0x61, 0x03, 0xd2, 0x6a, 0x36, 0x30, 0xc5, 0xa1, 0xff, 0x61, 0x19, 0x94, 0xf8, 0x79, 0x6a, 0xa9, - 0x18, 0x8e, 0xe3, 0xdd, 0x6f, 0xf9, 0xf6, 0x9e, 0xed, 0x90, 0x0e, 0xb1, 0x64, 0x80, 0x75, 0x20, - 0x4e, 0x58, 0x99, 0xea, 0xb4, 0x9a, 0x57, 0x09, 0xe7, 0xb7, 0xa7, 0x96, 0xe8, 0xa2, 0x99, 0xbe, - 0x86, 0x33, 0xca, 0x99, 0xca, 0xc0, 0x9d, 0x1e, 0xbe, 0x9e, 0x06, 0x8a, 0xf1, 0x20, 0x59, 0xf4, - 0x55, 0x8d, 0x9b, 0xd8, 0xd2, 0x47, 0x27, 0xe6, 0xec, 0xc6, 0x19, 0xb9, 0x84, 0x63, 0x5b, 0x3d, - 0xf6, 0x02, 0x26, 0x09, 0x52, 0x5b, 0xe8, 0xd2, 0x6e, 0x96, 0xb7, 0x4d, 0xcc, 0xec, 0x9d, 0xa2, - 0x5d, 0xc9, 0x71, 0xdf, 0xf1, 0x53, 0xc2, 0xcc, 0x0a, 0x38, 0xbb, 0x23, 0x72, 0x94, 0xa4, 0xb3, - 0x44, 0x08, 0x81, 0xc2, 0xa3, 0x94, 0xf2, 0xba, 0xc4, 0xa3, 0x24, 0x01, 0x38, 0x49, 0x10, 0xf5, - 0x60, 0x7a, 0x37, 0x72, 0x3d, 0x09, 0x8b, 0xb6, 0x5e, 0x94, 0xba, 0xe2, 0xbf, 0xe2, 0xa7, 0x91, - 0xb2, 0x10, 0xc7, 0x44, 0xd0, 0x0e, 0x4c, 0xed, 0x72, 0x41, 0x24, 0x2c, 0xd1, 0xd5, 0x91, 0x35, - 0x65, 0x6e, 0x10, 0x89, 0x22, 0x1c, 0xa1, 0x57, 0x23, 0x1f, 0xca, 0x27, 0x04, 0xbc, 0xfc, 0xba, - 0x06, 0x97, 0xf6, 0x88, 0x1f, 0xda, 0x66, 0xda, 0xd7, 0x39, 0x5d, 0x5c, 0x9b, 0xbf, 0x97, 0x85, - 0x90, 0xb3, 0x49, 0x26, 0x08, 0x67, 0x77, 0x41, 0xff, 0xa9, 0x06, 0x03, 0xde, 0x1f, 0xf4, 0x2b, - 0x1a, 0xcc, 0x6c, 0x13, 0x23, 0xec, 0xfb, 0xe4, 0x86, 0x11, 0xca, 0x20, 0xcc, 0x7b, 0x67, 0xe1, - 0x74, 0x5a, 0xb9, 0xae, 0x20, 0xe6, 0xe7, 0x2d, 0xf2, 0xae, 0xa7, 0x0a, 0xc2, 0x89, 0x1e, 0x2c, - 0xbf, 0x06, 0x8b, 0x03, 0x0d, 0x4f, 0xe5, 0xd9, 0xff, 0x77, 0xc2, 0x79, 0x98, 0x4e, 0xf0, 0xf5, - 0x36, 0x4c, 0x18, 0x96, 0x25, 0xd3, 0x87, 0xbc, 0x54, 0xec, 0x5c, 0xd1, 0x52, 0x63, 0x5d, 0xd9, - 0x4f, 0xcc, 0xd1, 0xa2, 0xeb, 0x80, 0x8c, 0xc4, 0x11, 0xda, 0xba, 0x67, 0x45, 0x56, 0x12, 0x73, - 0xe4, 0xae, 0x0e, 0x40, 0x71, 0x46, 0x0b, 0xfd, 0x15, 0x98, 0x4b, 0xde, 0xa2, 0x3a, 0x45, 0xcc, - 0x95, 0xfe, 0xd7, 0x35, 0x40, 0x83, 0x57, 0x8b, 0x91, 0x0f, 0x65, 0x51, 0x23, 0x9a, 0xe2, 0x42, - 0x7e, 0xc5, 0x74, 0x34, 0x58, 0x1c, 0x6c, 0x2c, 0x0a, 0x02, 0x2c, 0xe9, 0xe8, 0x7f, 0xa6, 0x41, - 0x9c, 0x9f, 0x00, 0x7d, 0x1a, 0x2a, 0x16, 0x09, 0x4c, 0xdf, 0xee, 0x85, 0xf1, 0x77, 0xc8, 0x6b, - 0xa1, 0x8d, 0x18, 0x84, 0xd5, 0x7a, 0x48, 0x87, 0xc9, 0xd0, 0x08, 0x76, 0x9b, 0x0d, 0x61, 0x2e, - 0xb2, 0xcd, 0xfd, 0x2e, 0x2b, 0xc1, 0x02, 0x12, 0xdf, 0x48, 0x1a, 0x1b, 0xe2, 0x46, 0x12, 0xda, - 0x3e, 0x83, 0xeb, 0x57, 0xe8, 0xe4, 0xab, 0x57, 0xfa, 0x7f, 0x2a, 0x41, 0x32, 0x25, 0x44, 0xd1, - 0x21, 0x18, 0xbc, 0x2f, 0x56, 0x3a, 0xb7, 0xfb, 0x62, 0x1f, 0x67, 0xf9, 0x94, 0x78, 0x02, 0x3c, - 0x7e, 0xec, 0xa1, 0x66, 0x41, 0xe2, 0xe9, 0xeb, 0x64, 0x0d, 0xf4, 0x12, 0x8b, 0x90, 0x0a, 0x23, - 0x23, 0xfa, 0xc3, 0xd1, 0xb2, 0x68, 0xd3, 0xc2, 0x87, 0xe2, 0x46, 0x9c, 0xfc, 0x7e, 0x56, 0x8a, - 0x79, 0x0b, 0xf4, 0x69, 0x11, 0x50, 0x37, 0x91, 0xb8, 0xb5, 0x17, 0x5d, 0xf5, 0x5b, 0x4c, 0x34, - 0x8c, 0xa3, 0xec, 0xf4, 0xbf, 0xab, 0xc1, 0x94, 0xb8, 0x27, 0x3e, 0x44, 0x4c, 0xde, 0x36, 0x4c, - 0x30, 0x25, 0x7d, 0x14, 0xfd, 0xa5, 0xbd, 0xe3, 0x79, 0x61, 0xe2, 0xb6, 0x3c, 0x0b, 0x04, 0x63, - 0xff, 0x62, 0x8e, 0x5e, 0xff, 0xd6, 0x38, 0x5c, 0x15, 0x55, 0x06, 0xb6, 0x67, 0xb9, 0x04, 0x0f, - 0xe0, 0x82, 0x98, 0xa5, 0x86, 0x6f, 0xd8, 0xf2, 0x60, 0xa8, 0x98, 0xd9, 0x25, 0x8e, 0x0c, 0x07, - 0xd0, 0xe1, 0x2c, 0x1a, 0xe8, 0xe7, 0xe1, 0xa2, 0x28, 0xbe, 0x49, 0x0c, 0x27, 0xdc, 0x89, 0x68, - 0x17, 0x33, 0xc1, 0xd8, 0x29, 0xf5, 0x7a, 0x06, 0x3e, 0x9c, 0x49, 0x85, 0xc5, 0x72, 0x09, 0x40, - 0xdd, 0x27, 0x86, 0x7a, 0x2a, 0x36, 0x42, 0x2c, 0xd7, 0x7a, 0x26, 0x46, 0x9c, 0x43, 0x89, 0xf9, - 0xaf, 0x8c, 0x7d, 0x66, 0x0e, 0x63, 0x12, 0xfa, 0x36, 0xcb, 0x5f, 0x40, 0xf9, 0x9b, 0x1b, 0xb0, - 0x49, 0x10, 0x4e, 0xd7, 0x45, 0x2f, 0xc3, 0x1c, 0x3b, 0xe8, 0x8b, 0xaf, 0xe1, 0x4c, 0xc4, 0xf9, - 0x10, 0x37, 0x12, 0x10, 0x9c, 0xaa, 0xa9, 0xff, 0x96, 0x06, 0x33, 0x2a, 0x03, 0x0d, 0x11, 0xc3, - 0xdb, 0x57, 0xc4, 0xf5, 0x08, 0xa1, 0x90, 0x2a, 0xd5, 0x61, 0x24, 0xf6, 0x43, 0x0d, 0x2e, 0x64, - 0xb4, 0x61, 0xc7, 0x53, 0x24, 0x25, 0xfa, 0x47, 0x39, 0x9e, 0x1a, 0xd8, 0x46, 0xe4, 0xf1, 0x54, - 0x1a, 0x82, 0x07, 0xe8, 0xa2, 0x7b, 0x30, 0x66, 0xfa, 0xb6, 0x18, 0x96, 0x17, 0x0b, 0x99, 0x24, - 0xb8, 0x19, 0x07, 0x46, 0xd7, 0x71, 0x13, 0x53, 0x84, 0xfa, 0xbf, 0x1a, 0x83, 0x8a, 0x92, 0x82, - 0x02, 0xad, 0x8f, 0x62, 0xd1, 0xc6, 0xe8, 0x23, 0xab, 0x76, 0x1d, 0xc6, 0x3a, 0xbd, 0x7e, 0x41, - 0x93, 0x56, 0xa2, 0xbb, 0x41, 0xd1, 0x75, 0x7a, 0x7d, 0x74, 0x4f, 0x1a, 0xc9, 0xc5, 0xcc, 0x58, - 0x19, 0x4b, 0x97, 0x32, 0x94, 0x23, 0xde, 0x1c, 0xcf, 0xe5, 0xcd, 0x2e, 0x4c, 0x05, 0xc2, 0x82, - 0x9e, 0x28, 0x9e, 0xfe, 0x44, 0x19, 0x69, 0x61, 0x31, 0x73, 0xf5, 0x3b, 0x32, 0xa8, 0x23, 0x1a, - 0x54, 0x01, 0xe8, 0xb3, 0x68, 0x66, 0x66, 0x57, 0x94, 0xb9, 0x02, 0xb0, 0xc9, 0x4a, 0xb0, 0x80, - 0xe8, 0xff, 0x52, 0x03, 0x34, 0x88, 0x10, 0x7d, 0x18, 0x26, 0x58, 0x50, 0xb7, 0x58, 0x68, 0xca, - 0xcd, 0x77, 0x23, 0x08, 0x30, 0x87, 0xa1, 0x37, 0x45, 0xc4, 0x7e, 0xb1, 0x89, 0x91, 0xbb, 0xb7, - 0xa0, 0xa9, 0x84, 0xf8, 0x47, 0xdb, 0xd3, 0x58, 0xde, 0xf6, 0xa4, 0xff, 0x49, 0x89, 0x72, 0x9c, - 0xed, 0x86, 0xc4, 0x65, 0x11, 0x96, 0x07, 0x00, 0x46, 0x3f, 0xf4, 0xf8, 0x76, 0x2c, 0x18, 0xaf, - 0x59, 0x6c, 0x70, 0x25, 0xd2, 0x55, 0x89, 0x90, 0x9f, 0x80, 0xc4, 0xbf, 0xb1, 0x42, 0x8c, 0x92, - 0x0e, 0xed, 0x2e, 0x79, 0xd3, 0x76, 0x2d, 0xef, 0xbe, 0x18, 0x8b, 0x51, 0x49, 0xdf, 0x95, 0x08, - 0x39, 0xe9, 0xf8, 0x37, 0x56, 0x88, 0xa1, 0x2f, 0xc0, 0x12, 0x4b, 0xa8, 0xea, 0xb2, 0x54, 0x3c, - 0xa2, 0x6f, 0x9e, 0xe3, 0x44, 0xfb, 0x43, 0xb9, 0xf6, 0xd4, 0xd1, 0x61, 0x75, 0xa9, 0x9e, 0x53, - 0x07, 0xe7, 0xb6, 0xd6, 0x7f, 0x47, 0x83, 0x4b, 0x99, 0x43, 0x81, 0x6e, 0xc0, 0x62, 0x7c, 0xec, - 0xad, 0x0a, 0xb4, 0x72, 0x9c, 0x59, 0xea, 0x56, 0xba, 0x02, 0x1e, 0x6c, 0x83, 0xd6, 0xe5, 0xa6, - 0xae, 0x0a, 0x4c, 0x71, 0x66, 0xfe, 0xa4, 0x40, 0x95, 0x25, 0x53, 0x71, 0x56, 0x3b, 0xfd, 0xe7, - 0x12, 0x1d, 0x8e, 0x07, 0x8c, 0xb2, 0xf2, 0x16, 0xe9, 0xc8, 0x48, 0x58, 0xc9, 0xca, 0x35, 0x5a, - 0x88, 0x39, 0x0c, 0x3d, 0xad, 0xc6, 0xa3, 0x4b, 0x91, 0x11, 0xc5, 0xa4, 0xeb, 0x21, 0xc0, 0xba, - 0xe7, 0xda, 0xa1, 0xe7, 0xdb, 0x6e, 0x07, 0x6d, 0x43, 0xd9, 0x10, 0xd9, 0x7e, 0x05, 0xab, 0x7d, - 0xb6, 0x90, 0x41, 0x24, 0x70, 0xf0, 0x48, 0xad, 0xe8, 0x17, 0x96, 0xb8, 0xf5, 0x7f, 0xaa, 0xc1, - 0x65, 0x2a, 0x3d, 0xac, 0xe8, 0xaa, 0x9b, 0xbc, 0x12, 0x3b, 0xc4, 0x3e, 0xd8, 0x85, 0x8a, 0x1f, - 0x37, 0x13, 0x7c, 0xf9, 0xb3, 0xea, 0x75, 0x5b, 0x25, 0xf5, 0x37, 0xd5, 0x11, 0xea, 0xbe, 0x17, - 0x44, 0x93, 0x93, 0xbe, 0x81, 0x2b, 0xd7, 0xaa, 0xd2, 0x13, 0xac, 0xe2, 0xd7, 0xbf, 0x56, 0x02, - 0xd8, 0x20, 0xe1, 0x7d, 0xcf, 0xdf, 0xa5, 0x43, 0xf4, 0xbe, 0xba, 0xf4, 0xf1, 0x14, 0x8c, 0xf7, - 0x3c, 0x2b, 0x10, 0xe2, 0x84, 0xdd, 0x3b, 0x62, 0x07, 0xb7, 0xac, 0x14, 0x55, 0x61, 0x82, 0x79, - 0x69, 0x85, 0xdc, 0x66, 0x2a, 0x2a, 0x55, 0x4b, 0x02, 0xcc, 0xcb, 0x79, 0xee, 0x3c, 0x16, 0x42, - 0x18, 0x08, 0x9d, 0x5b, 0xe4, 0xce, 0xe3, 0x65, 0x58, 0x42, 0xf5, 0xaf, 0x8d, 0x43, 0x22, 0x5d, - 0x75, 0x6c, 0x37, 0x6b, 0xe7, 0x63, 0x37, 0x7f, 0x01, 0x96, 0x1c, 0xcf, 0xb0, 0x6a, 0x86, 0x43, - 0x99, 0xde, 0x6f, 0xf3, 0xe9, 0x30, 0xdc, 0x8e, 0xcc, 0x85, 0xcc, 0x04, 0xc0, 0xed, 0x9c, 0x3a, - 0x38, 0xb7, 0x35, 0x0a, 0x65, 0x92, 0x6c, 0x9e, 0x29, 0xeb, 0xf6, 0xa8, 0xc9, 0xbc, 0x57, 0xd4, - 0xe0, 0x51, 0xb9, 0x85, 0x26, 0xf3, 0x68, 0xa3, 0x5f, 0xd0, 0xe0, 0x12, 0xd9, 0x0f, 0x89, 0xef, - 0x1a, 0xce, 0x5d, 0xdf, 0xd8, 0xde, 0xb6, 0x4d, 0x11, 0x12, 0xc3, 0x27, 0xa7, 0x75, 0x74, 0x58, - 0xbd, 0xb4, 0x96, 0x55, 0xe1, 0xe1, 0x61, 0xf5, 0x93, 0x83, 0xb9, 0xea, 0xa3, 0x58, 0xd1, 0xcc, - 0x26, 0x8c, 0x19, 0xb3, 0xc9, 0x2d, 0xbf, 0x04, 0x95, 0x53, 0x44, 0x47, 0x4e, 0xab, 0x3e, 0x94, - 0x7f, 0x30, 0x09, 0x4a, 0x9c, 0xee, 0x29, 0xf2, 0xa3, 0xfd, 0x23, 0x0d, 0x2e, 0x9a, 0x8e, 0x4d, - 0xdc, 0x30, 0x15, 0x8e, 0xcc, 0x17, 0xc6, 0x66, 0xa1, 0x00, 0xe2, 0x1e, 0x71, 0x9b, 0x8d, 0xba, - 0xe7, 0xba, 0xc4, 0x0c, 0xeb, 0x19, 0xc8, 0xb9, 0x49, 0x92, 0x05, 0xc1, 0x99, 0x9d, 0x61, 0xdf, - 0xc3, 0xca, 0x9b, 0x0d, 0xf5, 0x7a, 0x4e, 0x5d, 0x94, 0x61, 0x09, 0x45, 0xcf, 0x43, 0xa5, 0xe3, - 0x7b, 0xfd, 0x5e, 0x50, 0x67, 0xd1, 0x3a, 0x7c, 0x06, 0x59, 0x30, 0xd4, 0x8d, 0xb8, 0x18, 0xab, - 0x75, 0xd0, 0xa7, 0x60, 0x86, 0xff, 0x6c, 0xf9, 0x64, 0xdb, 0xde, 0x17, 0xcb, 0x8d, 0x85, 0x00, - 0xdc, 0x50, 0xca, 0x71, 0xa2, 0x16, 0xfa, 0x18, 0x4c, 0xdb, 0x41, 0xd0, 0x27, 0xfe, 0x26, 0xbe, - 0x2d, 0x72, 0xb0, 0x30, 0xef, 0x67, 0x33, 0x2a, 0xc4, 0x31, 0x1c, 0xfd, 0xaa, 0x06, 0x73, 0x3e, - 0x79, 0xb7, 0x6f, 0xfb, 0xc4, 0x62, 0x44, 0x03, 0x11, 0x2c, 0x8d, 0x47, 0x0b, 0xd0, 0x5e, 0xc1, - 0x09, 0xa4, 0x9c, 0xcf, 0xa5, 0xef, 0x20, 0x09, 0xc4, 0xa9, 0x1e, 0xd0, 0xa1, 0x0a, 0xec, 0x8e, - 0x6b, 0xbb, 0x9d, 0x55, 0xa7, 0x13, 0x2c, 0x95, 0xd9, 0xd2, 0x65, 0x43, 0xd5, 0x8e, 0x8b, 0xb1, - 0x5a, 0x07, 0xbd, 0x08, 0xb3, 0xfd, 0x80, 0x72, 0x6e, 0x97, 0xf0, 0xf1, 0x9d, 0x8e, 0x43, 0xe8, - 0x36, 0x55, 0x00, 0x4e, 0xd6, 0xa3, 0xf6, 0x58, 0x54, 0x20, 0x46, 0x19, 0xf8, 0x8d, 0x4b, 0xda, - 0xcf, 0xcd, 0x04, 0x04, 0xa7, 0x6a, 0x2e, 0xaf, 0xc2, 0x85, 0x8c, 0xcf, 0x3c, 0xd5, 0xf2, 0xf8, - 0xad, 0x12, 0x7c, 0xe8, 0x44, 0xae, 0x44, 0xff, 0x50, 0x83, 0x0a, 0xd9, 0x0f, 0x7d, 0x43, 0x06, - 0xf4, 0xd1, 0x29, 0xda, 0x3e, 0x97, 0x25, 0xb0, 0xb2, 0x16, 0x13, 0xe2, 0xd3, 0x26, 0xb7, 0x3b, - 0x05, 0x82, 0xd5, 0xfe, 0x50, 0xd5, 0x9a, 0xdf, 0xc7, 0x55, 0x7d, 0x6b, 0x22, 0xab, 0xaf, 0x80, - 0x2c, 0x7f, 0x0e, 0x16, 0xd2, 0x98, 0x4f, 0x35, 0x52, 0xff, 0xa2, 0x04, 0x13, 0x2d, 0xc7, 0x70, - 0x1f, 0x45, 0xd6, 0xf8, 0xbf, 0x9c, 0x48, 0xe6, 0x50, 0x28, 0x43, 0x06, 0xeb, 0x6a, 0x6e, 0xa2, - 0x97, 0x4e, 0x2a, 0xd1, 0xcb, 0x6b, 0xc5, 0x49, 0x1c, 0x9f, 0xd7, 0xe5, 0x8f, 0x34, 0x98, 0x66, - 0xf5, 0x1e, 0x41, 0x4e, 0x88, 0xb7, 0x93, 0x39, 0x21, 0x5e, 0x2a, 0xfc, 0x4d, 0x39, 0x29, 0x20, - 0x7e, 0x18, 0x7d, 0x0b, 0xcb, 0xf8, 0xf0, 0x45, 0x35, 0x9b, 0x39, 0xff, 0x98, 0x67, 0xb3, 0xd2, - 0xa7, 0xdc, 0xf6, 0x4c, 0xc3, 0x49, 0x6b, 0x70, 0xc7, 0xa7, 0x34, 0xef, 0xc2, 0x34, 0x11, 0xd7, - 0xa4, 0xa3, 0x8f, 0x29, 0xa4, 0xd2, 0x46, 0x77, 0xad, 0x63, 0x72, 0x51, 0x49, 0x80, 0x63, 0x0a, - 0xfa, 0xbf, 0x2d, 0x41, 0x45, 0x99, 0xcb, 0xf7, 0x22, 0x4b, 0xcb, 0xf5, 0xcc, 0x44, 0xbf, 0x25, - 0x16, 0xb1, 0x77, 0xf9, 0x14, 0xc9, 0xc2, 0x7d, 0xa8, 0x98, 0x71, 0xc2, 0xb9, 0x51, 0x98, 0x5b, - 0xc9, 0x5b, 0x27, 0x42, 0x86, 0xe3, 0x02, 0xac, 0x12, 0xd1, 0xff, 0x75, 0x09, 0xa6, 0x5a, 0xbe, - 0x47, 0x27, 0xf8, 0x11, 0x88, 0x06, 0x23, 0x21, 0x1a, 0x8a, 0xad, 0x5b, 0xde, 0xd9, 0x5c, 0xe1, - 0x60, 0xa7, 0x84, 0xc3, 0xea, 0x28, 0x44, 0x8e, 0x17, 0x0f, 0xff, 0x51, 0x83, 0x8a, 0xa8, 0xf9, - 0x08, 0x04, 0xc4, 0x97, 0x92, 0x02, 0xe2, 0x95, 0x11, 0xbe, 0x2b, 0x47, 0x44, 0xfc, 0xba, 0x06, - 0xb3, 0xa2, 0xc6, 0x3a, 0xe9, 0x6e, 0x11, 0x1f, 0x5d, 0x87, 0xa9, 0xa0, 0xcf, 0x26, 0x52, 0x7c, - 0xd0, 0x93, 0xaa, 0x90, 0xf0, 0xb7, 0x0c, 0x93, 0xe5, 0xac, 0xe7, 0x55, 0x94, 0xdc, 0x4a, 0xbc, - 0x00, 0x47, 0x8d, 0xa9, 0x09, 0xe7, 0x7b, 0xce, 0xc0, 0xc5, 0x76, 0xec, 0x39, 0x04, 0x33, 0x08, - 0xb5, 0x9c, 0xe8, 0xdf, 0xe8, 0xf0, 0x88, 0x59, 0x4e, 0x14, 0x1c, 0x60, 0x5e, 0xae, 0x7f, 0x7d, - 0x5c, 0x0e, 0x36, 0x93, 0x60, 0x37, 0x61, 0xda, 0xf4, 0x89, 0x11, 0x12, 0xab, 0x76, 0x30, 0x4c, - 0xe7, 0x98, 0x16, 0x57, 0x8f, 0x5a, 0xe0, 0xb8, 0x31, 0x55, 0x98, 0xd4, 0xf3, 0xa0, 0x52, 0xac, - 0x5b, 0xe6, 0x9e, 0x05, 0x7d, 0x16, 0x26, 0xbc, 0xfb, 0xae, 0x0c, 0x84, 0x38, 0x96, 0x30, 0xfb, - 0x94, 0x3b, 0xb4, 0x36, 0xe6, 0x8d, 0x58, 0x26, 0x0f, 0x91, 0xfb, 0x81, 0x2b, 0xb2, 0x95, 0xac, - 0xbc, 0x0f, 0xc8, 0x81, 0xa9, 0x2e, 0x9b, 0x06, 0xee, 0xe5, 0x1e, 0x8d, 0x95, 0xf9, 0x84, 0xaa, - 0xf9, 0x04, 0x19, 0x66, 0x1c, 0x91, 0xa0, 0x8a, 0x2f, 0x55, 0xce, 0x82, 0x9e, 0x61, 0x12, 0x55, - 0xf1, 0xdd, 0x88, 0x0a, 0x71, 0x0c, 0x47, 0x07, 0x50, 0xe1, 0x37, 0x92, 0xb9, 0x94, 0x9d, 0x2a, - 0xee, 0x80, 0x14, 0xdd, 0xbb, 0x1b, 0x63, 0xe3, 0x43, 0xaf, 0x14, 0x60, 0x95, 0x96, 0xfe, 0xcb, - 0x63, 0x92, 0x49, 0x85, 0xc4, 0xcf, 0xce, 0xb3, 0xae, 0x15, 0x7a, 0xaf, 0xe1, 0x93, 0x30, 0xd1, - 0xdb, 0x31, 0x82, 0x88, 0x53, 0xa3, 0xdc, 0x97, 0x13, 0x2d, 0x5a, 0xf8, 0xf0, 0xb0, 0x3a, 0x23, - 0x48, 0xb3, 0xdf, 0x98, 0xd7, 0x45, 0x7d, 0xb8, 0x10, 0x84, 0x86, 0x43, 0xda, 0xb6, 0xf0, 0x16, - 0x05, 0xa1, 0xd1, 0xed, 0x15, 0x48, 0x61, 0xc9, 0x8e, 0x93, 0xda, 0x83, 0xa8, 0x70, 0x16, 0x7e, - 0xf4, 0xd7, 0x34, 0x58, 0x62, 0xe5, 0xab, 0xfd, 0xd0, 0xe3, 0x59, 0x69, 0x63, 0xe2, 0xa7, 0x3f, - 0x4c, 0x65, 0xd6, 0x7d, 0x3b, 0x07, 0x1f, 0xce, 0xa5, 0xa4, 0xff, 0xa9, 0x06, 0x68, 0x70, 0x16, - 0x91, 0x03, 0x65, 0x8b, 0x6c, 0x1b, 0x7d, 0x27, 0x8c, 0x76, 0xe1, 0x42, 0xb7, 0x56, 0x63, 0x94, - 0xb1, 0x70, 0x6c, 0x08, 0xbc, 0x58, 0x52, 0x40, 0x1e, 0x4c, 0xdf, 0xdf, 0xb1, 0x43, 0xe2, 0xd8, - 0x41, 0x28, 0x04, 0xe4, 0xa8, 0xe4, 0xa4, 0xda, 0xf1, 0x66, 0x84, 0x18, 0xc7, 0x34, 0xf4, 0x5f, - 0x1c, 0x83, 0xf2, 0x29, 0x5e, 0xd7, 0xe9, 0x03, 0x12, 0xd7, 0xd5, 0xa9, 0xae, 0x42, 0x46, 0xf1, - 0x52, 0x31, 0x8d, 0xa2, 0x3e, 0x80, 0x0c, 0x67, 0x10, 0x40, 0x5f, 0x86, 0x8b, 0xb6, 0xbb, 0xed, - 0x1b, 0x41, 0xe8, 0xf7, 0xcd, 0xb0, 0xef, 0x47, 0x84, 0xc7, 0x8a, 0x10, 0x66, 0xd6, 0x7d, 0x33, - 0x03, 0x1d, 0xce, 0x24, 0x82, 0x08, 0x4c, 0xdd, 0xf7, 0xfc, 0x5d, 0x2a, 0xbf, 0xc6, 0x8b, 0xa7, - 0xf0, 0x7e, 0x93, 0xa1, 0x88, 0x05, 0x17, 0xff, 0x1d, 0xe0, 0x08, 0xb7, 0xfe, 0xc7, 0x1a, 0x4c, - 0xf0, 0xeb, 0x4f, 0x1f, 0x08, 0xd3, 0x86, 0x75, 0x35, 0x37, 0x2d, 0x1d, 0xb5, 0x38, 0x58, 0x8d, - 0x0f, 0x88, 0xc5, 0xc1, 0xfa, 0x9a, 0xa3, 0x4e, 0xfc, 0xf1, 0x98, 0xf8, 0x16, 0xb6, 0x5f, 0x37, - 0xe1, 0x82, 0xd0, 0x3b, 0x6f, 0xdb, 0xdb, 0x84, 0x72, 0x57, 0xc3, 0x38, 0x08, 0xc4, 0x5d, 0x5e, - 0x26, 0xf8, 0xea, 0x83, 0x60, 0x9c, 0xd5, 0x06, 0xfd, 0x1b, 0x8d, 0xee, 0x8c, 0xa1, 0x6f, 0x9b, - 0x23, 0x65, 0xd0, 0x93, 0x7d, 0x5b, 0x59, 0xe7, 0xc8, 0xb8, 0xc1, 0xbe, 0x19, 0x6f, 0x91, 0xac, - 0xf4, 0xe1, 0x61, 0xb5, 0x9a, 0xe1, 0x0d, 0x8c, 0xbc, 0xd7, 0x74, 0x60, 0xbf, 0xf6, 0xe3, 0x63, - 0xab, 0x30, 0x4f, 0x7a, 0xd4, 0x63, 0x74, 0x13, 0x26, 0x02, 0xd3, 0xeb, 0x91, 0xe3, 0x1e, 0x91, - 0x4a, 0x5b, 0x5c, 0x72, 0x80, 0xdb, 0xb4, 0x25, 0xe6, 0x08, 0x96, 0xdf, 0x81, 0x19, 0xb5, 0xe7, - 0x19, 0x0e, 0x81, 0x86, 0xea, 0x10, 0x38, 0xf5, 0xb1, 0x9a, 0xea, 0x40, 0xf8, 0xfd, 0x12, 0x88, - 0x77, 0x37, 0x86, 0x38, 0x2f, 0xb0, 0xa3, 0xac, 0x61, 0x23, 0xbc, 0x35, 0x92, 0x7e, 0xcc, 0x2f, - 0x1e, 0x03, 0x35, 0x71, 0x18, 0x72, 0x61, 0xd2, 0x31, 0xb6, 0x88, 0x13, 0xbd, 0xc2, 0x70, 0xbd, - 0xf8, 0x33, 0x01, 0x3c, 0xbb, 0x6e, 0x90, 0xf2, 0x2a, 0xf3, 0x42, 0x2c, 0xa8, 0x2c, 0xbf, 0x04, - 0x15, 0xa5, 0xda, 0xa9, 0x7c, 0x30, 0xdf, 0xd4, 0xe0, 0x72, 0xc4, 0x12, 0xc9, 0xeb, 0xfc, 0xe8, - 0x59, 0x28, 0x1b, 0x3d, 0x9b, 0xb9, 0x25, 0x55, 0xc7, 0xee, 0x6a, 0xab, 0xc9, 0xca, 0xb0, 0x84, - 0xa2, 0x8f, 0x43, 0x39, 0x9a, 0x27, 0xa1, 0xa3, 0xc8, 0x25, 0x2e, 0xcf, 0x53, 0x64, 0x0d, 0xf4, - 0x8c, 0x92, 0x07, 0x6d, 0x22, 0xde, 0xd1, 0x24, 0x61, 0x7e, 0x46, 0xaa, 0xff, 0x5a, 0x09, 0x66, - 0xb9, 0x2d, 0x5f, 0xb3, 0x5d, 0xcb, 0x76, 0x3b, 0x8f, 0x40, 0x94, 0x26, 0xde, 0x53, 0x2b, 0x9d, - 0xd5, 0x7b, 0x6a, 0xb7, 0x60, 0xf2, 0x5d, 0xba, 0xac, 0x23, 0x76, 0x18, 0x6a, 0x75, 0xc9, 0xb9, - 0x66, 0x12, 0x21, 0xc0, 0x02, 0x85, 0xfe, 0x5f, 0x35, 0x58, 0x4c, 0x0c, 0xcb, 0x23, 0x10, 0xca, - 0xdb, 0x49, 0xa1, 0xbc, 0x5a, 0x2c, 0xa9, 0x85, 0xd2, 0xe7, 0x1c, 0xe1, 0xfc, 0xbb, 0x25, 0x18, - 0x6f, 0x13, 0x62, 0x3d, 0x82, 0x99, 0x7e, 0x3b, 0xb1, 0x69, 0x7e, 0xb6, 0xf0, 0xdb, 0x1a, 0x79, - 0x16, 0xff, 0x76, 0xca, 0xe2, 0xff, 0x5c, 0x61, 0x0a, 0xc7, 0x9b, 0xfb, 0xbf, 0x51, 0x02, 0xa0, - 0xd5, 0xf8, 0x8b, 0x56, 0x22, 0x46, 0x2f, 0x7e, 0xf3, 0x70, 0xfa, 0xfd, 0xf2, 0x52, 0xa1, 0x2e, - 0xdf, 0x4d, 0x1a, 0x8b, 0xfd, 0xc9, 0xc9, 0x37, 0x93, 0x92, 0xab, 0x6f, 0xfc, 0x8c, 0x56, 0x9f, - 0xfe, 0xcf, 0x35, 0x60, 0x79, 0x95, 0x1b, 0x1b, 0x6d, 0xf4, 0x22, 0xcc, 0xda, 0xfc, 0xb4, 0xae, - 0xa1, 0x26, 0x8f, 0x62, 0x67, 0x0a, 0x4d, 0x15, 0x80, 0x93, 0xf5, 0x50, 0x57, 0x19, 0xd7, 0x11, - 0xde, 0x95, 0x13, 0xfd, 0x90, 0xd9, 0x43, 0x67, 0xb2, 0x27, 0x46, 0xff, 0x71, 0x09, 0xe6, 0x53, - 0x75, 0x87, 0xd0, 0xe7, 0xcf, 0x47, 0x7a, 0x29, 0x09, 0x45, 0xc7, 0xce, 0x3f, 0xa1, 0xa8, 0xcc, - 0xed, 0x39, 0x7e, 0xbe, 0xb9, 0x3d, 0xbf, 0xa7, 0x01, 0x7b, 0x1c, 0xee, 0x11, 0x48, 0xcf, 0xbf, - 0x94, 0x94, 0x9e, 0x9f, 0x29, 0xca, 0x38, 0x39, 0x42, 0xf3, 0xb7, 0x4b, 0xc0, 0xf2, 0xed, 0x8b, - 0xe0, 0x04, 0xe5, 0xbc, 0x5f, 0xcb, 0x39, 0xef, 0xbf, 0x2a, 0xc2, 0x05, 0x52, 0x8e, 0x2f, 0x25, - 0x64, 0xe0, 0xe3, 0x4a, 0x44, 0xc0, 0x58, 0x52, 0x8c, 0x0c, 0x46, 0x05, 0xa0, 0x07, 0x30, 0x1b, - 0xec, 0x78, 0x5e, 0x18, 0x99, 0xc0, 0x62, 0xee, 0x56, 0x0b, 0x87, 0xd4, 0x46, 0x9f, 0xc2, 0x17, - 0x66, 0x5b, 0xc5, 0x8d, 0x93, 0xa4, 0xd0, 0x0a, 0xc0, 0x96, 0xe3, 0x99, 0xbb, 0xf5, 0x66, 0x03, - 0x47, 0x81, 0x97, 0x2c, 0xa2, 0xa8, 0x26, 0x4b, 0xb1, 0x52, 0x43, 0xff, 0x43, 0x8d, 0x8f, 0xd6, - 0x29, 0x96, 0xd5, 0x23, 0x94, 0x92, 0x1f, 0x4d, 0x49, 0xc9, 0xbc, 0xd7, 0xe5, 0xbe, 0x2b, 0xbe, - 0x42, 0x3e, 0xdd, 0xe4, 0xc0, 0xac, 0xa3, 0x3e, 0xc3, 0x20, 0xd8, 0xb8, 0xd0, 0x0b, 0x0e, 0xe2, - 0xc1, 0x42, 0xa5, 0x08, 0x27, 0x91, 0x53, 0x31, 0x1a, 0x75, 0x5c, 0x7d, 0x96, 0x9a, 0x35, 0x6c, - 0xa9, 0x00, 0x9c, 0xac, 0xa7, 0xbf, 0x01, 0x1f, 0xe1, 0xdd, 0x66, 0x71, 0xcf, 0x6b, 0xfb, 0x26, - 0x09, 0x82, 0xba, 0xd1, 0x33, 0x4c, 0xaa, 0xd8, 0xb3, 0xeb, 0x82, 0xdc, 0xe3, 0x75, 0x8a, 0xa7, - 0xe3, 0xff, 0xbf, 0x06, 0x55, 0x05, 0x67, 0x22, 0x12, 0x24, 0x62, 0xd0, 0x6f, 0x69, 0x50, 0x31, - 0x5c, 0xd7, 0x0b, 0x0d, 0xf5, 0x00, 0xc6, 0x2a, 0xfe, 0xa0, 0x56, 0x2e, 0xa9, 0x95, 0xd5, 0x98, - 0x4c, 0xea, 0xa8, 0x55, 0x81, 0x60, 0xb5, 0x37, 0xcb, 0x9f, 0x83, 0x85, 0x74, 0xab, 0x53, 0xa9, - 0xf0, 0x35, 0xb8, 0xa4, 0xf4, 0x4a, 0x5c, 0xbc, 0xa2, 0xfa, 0xf2, 0x73, 0x30, 0xb5, 0x67, 0x07, - 0x76, 0x74, 0x81, 0x57, 0x19, 0xc5, 0x7b, 0xbc, 0x18, 0x47, 0x70, 0xfd, 0x75, 0xb8, 0xa0, 0xe2, - 0x60, 0x4b, 0x6c, 0xa3, 0x7d, 0x9a, 0x79, 0x58, 0x87, 0xab, 0x0a, 0x86, 0xcc, 0xdb, 0x47, 0xa7, - 0x41, 0xf7, 0xd5, 0xc9, 0x88, 0xc3, 0x45, 0x88, 0xfc, 0x77, 0x35, 0x78, 0x82, 0xe4, 0x31, 0x8c, - 0x60, 0xf7, 0x2f, 0x8c, 0x38, 0xa3, 0xb9, 0x0c, 0x29, 0xd2, 0xbb, 0xe4, 0x81, 0x71, 0x7e, 0xcf, - 0xd0, 0x01, 0x40, 0x20, 0xa7, 0x64, 0x94, 0xe8, 0xc9, 0xcc, 0x39, 0x16, 0x29, 0x3c, 0xe5, 0x6f, - 0xac, 0x10, 0x43, 0xef, 0x42, 0x39, 0x10, 0x33, 0x39, 0xca, 0xe5, 0xc8, 0x0c, 0xc6, 0x10, 0x01, - 0x62, 0xe2, 0x17, 0x96, 0x64, 0xd0, 0x6f, 0x6a, 0x70, 0xd1, 0xc9, 0x58, 0x17, 0x62, 0x4b, 0x68, - 0x9f, 0xc3, 0x92, 0xe3, 0x2e, 0xc0, 0x2c, 0x08, 0xce, 0xec, 0x0a, 0xfa, 0xc7, 0xb9, 0x37, 0xf1, - 0x78, 0xcc, 0xf2, 0xdd, 0x11, 0x3b, 0x79, 0x56, 0x97, 0xf2, 0xbe, 0x39, 0xc5, 0x55, 0x14, 0xe6, - 0xa9, 0xda, 0x82, 0xc9, 0x2d, 0xa6, 0xe2, 0x0b, 0x56, 0x2f, 0x6c, 0x4f, 0x88, 0xe7, 0xba, 0x99, - 0xfe, 0xcd, 0xff, 0xc7, 0x02, 0x33, 0x7a, 0x0b, 0xc6, 0x2c, 0x37, 0x7a, 0xcd, 0xe3, 0x95, 0x11, - 0xf4, 0xdb, 0x38, 0xc0, 0x94, 0x72, 0x07, 0x45, 0x8a, 0x5c, 0x28, 0xbb, 0x62, 0x57, 0x17, 0xbc, - 0x58, 0xf8, 0x3d, 0x43, 0xa9, 0x1d, 0x48, 0x9d, 0x24, 0x2a, 0xc1, 0x92, 0x06, 0xa5, 0x27, 0x15, - 0xf6, 0xf1, 0xd1, 0xe8, 0x0d, 0xf5, 0xe8, 0x7b, 0x4b, 0xd5, 0xbd, 0x4f, 0xf1, 0x94, 0xf6, 0x6c, - 0xae, 0xde, 0x4d, 0x60, 0x32, 0x34, 0x58, 0xbc, 0xc2, 0x64, 0xf1, 0x78, 0x01, 0xda, 0xff, 0xbb, - 0x14, 0x4b, 0xac, 0x4a, 0xb0, 0x9f, 0x01, 0x16, 0xc8, 0x29, 0x63, 0xf1, 0xa7, 0x16, 0xc5, 0x81, - 0x59, 0x61, 0xc6, 0xe2, 0x79, 0xec, 0x39, 0x63, 0xf1, 0xff, 0xb1, 0xc0, 0x8c, 0xde, 0xa1, 0xea, - 0x24, 0x97, 0xe3, 0x22, 0x1b, 0xd3, 0xeb, 0x23, 0xae, 0xb1, 0x20, 0x0a, 0x51, 0xe5, 0xbf, 0xb0, - 0xc4, 0x8f, 0xb6, 0x60, 0x4a, 0x98, 0x6e, 0xe2, 0x62, 0xed, 0x2b, 0x23, 0x64, 0xfb, 0x8d, 0x9e, - 0x66, 0xe0, 0x97, 0xdb, 0x22, 0xc4, 0xfa, 0x3f, 0x29, 0x73, 0xa3, 0x5b, 0x9c, 0xf5, 0x6d, 0x43, - 0x39, 0x42, 0x37, 0x4a, 0xb8, 0x74, 0x94, 0x8d, 0x9d, 0x7f, 0x5a, 0xf4, 0x0b, 0x4b, 0xdc, 0xa8, - 0x9e, 0x15, 0x99, 0x1e, 0x67, 0xcc, 0x1b, 0x2e, 0x2a, 0x3d, 0x19, 0x8a, 0x32, 0xf6, 0x28, 0x42, - 0x51, 0xce, 0xf2, 0xed, 0xfa, 0x57, 0x61, 0x3e, 0x8a, 0x14, 0xb1, 0x08, 0x73, 0x08, 0x8b, 0x18, - 0x4a, 0x76, 0x57, 0xab, 0x9e, 0x04, 0xe1, 0x74, 0x5d, 0xf4, 0xfb, 0x1a, 0x94, 0x4d, 0xb1, 0x4b, - 0x8b, 0x75, 0x75, 0x7b, 0x34, 0xcf, 0xcc, 0x4a, 0xb4, 0xe9, 0x73, 0x75, 0xef, 0x5e, 0x24, 0x23, - 0xa2, 0xe2, 0x33, 0xf2, 0xd4, 0xcb, 0x5e, 0xa3, 0xff, 0x40, 0x95, 0x59, 0x87, 0xe5, 0x88, 0x67, - 0x57, 0x5f, 0x78, 0x70, 0xe7, 0x9d, 0x11, 0xbf, 0x62, 0x35, 0xc6, 0xc8, 0x3f, 0xe4, 0x8b, 0x52, - 0x6f, 0x8d, 0x21, 0x67, 0xf4, 0x2d, 0x6a, 0xf7, 0x97, 0x77, 0x61, 0x36, 0x31, 0x82, 0xe7, 0x79, - 0x60, 0xb0, 0xec, 0xc2, 0x42, 0xfa, 0x43, 0xcf, 0xf5, 0x80, 0xe2, 0x16, 0x4c, 0x4b, 0x09, 0x8c, - 0x9e, 0x56, 0x08, 0xc5, 0x3b, 0xe4, 0x2d, 0x72, 0xc0, 0xa9, 0x56, 0x13, 0x0a, 0x3e, 0x37, 0xdb, - 0xef, 0xd1, 0x02, 0x81, 0x50, 0xff, 0x5f, 0x1a, 0x97, 0x3a, 0xe2, 0x39, 0x12, 0x03, 0x2a, 0x5d, - 0x9e, 0x18, 0x8a, 0x25, 0x22, 0x2d, 0x76, 0x17, 0x8d, 0x85, 0x35, 0xac, 0xc7, 0x68, 0xb0, 0x8a, - 0x13, 0xdd, 0x1f, 0x7c, 0x30, 0xe7, 0xfa, 0x68, 0xdb, 0xc3, 0xd0, 0xef, 0xe6, 0xa0, 0xc1, 0x36, - 0xea, 0xf3, 0x24, 0xda, 0xf1, 0xcf, 0x93, 0x9c, 0xfc, 0x68, 0x85, 0xfe, 0x1d, 0x0d, 0x32, 0xd3, - 0x29, 0x23, 0x1d, 0x26, 0x79, 0x30, 0xb5, 0xfa, 0x92, 0x10, 0x8f, 0xb4, 0xc6, 0x02, 0x82, 0x7c, - 0xb8, 0x28, 0x42, 0x95, 0x6f, 0x91, 0x83, 0xf8, 0x0d, 0x1b, 0xc1, 0x30, 0xc3, 0x07, 0x2d, 0xb2, - 0x84, 0x31, 0xed, 0x14, 0x26, 0x9c, 0x89, 0x9b, 0x45, 0xcb, 0x32, 0x8d, 0xfb, 0x83, 0x71, 0xa4, - 0xcc, 0xba, 0x7a, 0xbe, 0xd1, 0xb2, 0x9c, 0xc4, 0xc9, 0xd1, 0xb2, 0xac, 0xde, 0x07, 0xe4, 0xec, - 0x9a, 0xf5, 0x35, 0xc7, 0xd3, 0xf7, 0x3d, 0x0d, 0x16, 0x07, 0xae, 0x9c, 0x0f, 0x75, 0xf2, 0xf9, - 0xc8, 0x1c, 0x58, 0xcf, 0xa4, 0x9f, 0x82, 0xa9, 0x64, 0x66, 0xa2, 0x78, 0x13, 0x66, 0x13, 0x8e, - 0x3e, 0x79, 0x83, 0x49, 0xcb, 0xbc, 0xc1, 0xa4, 0x5e, 0x50, 0x2a, 0x1d, 0x7b, 0x41, 0xe9, 0x68, - 0x46, 0x4c, 0x37, 0x33, 0x9a, 0xde, 0x86, 0x49, 0x76, 0x8d, 0x28, 0x7a, 0x0a, 0xeb, 0xe5, 0xc2, - 0xd7, 0x93, 0x02, 0x2e, 0x06, 0xf8, 0xff, 0x58, 0x60, 0x45, 0x0d, 0x58, 0x60, 0x4f, 0x24, 0xb7, - 0x7c, 0x6f, 0xdb, 0x76, 0xc8, 0x46, 0x2c, 0x71, 0xe4, 0xa5, 0xe5, 0x7a, 0x0a, 0x8e, 0x07, 0x5a, - 0x20, 0xcc, 0xcd, 0x2e, 0xbe, 0x10, 0x5e, 0x2c, 0xe8, 0xf0, 0xe6, 0x69, 0xa1, 0xa4, 0xb9, 0xf5, - 0x2e, 0x00, 0x89, 0x26, 0x2e, 0x8a, 0x74, 0x79, 0xb5, 0xd8, 0x75, 0x6c, 0x39, 0xfd, 0x91, 0xc4, - 0x90, 0x45, 0x01, 0x56, 0x88, 0x20, 0x1f, 0x2a, 0x3b, 0xf1, 0x4b, 0x39, 0xc2, 0x06, 0x7a, 0x6d, - 0xc4, 0x57, 0x7a, 0xf8, 0x06, 0xa5, 0x14, 0x60, 0x95, 0x08, 0xf2, 0x13, 0x4f, 0x53, 0x8f, 0xf0, - 0x0e, 0x41, 0xac, 0x3a, 0x9f, 0xf4, 0x2c, 0x35, 0xa5, 0xe9, 0xca, 0x7b, 0x80, 0xa3, 0x18, 0x4d, - 0xf1, 0x6d, 0xc2, 0x98, 0x66, 0x5c, 0x86, 0x15, 0x2a, 0x74, 0x6c, 0xbb, 0xf1, 0xdd, 0x4f, 0x61, - 0x43, 0xbd, 0x36, 0xe2, 0x1d, 0x5c, 0xb1, 0xf9, 0xc7, 0x05, 0x58, 0x25, 0x82, 0x5c, 0x80, 0xae, - 0xbc, 0x12, 0x2a, 0x6c, 0xa9, 0x42, 0xdf, 0x19, 0x5f, 0x2c, 0xe5, 0xde, 0xaa, 0xf8, 0x37, 0x56, - 0x28, 0x50, 0x23, 0x51, 0x5a, 0xec, 0x50, 0xdc, 0x8a, 0x1a, 0xca, 0x5a, 0xff, 0x74, 0xac, 0x49, - 0x54, 0xd8, 0x7a, 0x7d, 0x52, 0xd1, 0x22, 0x1e, 0x1e, 0x56, 0x67, 0x98, 0x0c, 0x19, 0xd0, 0x2a, - 0x62, 0xf7, 0xfc, 0xcc, 0x71, 0xee, 0x79, 0x74, 0x03, 0x16, 0x03, 0xf5, 0xb8, 0x9b, 0x09, 0x86, - 0x59, 0xd6, 0x44, 0x5e, 0x21, 0x6e, 0xa7, 0x2b, 0xe0, 0xc1, 0x36, 0x5c, 0xf0, 0x11, 0x8b, 0xb5, - 0x9f, 0x53, 0x05, 0x1f, 0x2f, 0xc3, 0x12, 0x8a, 0xf6, 0x52, 0x2f, 0x38, 0xcf, 0x8f, 0x6a, 0x66, - 0x0f, 0xf7, 0x9c, 0x33, 0xfa, 0xb2, 0xfa, 0x4a, 0xe7, 0x42, 0xf1, 0xb8, 0xa7, 0xec, 0x6b, 0xc0, - 0x27, 0xbc, 0xd4, 0xd9, 0x4f, 0x46, 0xfc, 0x2e, 0x9e, 0x49, 0x88, 0xa5, 0x74, 0xd8, 0xe7, 0x46, - 0xfb, 0x7e, 0xa7, 0x0c, 0x15, 0x45, 0xf7, 0x78, 0x2f, 0x6e, 0x77, 0x84, 0x50, 0x31, 0x3d, 0x37, - 0x08, 0x7d, 0x43, 0xb9, 0xd1, 0x32, 0x22, 0x4d, 0xf9, 0xe1, 0xf5, 0x18, 0x33, 0x56, 0xc9, 0xd0, - 0x25, 0x2a, 0x1d, 0x1d, 0x63, 0x67, 0xe0, 0xe8, 0x90, 0x4b, 0x34, 0xc3, 0xd9, 0xf1, 0x29, 0x80, - 0x48, 0xd2, 0xcb, 0x67, 0x10, 0x65, 0x8a, 0xb0, 0x66, 0x70, 0x53, 0xc2, 0xb0, 0x52, 0x0f, 0x3d, - 0x80, 0x59, 0x47, 0x4d, 0x0f, 0x24, 0xb6, 0xa1, 0x42, 0x47, 0x91, 0x89, 0x3c, 0x43, 0xd1, 0xa9, - 0x98, 0x52, 0x84, 0x93, 0xa4, 0x28, 0x1b, 0x38, 0x51, 0x4a, 0xab, 0x91, 0x9c, 0x76, 0x32, 0x31, - 0x56, 0xcc, 0x06, 0xb2, 0x28, 0xc0, 0x0a, 0x91, 0x1c, 0xcf, 0xca, 0x54, 0x21, 0xcf, 0x4a, 0x1f, - 0x2e, 0xf8, 0x24, 0xf4, 0x0f, 0xea, 0x07, 0x26, 0x7b, 0xec, 0xcc, 0x0f, 0x59, 0x3e, 0xa9, 0x72, - 0xb1, 0x80, 0x71, 0x3c, 0x88, 0x0a, 0x67, 0xe1, 0x4f, 0x88, 0xb8, 0xe9, 0x63, 0x45, 0xdc, 0xa7, - 0xa1, 0x12, 0x12, 0x73, 0xc7, 0xb5, 0x4d, 0xc3, 0x69, 0x36, 0xc4, 0xa5, 0xce, 0x78, 0xb5, 0xc6, - 0x20, 0xac, 0xd6, 0x43, 0x35, 0x18, 0xeb, 0xdb, 0x96, 0x90, 0xf3, 0x3f, 0x23, 0xdf, 0xbc, 0x6c, - 0x36, 0x1e, 0x1e, 0x56, 0x3f, 0x14, 0xbb, 0x2a, 0xe4, 0x57, 0x5d, 0xeb, 0xed, 0x76, 0xae, 0x85, - 0x07, 0x3d, 0x12, 0xac, 0x6c, 0x36, 0x1b, 0x98, 0x36, 0xce, 0xf2, 0x3a, 0xcd, 0x0c, 0xef, 0x75, - 0xd2, 0x6f, 0x03, 0xc4, 0xc2, 0x64, 0x64, 0x3f, 0xc0, 0x4f, 0x27, 0xe0, 0xd2, 0xa8, 0xe7, 0x6b, - 0x2c, 0xf1, 0x12, 0xcb, 0x06, 0xbf, 0xba, 0x1d, 0x12, 0xff, 0xce, 0x9d, 0xf5, 0xbb, 0x3b, 0x3e, - 0x09, 0x76, 0x3c, 0xc7, 0x2a, 0x98, 0xf9, 0x29, 0x7e, 0x4c, 0x60, 0x00, 0x23, 0xce, 0xa1, 0x84, - 0xea, 0xb0, 0x18, 0x65, 0xa4, 0xc7, 0x46, 0x48, 0x6a, 0x7d, 0x3f, 0x08, 0x45, 0x58, 0x20, 0x73, - 0x68, 0xae, 0xa5, 0x81, 0x78, 0xb0, 0x7e, 0x1a, 0x09, 0xcf, 0x4c, 0x3f, 0xce, 0x1e, 0xac, 0x1b, - 0x40, 0xc2, 0xd3, 0xd3, 0x0f, 0xd6, 0x57, 0x91, 0xc8, 0x07, 0xee, 0x98, 0xec, 0x48, 0x21, 0x89, - 0x5f, 0xbf, 0x1b, 0xac, 0x8f, 0x2c, 0x78, 0xca, 0x27, 0xa6, 0xd7, 0xed, 0x12, 0xd7, 0xe2, 0x29, - 0xfb, 0x0c, 0xbf, 0x63, 0xbb, 0xd7, 0x7d, 0x83, 0x55, 0x14, 0xaf, 0xe8, 0x5d, 0x3d, 0x3a, 0xac, - 0x3e, 0x85, 0x8f, 0xa9, 0x87, 0x8f, 0xc5, 0x82, 0xba, 0x30, 0xdf, 0x67, 0x99, 0x4a, 0xfc, 0xa6, - 0x1b, 0x12, 0x7f, 0xcf, 0x70, 0x0a, 0xbe, 0xb7, 0xc0, 0x78, 0x77, 0x33, 0x89, 0x0a, 0xa7, 0x71, - 0xa3, 0x03, 0x2a, 0x16, 0x44, 0x77, 0x14, 0x92, 0xe5, 0xe2, 0xa9, 0xc9, 0xf0, 0x20, 0x3a, 0x9c, - 0x45, 0x43, 0xff, 0xfb, 0x1a, 0x88, 0x93, 0x04, 0x6a, 0x1f, 0x2a, 0x46, 0x6e, 0xf9, 0xbd, 0x7f, - 0x77, 0xf7, 0x3e, 0x08, 0x04, 0x2c, 0x1f, 0xd4, 0x50, 0xd9, 0x84, 0x4e, 0x7e, 0x48, 0x35, 0xce, - 0x67, 0x34, 0x96, 0x9b, 0xcf, 0xe8, 0xbb, 0x1a, 0xa4, 0xdf, 0xdd, 0xa2, 0x56, 0xb7, 0xb8, 0x74, - 0x22, 0x42, 0xd7, 0x79, 0x6c, 0x15, 0x2f, 0xc2, 0x11, 0x2c, 0xa9, 0xab, 0x8d, 0x10, 0xa3, 0x9e, - 0x1d, 0x2f, 0x7c, 0xbc, 0xae, 0xa6, 0xff, 0x70, 0x0e, 0x26, 0xf9, 0x35, 0x09, 0x2a, 0x7b, 0x32, - 0xc2, 0x31, 0x6e, 0x15, 0xbf, 0x88, 0x51, 0x20, 0xea, 0x22, 0x91, 0xb6, 0xa2, 0x74, 0x6c, 0xda, - 0x0a, 0xcc, 0x93, 0x8a, 0x8d, 0x60, 0x9f, 0xd7, 0x71, 0x53, 0xe4, 0xb1, 0x16, 0x09, 0xc5, 0x50, - 0x98, 0x30, 0x5c, 0xc7, 0x8b, 0xa7, 0x4b, 0xe3, 0x03, 0xa0, 0x98, 0xaf, 0x73, 0xc7, 0x98, 0xae, - 0x71, 0x5c, 0xfa, 0x44, 0x71, 0x67, 0xae, 0x18, 0xf2, 0x21, 0xe2, 0xd2, 0x25, 0xc7, 0x4f, 0xe6, - 0x72, 0xfc, 0x36, 0x4c, 0x09, 0xb9, 0x21, 0x84, 0xd8, 0x2b, 0x23, 0x24, 0x0c, 0x53, 0x2e, 0x12, - 0xf2, 0x02, 0x1c, 0x21, 0xa7, 0x3b, 0x63, 0xd7, 0xd8, 0xb7, 0xbb, 0xfd, 0x2e, 0x93, 0x5c, 0x13, - 0x6a, 0x55, 0x56, 0x8c, 0x23, 0x38, 0xab, 0xca, 0x7d, 0xe0, 0x4c, 0x1f, 0x51, 0xab, 0x8a, 0x77, - 0x18, 0x22, 0x38, 0x7a, 0x0b, 0xca, 0x5d, 0x63, 0xbf, 0xdd, 0xf7, 0x3b, 0x44, 0x98, 0xac, 0xf9, - 0x8e, 0xd8, 0x7e, 0x68, 0x3b, 0x2b, 0x54, 0x8b, 0x0e, 0xfd, 0x95, 0xa6, 0x1b, 0xde, 0xf1, 0xdb, - 0xa1, 0x2f, 0x73, 0x23, 0xad, 0x0b, 0x2c, 0x58, 0xe2, 0x43, 0x0e, 0xcc, 0x75, 0x8d, 0xfd, 0x4d, - 0xd7, 0x90, 0xe9, 0xe2, 0x2b, 0x05, 0x29, 0x30, 0xbf, 0xdd, 0x7a, 0x02, 0x17, 0x4e, 0xe1, 0xce, - 0x70, 0x11, 0xce, 0x9c, 0x97, 0x8b, 0x70, 0x55, 0x9e, 0x6b, 0xcf, 0x32, 0x26, 0x7c, 0x22, 0xcb, - 0x5b, 0x7e, 0xfc, 0x99, 0xf5, 0xdb, 0xf2, 0xcc, 0x7a, 0xae, 0xb8, 0x5f, 0xef, 0x98, 0xf3, 0xea, - 0x3e, 0x54, 0x2c, 0xf9, 0xee, 0x7b, 0xb0, 0x34, 0x5f, 0xdc, 0xae, 0x8c, 0x9f, 0x8f, 0x57, 0x92, - 0xb9, 0xc6, 0xa8, 0xb1, 0x4a, 0x07, 0xdd, 0xe1, 0xe9, 0xc4, 0x1d, 0x12, 0xc6, 0x55, 0x98, 0x5e, - 0xbc, 0xc0, 0x5d, 0x07, 0x51, 0xf6, 0xef, 0x81, 0x0a, 0x38, 0xbb, 0x1d, 0x55, 0x25, 0x79, 0x30, - 0xed, 0x62, 0x7c, 0x7f, 0x39, 0x71, 0x51, 0xe5, 0x97, 0x34, 0x58, 0xe0, 0xcf, 0xbc, 0xd4, 0xbd, - 0x6e, 0xcf, 0x73, 0x09, 0x9d, 0x16, 0xc4, 0xc6, 0xf4, 0xf3, 0xc5, 0x65, 0x43, 0x3b, 0x85, 0x51, - 0x1c, 0x73, 0xa4, 0x4a, 0xf1, 0x00, 0x65, 0xf4, 0x7b, 0x1a, 0x2c, 0x75, 0x73, 0x72, 0xa5, 0x2e, - 0x5d, 0x28, 0x1e, 0x9c, 0x73, 0x52, 0xfe, 0x55, 0xfe, 0xf4, 0xd4, 0x49, 0xb5, 0x70, 0x6e, 0xdf, - 0x46, 0x0d, 0xe1, 0x1b, 0xe5, 0x02, 0xcf, 0xcf, 0xc3, 0x42, 0x7a, 0x0f, 0x50, 0x13, 0xa0, 0x6b, - 0xe7, 0x9a, 0x00, 0x5d, 0x7f, 0x15, 0x2e, 0x67, 0xcf, 0x39, 0x55, 0x89, 0xd8, 0x4b, 0x02, 0xc2, - 0x12, 0x89, 0xd3, 0x7b, 0xd1, 0x42, 0xcc, 0x61, 0xb5, 0x4f, 0x7c, 0xff, 0x27, 0x57, 0x1e, 0xfb, - 0xc1, 0x4f, 0xae, 0x3c, 0xf6, 0xa3, 0x9f, 0x5c, 0x79, 0xec, 0xab, 0x47, 0x57, 0xb4, 0xef, 0x1f, - 0x5d, 0xd1, 0x7e, 0x70, 0x74, 0x45, 0xfb, 0xd1, 0xd1, 0x15, 0xed, 0x7f, 0x1c, 0x5d, 0xd1, 0x7e, - 0xe5, 0x7f, 0x5e, 0x79, 0xec, 0xad, 0x29, 0xd1, 0xa3, 0x3f, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x29, - 0xa3, 0x30, 0xff, 0x7f, 0xaa, 0x00, 0x00, + // 8886 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x7d, 0x6d, 0x6c, 0x24, 0xc9, + 0x75, 0xd8, 0xf5, 0xf0, 0x6b, 0xf8, 0x86, 0xe4, 0x92, 0xb5, 0x1f, 0xc7, 0xe3, 0xdd, 0xed, 0x9c, + 0x5a, 0x3a, 0xe1, 0x2e, 0x92, 0xb8, 0xbe, 0x93, 0xe4, 0xd3, 0xdd, 0xe9, 0x74, 0xc7, 0x99, 0xe1, + 0xee, 0x8e, 0x76, 0xc9, 0x9d, 0xab, 0x59, 0xee, 0x49, 0xe7, 0xe4, 0xa2, 0x66, 0x77, 0x71, 0xd8, + 0xc7, 0x9e, 0xee, 0xb9, 0xee, 0x1e, 0x2e, 0xb9, 0x72, 0x20, 0x45, 0x88, 0xec, 0x7c, 0x38, 0x8e, + 0xe1, 0x58, 0x11, 0x62, 0x25, 0xb0, 0x8c, 0x20, 0x31, 0x02, 0x07, 0xb2, 0x83, 0x44, 0x46, 0x82, + 0x24, 0x80, 0x61, 0x23, 0x90, 0x6c, 0x24, 0x80, 0x60, 0x44, 0x88, 0x82, 0xc4, 0x54, 0xc4, 0x00, + 0x42, 0x82, 0xe4, 0x9f, 0x91, 0x3f, 0x0b, 0x03, 0x09, 0xea, 0xa3, 0xab, 0xab, 0x7b, 0xba, 0xc9, + 0x61, 0x0f, 0xc9, 0xbb, 0xfd, 0x45, 0x4e, 0xbd, 0xaa, 0xf7, 0xaa, 0xab, 0x5e, 0xbd, 0x7a, 0xef, + 0xd5, 0xab, 0x57, 0x50, 0xeb, 0xd8, 0xe1, 0x76, 0x7f, 0x73, 0xd9, 0xf4, 0xba, 0xd7, 0x3a, 0x86, + 0x6f, 0x11, 0x97, 0xf8, 0xf1, 0x3f, 0xbd, 0x9d, 0xce, 0x35, 0xa3, 0x67, 0x07, 0xd7, 0x4c, 0xcf, + 0x27, 0xd7, 0x76, 0x5f, 0xd8, 0x24, 0xa1, 0xf1, 0xc2, 0xb5, 0x0e, 0x85, 0x19, 0x21, 0xb1, 0x96, + 0x7b, 0xbe, 0x17, 0x7a, 0xe8, 0xc5, 0x18, 0xc7, 0x72, 0xd4, 0x34, 0xfe, 0xa7, 0xb7, 0xd3, 0x59, + 0xa6, 0x38, 0x96, 0x29, 0x8e, 0x65, 0x81, 0x63, 0xe9, 0x13, 0x2a, 0x5d, 0xaf, 0xe3, 0x5d, 0x63, + 0xa8, 0x36, 0xfb, 0x5b, 0xec, 0x17, 0xfb, 0xc1, 0xfe, 0xe3, 0x24, 0x96, 0x9e, 0xdf, 0xf9, 0x4c, + 0xb0, 0x6c, 0x7b, 0xb4, 0x33, 0xd7, 0x8c, 0x7e, 0xe8, 0x05, 0xa6, 0xe1, 0xd8, 0x6e, 0xe7, 0xda, + 0xee, 0x40, 0x6f, 0x96, 0x74, 0xa5, 0xaa, 0xe8, 0xf6, 0x91, 0x75, 0xfc, 0x4d, 0xc3, 0xcc, 0xaa, + 0xf3, 0xa9, 0xb8, 0x4e, 0xd7, 0x30, 0xb7, 0x6d, 0x97, 0xf8, 0xfb, 0xd1, 0x80, 0x5c, 0xf3, 0x49, + 0xe0, 0xf5, 0x7d, 0x93, 0x9c, 0xa8, 0x55, 0x70, 0xad, 0x4b, 0x42, 0x23, 0x8b, 0xd6, 0xb5, 0xbc, + 0x56, 0x7e, 0xdf, 0x0d, 0xed, 0xee, 0x20, 0x99, 0x9f, 0x3d, 0xae, 0x41, 0x60, 0x6e, 0x93, 0xae, + 0x31, 0xd0, 0xee, 0x93, 0x79, 0xed, 0xfa, 0xa1, 0xed, 0x5c, 0xb3, 0xdd, 0x30, 0x08, 0xfd, 0x74, + 0x23, 0xfd, 0x45, 0x98, 0x58, 0xb1, 0x2c, 0xcf, 0x45, 0xcf, 0xc3, 0x14, 0x71, 0x8d, 0x4d, 0x87, + 0x58, 0x8b, 0xda, 0x33, 0xda, 0x73, 0xe5, 0xda, 0x85, 0xef, 0x1f, 0x54, 0x1f, 0x3b, 0x3c, 0xa8, + 0x4e, 0xad, 0xf2, 0x62, 0x1c, 0xc1, 0xf5, 0x6f, 0x94, 0x60, 0x92, 0x35, 0x0a, 0xd0, 0xaf, 0x6a, + 0x70, 0x71, 0xa7, 0xbf, 0x49, 0x7c, 0x97, 0x84, 0x24, 0x68, 0x18, 0xc1, 0xf6, 0xa6, 0x67, 0xf8, + 0x1c, 0x45, 0xe5, 0xc5, 0x1b, 0xcb, 0x27, 0xe7, 0x9e, 0xe5, 0x5b, 0x83, 0xe8, 0x6a, 0x8f, 0x1f, + 0x1e, 0x54, 0x2f, 0x66, 0x00, 0x70, 0x16, 0x71, 0xb4, 0x0b, 0x33, 0x6e, 0xc7, 0x76, 0xf7, 0x9a, + 0x6e, 0xc7, 0x27, 0x41, 0xb0, 0x58, 0x62, 0x9d, 0x79, 0xa3, 0x48, 0x67, 0xd6, 0x15, 0x3c, 0xb5, + 0xf9, 0xc3, 0x83, 0xea, 0x8c, 0x5a, 0x82, 0x13, 0x74, 0xf4, 0x5f, 0xd0, 0xe0, 0xc2, 0x8a, 0xd5, + 0xb5, 0x83, 0xc0, 0xf6, 0xdc, 0x96, 0xd3, 0xef, 0xd8, 0x2e, 0x7a, 0x06, 0xc6, 0x5d, 0xa3, 0x4b, + 0xd8, 0x80, 0x4c, 0xd7, 0x66, 0xc4, 0x98, 0x8e, 0xaf, 0x1b, 0x5d, 0x82, 0x19, 0x04, 0xbd, 0x09, + 0x93, 0xa6, 0xe7, 0x6e, 0xd9, 0x1d, 0xd1, 0xcf, 0x4f, 0x2c, 0xf3, 0x79, 0x5c, 0x56, 0xe7, 0x91, + 0x75, 0x4f, 0xcc, 0xff, 0x32, 0x36, 0xee, 0xaf, 0xee, 0x85, 0xc4, 0xa5, 0x64, 0x6a, 0x70, 0x78, + 0x50, 0x9d, 0xac, 0x33, 0x04, 0x58, 0x20, 0xd2, 0xaf, 0x43, 0x79, 0xc5, 0x21, 0x7e, 0x68, 0xbb, + 0x1d, 0xf4, 0x0a, 0xcc, 0x91, 0xae, 0x61, 0x3b, 0x98, 0x98, 0xc4, 0xde, 0x25, 0x7e, 0xb0, 0xa8, + 0x3d, 0x33, 0xf6, 0xdc, 0x74, 0x0d, 0x1d, 0x1e, 0x54, 0xe7, 0x56, 0x13, 0x10, 0x9c, 0xaa, 0xa9, + 0xff, 0x55, 0x0d, 0x2a, 0x2b, 0x7d, 0xcb, 0x0e, 0x39, 0x7e, 0xe4, 0x43, 0xc5, 0xa0, 0x3f, 0x5b, + 0x9e, 0x63, 0x9b, 0xfb, 0x62, 0x92, 0x5f, 0x2f, 0x32, 0xae, 0x2b, 0x31, 0x9a, 0xda, 0x85, 0xc3, + 0x83, 0x6a, 0x45, 0x29, 0xc0, 0x2a, 0x11, 0x7d, 0x1b, 0x54, 0x18, 0xfa, 0x22, 0xcc, 0xf0, 0x8f, + 0x5c, 0x33, 0x7a, 0x98, 0x6c, 0x89, 0x3e, 0x7c, 0x58, 0x19, 0xb3, 0x88, 0xd0, 0xf2, 0x9d, 0xcd, + 0x77, 0x89, 0x19, 0x62, 0xb2, 0x45, 0x7c, 0xe2, 0x9a, 0x84, 0x4f, 0x5f, 0x5d, 0x69, 0x8c, 0x13, + 0xa8, 0xf4, 0x1f, 0x6b, 0x30, 0xbf, 0xb2, 0x6b, 0xd8, 0x8e, 0xb1, 0x69, 0x3b, 0x76, 0xb8, 0xff, + 0xb6, 0xe7, 0x92, 0x21, 0xe6, 0x6f, 0x03, 0x1e, 0xef, 0xbb, 0x06, 0x6f, 0xe7, 0x90, 0x35, 0x3e, + 0x63, 0x77, 0xf7, 0x7b, 0x84, 0x32, 0x1e, 0x1d, 0xe9, 0x27, 0x0f, 0x0f, 0xaa, 0x8f, 0x6f, 0x64, + 0x57, 0xc1, 0x79, 0x6d, 0x11, 0x86, 0x2b, 0x0a, 0xe8, 0x9e, 0xe7, 0xf4, 0xbb, 0x02, 0xeb, 0x18, + 0xc3, 0xba, 0x74, 0x78, 0x50, 0xbd, 0xb2, 0x91, 0x59, 0x03, 0xe7, 0xb4, 0xd4, 0xbf, 0x5f, 0x82, + 0x99, 0x9a, 0x61, 0xee, 0xf4, 0x7b, 0xb5, 0xbe, 0xb9, 0x43, 0x42, 0xf4, 0x25, 0x28, 0x53, 0xb1, + 0x65, 0x19, 0xa1, 0x21, 0x46, 0xf2, 0x67, 0x72, 0xb9, 0x8f, 0x4d, 0x22, 0xad, 0x1d, 0x8f, 0xed, + 0x1a, 0x09, 0x8d, 0x1a, 0x12, 0x63, 0x02, 0x71, 0x19, 0x96, 0x58, 0xd1, 0x16, 0x8c, 0x07, 0x3d, + 0x62, 0x0a, 0xde, 0x6e, 0x14, 0xe1, 0x15, 0xb5, 0xc7, 0xed, 0x1e, 0x31, 0xe3, 0x59, 0xa0, 0xbf, + 0x30, 0xc3, 0x8f, 0x5c, 0x98, 0x0c, 0x42, 0x23, 0xec, 0xd3, 0xe1, 0xa1, 0x94, 0xae, 0x8f, 0x4c, + 0x89, 0x61, 0xab, 0xcd, 0x09, 0x5a, 0x93, 0xfc, 0x37, 0x16, 0x54, 0xf4, 0xff, 0xac, 0xc1, 0xbc, + 0x5a, 0xfd, 0xb6, 0x1d, 0x84, 0xe8, 0x2f, 0x0e, 0x0c, 0xe7, 0xf2, 0x70, 0xc3, 0x49, 0x5b, 0xb3, + 0xc1, 0x9c, 0x17, 0xe4, 0xca, 0x51, 0x89, 0x32, 0x94, 0x04, 0x26, 0xec, 0x90, 0x74, 0x39, 0x5b, + 0x15, 0x94, 0x67, 0x6a, 0x97, 0x6b, 0xb3, 0x82, 0xd8, 0x44, 0x93, 0xa2, 0xc5, 0x1c, 0xbb, 0xfe, + 0x25, 0xb8, 0xa4, 0xd6, 0x6a, 0xf9, 0xde, 0xae, 0x6d, 0x11, 0x9f, 0xae, 0x84, 0x70, 0xbf, 0x37, + 0xb0, 0x12, 0x28, 0x67, 0x61, 0x06, 0x41, 0x1f, 0x85, 0x49, 0x9f, 0x74, 0x6c, 0xcf, 0x65, 0xb3, + 0x3d, 0x1d, 0x8f, 0x1d, 0x66, 0xa5, 0x58, 0x40, 0xf5, 0xff, 0x5b, 0x4a, 0x8e, 0x1d, 0x9d, 0x46, + 0xb4, 0x0b, 0xe5, 0x9e, 0x20, 0x25, 0xc6, 0xee, 0xe6, 0xa8, 0x1f, 0x18, 0x75, 0x3d, 0x1e, 0xd5, + 0xa8, 0x04, 0x4b, 0x5a, 0xc8, 0x86, 0xb9, 0xe8, 0xff, 0xfa, 0x08, 0x62, 0x98, 0x89, 0xd3, 0x56, + 0x02, 0x11, 0x4e, 0x21, 0x46, 0x77, 0x61, 0x3a, 0x20, 0xa6, 0x4f, 0xa8, 0x4c, 0x12, 0x6c, 0x9a, + 0x29, 0xb8, 0xda, 0x51, 0x25, 0x21, 0xb8, 0x16, 0x44, 0xf7, 0xa7, 0x25, 0x00, 0xc7, 0x88, 0xd0, + 0x73, 0x50, 0x0e, 0x08, 0xb1, 0xa8, 0x44, 0x5a, 0x1c, 0xe7, 0x73, 0x43, 0x3f, 0xb5, 0x2d, 0xca, + 0xb0, 0x84, 0xea, 0xdf, 0x1e, 0x07, 0x34, 0xc8, 0xe2, 0xea, 0x08, 0xf0, 0x12, 0x31, 0xfe, 0xa3, + 0x8c, 0x80, 0x58, 0x2d, 0x29, 0xc4, 0xe8, 0x01, 0xcc, 0x3a, 0x46, 0x10, 0xde, 0xe9, 0x51, 0x1d, + 0x24, 0x62, 0x94, 0xca, 0x8b, 0x2b, 0x45, 0x66, 0xfa, 0xb6, 0x8a, 0xa8, 0xb6, 0x70, 0x78, 0x50, + 0x9d, 0x4d, 0x14, 0xe1, 0x24, 0x29, 0xf4, 0x2e, 0x4c, 0xd3, 0x82, 0x55, 0xdf, 0xf7, 0x7c, 0x31, + 0xfa, 0xaf, 0x15, 0xa5, 0xcb, 0x90, 0xd4, 0x66, 0xe9, 0x9c, 0xc8, 0x9f, 0x38, 0x46, 0x8f, 0x3e, + 0x0f, 0xc8, 0xdb, 0x0c, 0x88, 0xbf, 0x4b, 0xac, 0x1b, 0x5c, 0xe1, 0xa2, 0x1f, 0x4b, 0x67, 0x67, + 0xac, 0xb6, 0x24, 0x66, 0x13, 0xdd, 0x19, 0xa8, 0x81, 0x33, 0x5a, 0xa1, 0x1d, 0x40, 0x52, 0x69, + 0x93, 0x0c, 0xb0, 0x38, 0x31, 0x3c, 0xfb, 0x5c, 0xa1, 0xc4, 0x6e, 0x0c, 0xa0, 0xc0, 0x19, 0x68, + 0xf5, 0x7f, 0x5f, 0x82, 0x0a, 0x67, 0x91, 0x55, 0x37, 0xf4, 0xf7, 0xcf, 0x61, 0x83, 0x20, 0x89, + 0x0d, 0xa2, 0x5e, 0x7c, 0xcd, 0xb3, 0x0e, 0xe7, 0xee, 0x0f, 0xdd, 0xd4, 0xfe, 0xb0, 0x3a, 0x2a, + 0xa1, 0xa3, 0xb7, 0x87, 0x1f, 0x6a, 0x70, 0x41, 0xa9, 0x7d, 0x0e, 0xbb, 0x83, 0x95, 0xdc, 0x1d, + 0x5e, 0x1f, 0xf1, 0xfb, 0x72, 0x36, 0x07, 0x2f, 0xf1, 0x59, 0x4c, 0x70, 0xbf, 0x08, 0xb0, 0xc9, + 0xc4, 0xc9, 0x7a, 0xac, 0x27, 0xc9, 0x29, 0xaf, 0x49, 0x08, 0x56, 0x6a, 0x25, 0x64, 0x56, 0xe9, + 0x48, 0x99, 0xf5, 0xbd, 0x12, 0x2c, 0x0c, 0x0c, 0xfb, 0xa0, 0x1c, 0xd1, 0xde, 0x27, 0x39, 0x52, + 0x7a, 0x3f, 0xe4, 0xc8, 0x58, 0x11, 0x39, 0xa2, 0xff, 0x81, 0x06, 0x63, 0x75, 0xdc, 0x44, 0x1f, + 0x4b, 0x68, 0xb4, 0x8f, 0xab, 0x1a, 0xed, 0xc3, 0x83, 0xea, 0x54, 0x1d, 0x37, 0x15, 0xe5, 0xf6, + 0x6f, 0x6b, 0xb0, 0x60, 0x7a, 0x6e, 0x68, 0x50, 0xd6, 0xc4, 0x5c, 0xec, 0x47, 0x2c, 0x56, 0x48, + 0x99, 0xab, 0xa7, 0x90, 0xd5, 0x9e, 0x10, 0x1d, 0x58, 0x48, 0x43, 0x02, 0x3c, 0x48, 0x59, 0xdf, + 0x80, 0xe9, 0xba, 0xe3, 0xf5, 0xad, 0xa6, 0xbb, 0xe5, 0x9d, 0xa2, 0x46, 0xf2, 0x23, 0x0d, 0x66, + 0x18, 0xde, 0x96, 0xef, 0x6d, 0xd9, 0x0e, 0x79, 0x34, 0x14, 0x63, 0xb5, 0xc7, 0x79, 0x82, 0x8f, + 0x29, 0xaa, 0x6a, 0xc5, 0x47, 0x44, 0x51, 0x55, 0xbb, 0x9c, 0x23, 0x8b, 0xbe, 0x31, 0x95, 0xfc, + 0x32, 0x26, 0x8d, 0x9e, 0x83, 0xb2, 0x69, 0xd4, 0xfa, 0xae, 0xe5, 0x48, 0xbe, 0xa0, 0xbd, 0xac, + 0xaf, 0xf0, 0x32, 0x2c, 0xa1, 0xe8, 0x01, 0x40, 0xec, 0x3c, 0x10, 0xd3, 0x70, 0x7d, 0x34, 0x87, + 0x45, 0x9b, 0x84, 0xd4, 0xe6, 0x0e, 0xe2, 0xa9, 0x8f, 0x61, 0x58, 0xa1, 0x86, 0xfe, 0x0a, 0xcc, + 0x8a, 0x41, 0x6e, 0x76, 0x8d, 0x8e, 0xb0, 0xe9, 0x0a, 0x8e, 0xd4, 0x9a, 0x82, 0xa8, 0x76, 0x59, + 0x10, 0x9e, 0x55, 0x4b, 0x03, 0x9c, 0xa4, 0x86, 0xf6, 0x61, 0xa6, 0xab, 0xda, 0xa9, 0xe3, 0xc5, + 0xb7, 0x0c, 0xc5, 0x66, 0xad, 0x5d, 0x12, 0xc4, 0x67, 0x12, 0x16, 0x6e, 0x82, 0x54, 0x86, 0xba, + 0x3d, 0x71, 0x56, 0xea, 0x36, 0x81, 0x29, 0xbe, 0xbc, 0x83, 0xc5, 0x49, 0xf6, 0x81, 0xaf, 0x14, + 0xf9, 0x40, 0x2e, 0x29, 0x62, 0x6f, 0x18, 0xff, 0x1d, 0xe0, 0x08, 0x37, 0xda, 0x85, 0x19, 0xba, + 0x5b, 0xb5, 0x89, 0x43, 0xcc, 0xd0, 0xf3, 0x17, 0xa7, 0x8a, 0x7b, 0x9b, 0xda, 0x0a, 0x1e, 0xee, + 0xae, 0x50, 0x4b, 0x70, 0x82, 0x8e, 0x94, 0x7e, 0xe5, 0x5c, 0xe9, 0xd7, 0x87, 0xca, 0xae, 0xe2, + 0x37, 0x98, 0x66, 0x83, 0xf0, 0xb9, 0x22, 0x1d, 0x8b, 0x9d, 0x08, 0xb5, 0x8b, 0x82, 0x50, 0x45, + 0x75, 0x38, 0xa8, 0x74, 0xf4, 0x5f, 0x9c, 0x84, 0x85, 0xba, 0xd3, 0x0f, 0x42, 0xe2, 0xaf, 0x08, + 0x77, 0x2e, 0xf1, 0xd1, 0xd7, 0x34, 0xb8, 0xc2, 0xfe, 0x6d, 0x78, 0xf7, 0xdd, 0x06, 0x71, 0x8c, + 0xfd, 0x95, 0x2d, 0x5a, 0xc3, 0xb2, 0x4e, 0x26, 0x81, 0x1a, 0x7d, 0xb1, 0x53, 0x33, 0x07, 0x48, + 0x3b, 0x13, 0x23, 0xce, 0xa1, 0x84, 0xfe, 0x96, 0x06, 0x4f, 0x64, 0x80, 0x1a, 0xc4, 0x21, 0x21, + 0x11, 0x32, 0xe0, 0xa4, 0xfd, 0x78, 0xfa, 0xf0, 0xa0, 0xfa, 0x44, 0x3b, 0x0f, 0x29, 0xce, 0xa7, + 0x87, 0x7e, 0x59, 0x83, 0xa5, 0x0c, 0xe8, 0x75, 0xc3, 0x76, 0xfa, 0x3e, 0x11, 0x8a, 0xea, 0x49, + 0xbb, 0x73, 0xf5, 0xf0, 0xa0, 0xba, 0xd4, 0xce, 0xc5, 0x8a, 0x8f, 0xa0, 0x88, 0xbe, 0x02, 0x97, + 0x25, 0x74, 0xc3, 0x75, 0x09, 0xb1, 0x88, 0x75, 0xd7, 0x16, 0x76, 0xe5, 0xc9, 0xbb, 0xf2, 0xc4, + 0xe1, 0x41, 0xf5, 0x72, 0x3b, 0x0b, 0x21, 0xce, 0xa6, 0x83, 0x3a, 0xf0, 0x74, 0x0c, 0x08, 0x6d, + 0xc7, 0x7e, 0xc0, 0x30, 0xdd, 0xdd, 0xf6, 0x49, 0xb0, 0xed, 0x39, 0x16, 0x13, 0x16, 0x5a, 0xed, + 0x43, 0x87, 0x07, 0xd5, 0xa7, 0xdb, 0x47, 0x55, 0xc4, 0x47, 0xe3, 0x41, 0x16, 0xcc, 0x04, 0xa6, + 0xe1, 0x36, 0xdd, 0x90, 0xf8, 0xbb, 0x86, 0xb3, 0x38, 0x59, 0xe8, 0x03, 0xf9, 0x12, 0x55, 0xf0, + 0xe0, 0x04, 0x56, 0xfd, 0x7f, 0x69, 0x50, 0x11, 0x2b, 0x81, 0x29, 0x2c, 0x9b, 0x30, 0x61, 0xd2, + 0x0d, 0x4b, 0x70, 0xfc, 0x6b, 0x85, 0x37, 0x46, 0x8a, 0x2d, 0xde, 0x15, 0x59, 0x11, 0xe6, 0xa8, + 0xd1, 0x6e, 0xc6, 0xb6, 0x56, 0x1b, 0x6d, 0x5b, 0x63, 0xd4, 0x8e, 0xd9, 0xd2, 0xf4, 0x83, 0x31, + 0x98, 0xae, 0x7b, 0xae, 0x65, 0x33, 0x25, 0xf9, 0x85, 0x84, 0x6a, 0xf6, 0xb4, 0x2a, 0x9c, 0x1e, + 0x1e, 0x54, 0x67, 0x65, 0x45, 0x45, 0x5a, 0xbd, 0x2c, 0x2d, 0x34, 0xae, 0xab, 0x7d, 0x28, 0x69, + 0x5a, 0x3d, 0x3c, 0xa8, 0x5e, 0x90, 0xcd, 0x92, 0xd6, 0x16, 0xda, 0x05, 0x44, 0x75, 0xe6, 0xbb, + 0xbe, 0xe1, 0x06, 0x1c, 0x2d, 0x65, 0x5a, 0xbe, 0x7e, 0xfe, 0xc2, 0x70, 0x73, 0x4a, 0x5b, 0xc4, + 0x2a, 0xf5, 0xed, 0x01, 0x6c, 0x38, 0x83, 0x02, 0x7a, 0x17, 0xe6, 0x68, 0xe9, 0x46, 0xcf, 0x32, + 0x42, 0xa2, 0x2c, 0x94, 0x93, 0xd0, 0xbc, 0x22, 0x68, 0xce, 0xdd, 0x4e, 0x60, 0xc2, 0x29, 0xcc, + 0x5c, 0x95, 0x35, 0x02, 0xcf, 0x65, 0x6b, 0x20, 0xa1, 0xca, 0xd2, 0x52, 0x2c, 0xa0, 0xe8, 0x79, + 0x98, 0xea, 0x92, 0x20, 0x30, 0x3a, 0x84, 0x31, 0xf5, 0x74, 0xbc, 0x73, 0xad, 0xf1, 0x62, 0x1c, + 0xc1, 0xd1, 0xc7, 0x61, 0xc2, 0xf4, 0x2c, 0x12, 0x2c, 0x4e, 0x31, 0x8f, 0xf2, 0x15, 0xc6, 0x4b, + 0xb4, 0xe0, 0xe1, 0x41, 0x75, 0x9a, 0x19, 0x20, 0xf4, 0x17, 0xe6, 0x95, 0xf4, 0xdf, 0xa0, 0x8a, + 0x64, 0x4a, 0x21, 0x1f, 0x42, 0x05, 0x3f, 0x3f, 0xff, 0x9a, 0xfe, 0x83, 0x12, 0x5c, 0xa2, 0x3d, + 0xf4, 0x3d, 0xc7, 0xa1, 0x42, 0xb6, 0xe7, 0x78, 0xfb, 0x5d, 0xe2, 0x86, 0x1f, 0xa8, 0x5e, 0xa2, + 0x37, 0x60, 0xb2, 0xc7, 0xcf, 0x4f, 0xc6, 0x58, 0x77, 0x9e, 0xa3, 0x93, 0xc8, 0x4f, 0x37, 0x1e, + 0x1e, 0x54, 0x97, 0xb2, 0x3e, 0x40, 0x9c, 0x8b, 0x88, 0x76, 0xc8, 0x4e, 0x69, 0x1c, 0x9c, 0xe9, + 0x3e, 0x39, 0xa4, 0x06, 0x6f, 0x6c, 0x12, 0x67, 0x58, 0x25, 0x43, 0xff, 0x69, 0x09, 0xae, 0xc4, + 0x3d, 0x6a, 0xba, 0x41, 0x68, 0x38, 0x0e, 0xb7, 0x83, 0xcf, 0xde, 0x44, 0xea, 0x25, 0x4c, 0xa4, + 0xf5, 0xa2, 0xe6, 0xe6, 0x60, 0xdf, 0x73, 0xbd, 0x44, 0x7b, 0x29, 0x2f, 0x51, 0xeb, 0x14, 0x69, + 0x1e, 0xed, 0x30, 0xfa, 0xdf, 0x1a, 0x2c, 0x65, 0x37, 0x3c, 0x07, 0x83, 0xcd, 0x4b, 0x1a, 0x6c, + 0x9f, 0x3f, 0xbd, 0xaf, 0xce, 0x31, 0xdd, 0xfe, 0x53, 0xee, 0xd7, 0x32, 0x23, 0x6e, 0x0b, 0x2e, + 0x50, 0xed, 0x3a, 0x08, 0x85, 0x3b, 0xe3, 0x64, 0xe7, 0x7c, 0x91, 0x4b, 0xe3, 0x02, 0x4e, 0xe2, + 0xc0, 0x69, 0xa4, 0x68, 0x1d, 0xa6, 0x28, 0xb7, 0x53, 0xfc, 0xa5, 0xe1, 0xf1, 0x4b, 0x81, 0xda, + 0xe6, 0x6d, 0x71, 0x84, 0x44, 0xff, 0x73, 0x0d, 0x9e, 0x3a, 0x6a, 0xf6, 0xd1, 0x7b, 0x00, 0x66, + 0xb4, 0x87, 0xf1, 0x83, 0xd8, 0xa2, 0x5a, 0x40, 0x84, 0x25, 0x5e, 0x42, 0xb2, 0x28, 0xc0, 0x0a, + 0x91, 0x0c, 0xef, 0x7e, 0xe9, 0x8c, 0xbc, 0xfb, 0xfa, 0xff, 0xd1, 0x54, 0x61, 0xa1, 0x8e, 0xfe, + 0xa3, 0x26, 0x2c, 0xd4, 0xbe, 0xe7, 0x7a, 0x56, 0x92, 0x4b, 0x56, 0x6d, 0xf2, 0xc8, 0x2d, 0x59, + 0xb5, 0xf3, 0x39, 0x4b, 0xf6, 0xef, 0x94, 0xf2, 0xbe, 0x96, 0x2d, 0xd9, 0xfb, 0x30, 0x1d, 0xc5, + 0xcd, 0x44, 0x8c, 0x7d, 0x7d, 0xd4, 0x3e, 0x71, 0x74, 0xf1, 0xf1, 0x57, 0x54, 0x12, 0xe0, 0x98, + 0x16, 0xda, 0x03, 0xb0, 0xe4, 0x46, 0x29, 0x66, 0xff, 0xe6, 0x68, 0x94, 0xe3, 0x8d, 0xb7, 0x36, + 0x47, 0xf9, 0x2d, 0xfe, 0x8d, 0x15, 0x5a, 0xfa, 0xef, 0x96, 0x00, 0x0d, 0x76, 0x97, 0x2a, 0x1b, + 0x3b, 0xb6, 0x6b, 0xa5, 0x95, 0x8d, 0x5b, 0xb6, 0x6b, 0x61, 0x06, 0x91, 0xea, 0x48, 0x29, 0x57, + 0x1d, 0x79, 0x0d, 0x2e, 0x74, 0x1c, 0x6f, 0xd3, 0x70, 0x9c, 0x7d, 0x11, 0x7d, 0xc3, 0x36, 0xa4, + 0x72, 0xed, 0x22, 0x95, 0x6b, 0x37, 0x92, 0x20, 0x9c, 0xae, 0x8b, 0x7a, 0x30, 0xef, 0x13, 0xd3, + 0x73, 0x4d, 0xdb, 0x61, 0xca, 0xa3, 0xd7, 0x0f, 0x0b, 0x9a, 0x70, 0x97, 0x0e, 0x0f, 0xaa, 0xf3, + 0x38, 0x85, 0x0b, 0x0f, 0x60, 0x47, 0xcf, 0xc2, 0x54, 0xcf, 0xb7, 0xbb, 0x86, 0xbf, 0xcf, 0xd4, + 0xd3, 0x72, 0xad, 0x42, 0x05, 0x64, 0x8b, 0x17, 0xe1, 0x08, 0xa6, 0x7f, 0x4b, 0x83, 0xb1, 0xc6, + 0x7a, 0x1b, 0xe9, 0x30, 0x69, 0x79, 0x5d, 0xc3, 0x76, 0xc5, 0x28, 0xb1, 0x20, 0x96, 0x06, 0x2b, + 0xc1, 0x02, 0x82, 0x7a, 0x30, 0x1d, 0xc9, 0x97, 0x91, 0x0e, 0x35, 0x1a, 0xeb, 0x6d, 0x79, 0x10, + 0x2c, 0x59, 0x29, 0x2a, 0x09, 0x70, 0x4c, 0x44, 0x37, 0x60, 0xa1, 0xb1, 0xde, 0x6e, 0xba, 0xa6, + 0xd3, 0xb7, 0xc8, 0xea, 0x1e, 0xfb, 0x43, 0xbf, 0xcc, 0xe6, 0x25, 0x22, 0x70, 0x86, 0x7d, 0x99, + 0xa8, 0x84, 0x23, 0x18, 0xad, 0x46, 0x78, 0x0b, 0x11, 0xf5, 0xc1, 0xaa, 0x09, 0x24, 0x38, 0x82, + 0xe9, 0x3f, 0x2a, 0x41, 0x45, 0xe9, 0x10, 0x72, 0x60, 0x8a, 0x7f, 0x6e, 0x74, 0xe8, 0xba, 0x5a, + 0xf0, 0x13, 0x93, 0xbd, 0xe6, 0xd4, 0xf9, 0x80, 0x06, 0x38, 0x22, 0xa1, 0xce, 0x52, 0x29, 0x7f, + 0x96, 0xd0, 0x32, 0x00, 0x3f, 0x5e, 0x66, 0xe7, 0x33, 0x5c, 0x4b, 0x65, 0x0b, 0xa1, 0x2d, 0x4b, + 0xb1, 0x52, 0x03, 0x3d, 0x25, 0xf8, 0x99, 0x9f, 0x3e, 0x97, 0x53, 0xbc, 0xbc, 0x05, 0x13, 0x0f, + 0x3c, 0x97, 0x04, 0xc2, 0xd1, 0x77, 0x4a, 0x1f, 0x38, 0x4d, 0x05, 0xd4, 0xdb, 0x14, 0x2f, 0xe6, + 0xe8, 0xf5, 0xdf, 0xd4, 0x00, 0x1a, 0x46, 0x68, 0x70, 0xbf, 0xd4, 0x10, 0x81, 0x3b, 0x4f, 0x25, + 0x96, 0x61, 0x79, 0xe0, 0xe8, 0x60, 0x3c, 0xb0, 0x1f, 0x44, 0x9f, 0x2f, 0xf7, 0x1e, 0x8e, 0xbd, + 0x6d, 0x3f, 0x20, 0x98, 0xc1, 0xd1, 0xc7, 0x60, 0x9a, 0xb8, 0xa6, 0xbf, 0xdf, 0x0b, 0x89, 0xc5, + 0x46, 0xa0, 0xcc, 0xcf, 0x73, 0x56, 0xa3, 0x42, 0x1c, 0xc3, 0xf5, 0x5d, 0x28, 0xaf, 0xba, 0x56, + 0xcf, 0xb3, 0xb9, 0x51, 0x72, 0x4c, 0x07, 0x9f, 0x86, 0xb1, 0xbe, 0xef, 0x88, 0xfe, 0x55, 0x44, + 0x85, 0xb1, 0x0d, 0x7c, 0x1b, 0xd3, 0x72, 0x6a, 0xe9, 0xf5, 0xfa, 0x7e, 0xcf, 0x0b, 0xa2, 0x4e, + 0x4a, 0xc5, 0xa4, 0xc5, 0x8b, 0x71, 0x04, 0xd7, 0x1f, 0x6a, 0x30, 0xbf, 0xba, 0xd7, 0xb3, 0x7d, + 0x16, 0x11, 0x44, 0x7c, 0xba, 0xa5, 0xd3, 0xf6, 0xbb, 0xfc, 0x5f, 0xd1, 0x07, 0xd9, 0x5e, 0xd4, + 0xc0, 0x11, 0x1c, 0x6d, 0xc1, 0x1c, 0x61, 0xcd, 0xa9, 0x50, 0x68, 0x18, 0xd2, 0x57, 0x76, 0x12, + 0x43, 0x97, 0x07, 0x9c, 0x25, 0xb0, 0xe0, 0x14, 0x56, 0xd4, 0x86, 0x39, 0xd3, 0x31, 0x82, 0xc0, + 0xde, 0xb2, 0xcd, 0xf8, 0xac, 0x6b, 0xba, 0xf6, 0x31, 0xda, 0xb6, 0x9e, 0x80, 0x3c, 0x3c, 0xa8, + 0x5e, 0x16, 0xfd, 0x4c, 0x02, 0x70, 0x0a, 0x85, 0xfe, 0x07, 0x1a, 0x4c, 0x4b, 0x45, 0xe6, 0x83, + 0x65, 0x0b, 0x3e, 0x07, 0x65, 0xcb, 0x0e, 0x54, 0x01, 0xcf, 0x4e, 0x2b, 0x1a, 0xa2, 0x0c, 0x4b, + 0xa8, 0x1e, 0x40, 0xf9, 0x86, 0x58, 0x23, 0x68, 0x09, 0x4a, 0x76, 0xb4, 0xbf, 0x80, 0xf8, 0x80, + 0x52, 0xb3, 0x81, 0x4b, 0xb6, 0x25, 0xb9, 0xaa, 0x94, 0xcb, 0x55, 0xca, 0xb4, 0x8f, 0x1d, 0x3d, + 0xed, 0xfa, 0x77, 0x34, 0xa8, 0xdc, 0xb4, 0x37, 0x89, 0xef, 0x72, 0x2d, 0xee, 0xd9, 0x74, 0x8c, + 0x68, 0x25, 0x2b, 0x3e, 0x14, 0xed, 0xc1, 0x74, 0x60, 0x6e, 0x13, 0xab, 0xef, 0xc8, 0xb3, 0xc2, + 0x42, 0x91, 0xa0, 0x0a, 0xe9, 0xb6, 0xc0, 0xa7, 0xc4, 0xc2, 0x44, 0x14, 0x70, 0x4c, 0x4c, 0xff, + 0x32, 0x5c, 0xcc, 0x68, 0x84, 0xaa, 0x30, 0x11, 0x84, 0x86, 0x1f, 0x8a, 0x31, 0x63, 0xb2, 0xa3, + 0x4d, 0x0b, 0x30, 0x2f, 0x47, 0x4f, 0xc0, 0x18, 0x71, 0x2d, 0x31, 0x68, 0x53, 0x74, 0x95, 0xad, + 0xba, 0x16, 0xa6, 0x65, 0x74, 0x8a, 0x1c, 0x2f, 0xc1, 0x8c, 0x6c, 0x8a, 0x6e, 0x8b, 0x32, 0x2c, + 0xa1, 0xfa, 0x2f, 0x4d, 0xc2, 0xd3, 0x37, 0x3d, 0xdf, 0x7e, 0xe0, 0xb9, 0xa1, 0xe1, 0xb4, 0x3c, + 0x2b, 0xf6, 0x7e, 0x8b, 0xe9, 0xfe, 0xba, 0x06, 0x8f, 0x9b, 0xbd, 0x7e, 0xd3, 0xb5, 0x43, 0xdb, + 0x88, 0x9c, 0x92, 0x2d, 0xe2, 0xdb, 0x5e, 0x51, 0x27, 0x38, 0x8b, 0x2d, 0xac, 0xb7, 0x36, 0xb2, + 0x50, 0xe2, 0x3c, 0x5a, 0xe8, 0x5d, 0x98, 0xb3, 0xbc, 0xfb, 0x2e, 0x77, 0x91, 0x12, 0xc7, 0xd8, + 0x2f, 0xe8, 0xfa, 0x66, 0x2c, 0xde, 0x48, 0x60, 0xc2, 0x29, 0xcc, 0xcc, 0xef, 0x2f, 0x8b, 0xda, + 0x21, 0x8b, 0xad, 0x7c, 0x10, 0x0f, 0x67, 0x41, 0xbf, 0x7f, 0x23, 0x13, 0x23, 0xce, 0xa1, 0x84, + 0xbe, 0x02, 0x97, 0x6d, 0x3e, 0x10, 0x98, 0x18, 0x96, 0xed, 0x92, 0x20, 0xe0, 0xdf, 0x3d, 0x82, + 0x63, 0xbb, 0x99, 0x85, 0x10, 0x67, 0xd3, 0x41, 0xef, 0x00, 0x04, 0xfb, 0xae, 0x29, 0xe6, 0x7a, + 0xa2, 0x10, 0x55, 0xbe, 0x05, 0x4b, 0x2c, 0x58, 0xc1, 0x48, 0x77, 0xa1, 0xd0, 0x73, 0x88, 0x6f, + 0xb8, 0x26, 0xf7, 0xfb, 0x69, 0x7c, 0x17, 0xba, 0x1b, 0x15, 0xe2, 0x18, 0x8e, 0x2c, 0x98, 0xe9, + 0xf7, 0x94, 0xc9, 0x9f, 0x2a, 0xee, 0xfc, 0xde, 0x50, 0xf0, 0xe0, 0x04, 0x56, 0xfd, 0x9f, 0x69, + 0x30, 0x25, 0x22, 0xa3, 0xd1, 0x47, 0x53, 0xfa, 0x9e, 0xf4, 0x82, 0xa4, 0x74, 0xbe, 0x7d, 0x66, + 0x1f, 0x0b, 0x8d, 0x5a, 0x30, 0x65, 0x21, 0x85, 0x41, 0x10, 0x8e, 0xd5, 0xf3, 0x84, 0x9d, 0x1c, + 0xa9, 0xec, 0x0a, 0x31, 0xfd, 0xdb, 0x1a, 0x2c, 0x0c, 0xb4, 0x1a, 0x42, 0x99, 0x3f, 0x47, 0xff, + 0xe6, 0xaf, 0x01, 0xb0, 0x20, 0xf8, 0x95, 0x56, 0xb3, 0x4d, 0xfc, 0x5d, 0x29, 0x56, 0xfe, 0xa6, + 0x06, 0xf3, 0xb1, 0x27, 0x5e, 0xf4, 0x42, 0x2b, 0x1e, 0x57, 0x70, 0x2b, 0x85, 0xab, 0xb6, 0x28, + 0xbe, 0x7b, 0x3e, 0x0d, 0xc1, 0x03, 0x74, 0xd1, 0xdf, 0xd0, 0x60, 0xde, 0x48, 0x06, 0xc1, 0x47, + 0x9b, 0x40, 0xa1, 0xe0, 0xae, 0x54, 0x40, 0x7d, 0xdc, 0x97, 0x14, 0x20, 0xc0, 0x03, 0x64, 0xd1, + 0xa7, 0x60, 0xc6, 0xe8, 0xd9, 0x2b, 0x7d, 0xcb, 0x26, 0xae, 0x29, 0x23, 0xa7, 0x19, 0xe3, 0xae, + 0xb4, 0x9a, 0xb2, 0x1c, 0x27, 0x6a, 0xc9, 0x28, 0x77, 0x31, 0x90, 0xe3, 0x23, 0x46, 0xb9, 0x8b, + 0x31, 0x8c, 0xa3, 0xdc, 0xc5, 0xd0, 0xa9, 0x44, 0xd0, 0xcf, 0xc1, 0x13, 0x7c, 0xf7, 0xac, 0x19, + 0x81, 0x6d, 0xae, 0xf4, 0xc3, 0x6d, 0xe2, 0x86, 0x91, 0x0e, 0xc4, 0x2d, 0x2a, 0x76, 0xce, 0xb8, + 0x9a, 0x57, 0x09, 0xe7, 0xb7, 0x47, 0x2e, 0x80, 0x67, 0x5b, 0xa6, 0xf8, 0x1e, 0x7e, 0xd4, 0x55, + 0xe8, 0x18, 0xf8, 0x4e, 0xb3, 0x51, 0x17, 0x9f, 0xc3, 0x84, 0x51, 0xfc, 0x1b, 0x2b, 0x14, 0xd0, + 0x37, 0x35, 0x98, 0x15, 0x4c, 0x2e, 0x68, 0x4e, 0xb1, 0xf9, 0x7f, 0xbb, 0x28, 0x33, 0xa6, 0x18, + 0x7e, 0x19, 0xab, 0xc8, 0x79, 0xb8, 0x9a, 0x0c, 0x7c, 0x48, 0xc0, 0x70, 0xb2, 0x1f, 0xe8, 0xef, + 0x69, 0x70, 0x29, 0x20, 0xfe, 0xae, 0x6d, 0x92, 0x15, 0xd3, 0xf4, 0xfa, 0x6e, 0x34, 0xc9, 0xe5, + 0xe2, 0x7e, 0x83, 0x76, 0x06, 0xbe, 0xda, 0xe2, 0xe1, 0x41, 0xf5, 0x52, 0x16, 0x04, 0x67, 0xd2, + 0xa7, 0xbb, 0xe4, 0x85, 0xfb, 0x46, 0x68, 0x6e, 0xd7, 0x0d, 0x73, 0x9b, 0x99, 0x17, 0xc1, 0xe2, + 0x74, 0xf1, 0x88, 0xc8, 0xb7, 0x92, 0xa8, 0xb8, 0xdb, 0x20, 0x55, 0x88, 0xd3, 0x04, 0x51, 0x00, + 0x65, 0x9f, 0xbc, 0xd7, 0x27, 0x41, 0x18, 0x2c, 0x02, 0x23, 0xde, 0x1c, 0x79, 0xc6, 0xb0, 0x40, + 0xc8, 0xb5, 0xa6, 0xe8, 0x17, 0x96, 0x84, 0x96, 0xde, 0x00, 0x34, 0x38, 0x9d, 0x68, 0x1e, 0xc6, + 0x76, 0x08, 0xbf, 0x61, 0x32, 0x8d, 0xe9, 0xbf, 0xe8, 0x12, 0x4c, 0xec, 0x1a, 0x4e, 0x9f, 0x6b, + 0xb6, 0x65, 0xcc, 0x7f, 0xbc, 0x52, 0xfa, 0x8c, 0xa6, 0xff, 0x9e, 0x06, 0x97, 0x33, 0x69, 0x22, + 0x0c, 0x57, 0xba, 0xc6, 0xde, 0xba, 0xe7, 0xae, 0xf5, 0x43, 0x23, 0xb4, 0xdd, 0x4e, 0xd3, 0xdd, + 0x72, 0xec, 0xce, 0x36, 0x57, 0x04, 0x27, 0xb8, 0x2a, 0xb1, 0x96, 0x59, 0x03, 0xe7, 0xb4, 0x44, + 0x4d, 0xb8, 0xd8, 0x35, 0xf6, 0x06, 0x10, 0x96, 0x18, 0x42, 0x76, 0x4f, 0x69, 0x6d, 0x10, 0x8c, + 0xb3, 0xda, 0xe8, 0xdf, 0x18, 0x87, 0x27, 0x69, 0xc7, 0xe3, 0xfd, 0x66, 0xcd, 0x70, 0x8d, 0xce, + 0x07, 0x53, 0xae, 0x7f, 0x47, 0x83, 0xc7, 0xb7, 0xb3, 0xb5, 0x5b, 0xb1, 0xe3, 0xbd, 0x59, 0x48, + 0xc7, 0x3f, 0x4a, 0x61, 0xe6, 0x07, 0xfd, 0x47, 0x56, 0xc1, 0x79, 0x9d, 0x42, 0x6f, 0xc0, 0xbc, + 0xeb, 0x59, 0xa4, 0xde, 0x6c, 0xe0, 0x35, 0x23, 0xd8, 0x69, 0x47, 0xc6, 0xfc, 0x04, 0x77, 0x6a, + 0xad, 0xa7, 0x60, 0x78, 0xa0, 0x36, 0xda, 0x05, 0xd4, 0xf3, 0xac, 0xd5, 0x5d, 0xdb, 0x8c, 0x4e, + 0x7c, 0x8b, 0x3b, 0xd2, 0x58, 0x10, 0x76, 0x6b, 0x00, 0x1b, 0xce, 0xa0, 0xa0, 0xff, 0x91, 0x06, + 0x17, 0xe8, 0x8c, 0xb4, 0x7c, 0x6f, 0x6f, 0xff, 0x83, 0xc8, 0x0b, 0xcf, 0xc3, 0x78, 0xd7, 0xb3, + 0x22, 0x23, 0xf3, 0x32, 0xd5, 0x88, 0xd6, 0x3c, 0x8b, 0x3c, 0xe4, 0x8e, 0xb5, 0xbd, 0x7d, 0xfa, + 0x03, 0xb3, 0x2a, 0xfa, 0x7f, 0xd5, 0xb8, 0xce, 0x12, 0xd9, 0x62, 0x1f, 0x48, 0xde, 0x7e, 0x09, + 0x66, 0x69, 0xd9, 0x9a, 0xb1, 0xd7, 0x6a, 0xdc, 0xf3, 0x9c, 0x28, 0x02, 0x81, 0xc5, 0x02, 0xdf, + 0x52, 0x01, 0x38, 0x59, 0x4f, 0xff, 0xe6, 0x2c, 0xb0, 0x0a, 0x0e, 0x09, 0x3f, 0x88, 0xdf, 0xf5, + 0x02, 0x54, 0xcc, 0x5e, 0xbf, 0x7e, 0xbd, 0xfd, 0x66, 0xdf, 0x0b, 0x0d, 0xe1, 0xf3, 0x63, 0x8a, + 0x48, 0xbd, 0xb5, 0x11, 0x15, 0x63, 0xb5, 0x0e, 0x5d, 0x35, 0x66, 0xaf, 0x2f, 0xe4, 0x50, 0x4b, + 0x3d, 0xa7, 0x66, 0xab, 0xa6, 0xde, 0xda, 0x48, 0xc0, 0xf0, 0x40, 0x6d, 0xf4, 0x15, 0x98, 0x21, + 0x82, 0xa1, 0x6f, 0x1a, 0xbe, 0x25, 0xd6, 0x4b, 0xe1, 0x9d, 0x44, 0x0e, 0x6d, 0xb4, 0x4a, 0xb8, + 0xfe, 0xb6, 0xaa, 0x90, 0xc0, 0x09, 0x82, 0x4c, 0x97, 0x12, 0xbf, 0xe9, 0x4c, 0x79, 0xd6, 0x0d, + 0xdf, 0x30, 0x89, 0x62, 0x7a, 0x4d, 0x08, 0x5d, 0x2a, 0xaf, 0x12, 0xce, 0x6f, 0x8f, 0x7e, 0x5b, + 0x83, 0x2b, 0x12, 0x6a, 0xbb, 0x76, 0xb7, 0xdf, 0xc5, 0xc4, 0x74, 0x0c, 0xbb, 0x2b, 0x14, 0xab, + 0xb7, 0x4e, 0xed, 0x43, 0x93, 0xe8, 0xf9, 0x66, 0x95, 0x0d, 0xc3, 0x39, 0x5d, 0x42, 0xdf, 0xd6, + 0xe0, 0x99, 0x08, 0xd4, 0xa2, 0xa6, 0x4d, 0xdf, 0x27, 0x71, 0x0c, 0x8b, 0x18, 0x92, 0x62, 0xe6, + 0xdf, 0x47, 0x0e, 0x0f, 0xaa, 0xcf, 0xac, 0x1e, 0x83, 0x1b, 0x1f, 0x4b, 0x5d, 0x65, 0x97, 0xb6, + 0xb7, 0x15, 0x0a, 0x4d, 0xec, 0xac, 0xd8, 0x85, 0x92, 0xc0, 0x09, 0x82, 0xe8, 0x77, 0x34, 0x78, + 0x5c, 0x2d, 0x50, 0xb9, 0x85, 0xab, 0x60, 0x5f, 0x38, 0xb5, 0xce, 0xa4, 0xf0, 0x73, 0xf7, 0x4d, + 0x0e, 0x10, 0xe7, 0xf5, 0x0a, 0x3d, 0x0b, 0x53, 0x5d, 0xc6, 0x98, 0x5c, 0x4d, 0x9b, 0xe0, 0x6e, + 0x38, 0xce, 0xab, 0x01, 0x8e, 0x60, 0xd4, 0xfa, 0xe9, 0x79, 0x56, 0xcb, 0xb6, 0x82, 0xdb, 0x76, + 0xd7, 0x0e, 0x17, 0x2b, 0xec, 0xda, 0x00, 0x1b, 0x8e, 0x96, 0x67, 0xb5, 0x9a, 0x0d, 0x5e, 0x8e, + 0x13, 0xb5, 0x58, 0x88, 0xa4, 0xdd, 0x35, 0x3a, 0xa4, 0xd5, 0x77, 0x9c, 0x96, 0xef, 0x31, 0x8b, + 0xb8, 0x41, 0x0c, 0xcb, 0xb1, 0x5d, 0xb2, 0x38, 0x53, 0x3c, 0x44, 0xb2, 0x99, 0x87, 0x14, 0xe7, + 0xd3, 0x43, 0xcb, 0x00, 0x5b, 0x86, 0xed, 0xb4, 0xef, 0x1b, 0xbd, 0x3b, 0xee, 0xe2, 0x2c, 0x13, + 0x60, 0xcc, 0xf4, 0xb8, 0x2e, 0x4b, 0xb1, 0x52, 0x83, 0x72, 0x13, 0x95, 0x82, 0x98, 0xf0, 0xeb, + 0x0f, 0x8b, 0x73, 0xa7, 0xc4, 0x4d, 0x11, 0x42, 0x3e, 0x7c, 0xb7, 0x14, 0x12, 0x38, 0x41, 0x10, + 0x7d, 0x5d, 0x83, 0xb9, 0x60, 0x3f, 0x08, 0x49, 0x57, 0xf6, 0xe1, 0xc2, 0x69, 0xf7, 0x81, 0xf9, + 0x0a, 0xda, 0x09, 0x22, 0x38, 0x45, 0x54, 0x3f, 0x28, 0x71, 0xa5, 0x78, 0x80, 0x05, 0xd1, 0x6b, + 0x70, 0xa1, 0x4b, 0xba, 0x9e, 0xbf, 0xbf, 0x12, 0x5d, 0x11, 0x16, 0xde, 0x0d, 0x66, 0x24, 0xac, + 0x25, 0x41, 0x38, 0x5d, 0x97, 0x6e, 0x10, 0x6c, 0xba, 0xae, 0xb7, 0xe3, 0xf6, 0xa5, 0x78, 0x83, + 0x68, 0xa6, 0x60, 0x78, 0xa0, 0x36, 0xaa, 0xc3, 0x82, 0x28, 0x6b, 0x52, 0x95, 0x2b, 0xb8, 0xee, + 0x93, 0xe8, 0x04, 0x83, 0xaa, 0x12, 0x0b, 0xcd, 0x34, 0x10, 0x0f, 0xd6, 0xa7, 0x5f, 0x41, 0x7f, + 0xa8, 0xbd, 0x18, 0x8f, 0xbf, 0x62, 0x3d, 0x09, 0xc2, 0xe9, 0xba, 0x91, 0x72, 0x98, 0xe8, 0xc2, + 0x44, 0xfc, 0x15, 0xeb, 0x29, 0x18, 0x1e, 0xa8, 0xad, 0xff, 0xb7, 0x71, 0xf8, 0xf0, 0x10, 0x62, + 0x1b, 0x75, 0xb3, 0x87, 0xfb, 0x98, 0x45, 0xb4, 0x1c, 0x1d, 0x70, 0x2f, 0xbf, 0xd9, 0x37, 0xdc, + 0xd0, 0x0e, 0xf7, 0x87, 0x9c, 0x9e, 0x5e, 0xce, 0xf4, 0x9c, 0x9c, 0xde, 0xb0, 0xd3, 0x19, 0xe4, + 0x4d, 0xe7, 0xc9, 0x49, 0x0e, 0x3f, 0xfd, 0xdd, 0xec, 0xe9, 0x2f, 0x38, 0xaa, 0xc7, 0xb2, 0x4b, + 0x2f, 0x87, 0x5d, 0x0a, 0x8e, 0xea, 0x10, 0xec, 0xf5, 0xa7, 0xe3, 0xf0, 0x91, 0x61, 0xb6, 0x90, + 0x82, 0xfc, 0x95, 0x21, 0xa4, 0xcf, 0x94, 0xbf, 0xf2, 0x42, 0x0b, 0xce, 0x90, 0xbf, 0x32, 0x48, + 0x9e, 0x35, 0x7f, 0xe5, 0x8d, 0xea, 0x59, 0xf1, 0x57, 0xde, 0xa8, 0x0e, 0xc1, 0x5f, 0x7f, 0x96, + 0xde, 0x1f, 0xe4, 0x0e, 0xd6, 0x84, 0x31, 0xb3, 0xd7, 0x2f, 0x28, 0xa4, 0xd8, 0xd9, 0x59, 0xbd, + 0xb5, 0x81, 0x29, 0x0e, 0x84, 0x61, 0x92, 0xf3, 0x4f, 0x41, 0x11, 0xc4, 0xc2, 0x42, 0x38, 0x4b, + 0x62, 0x81, 0x89, 0x0e, 0x15, 0xe9, 0x6d, 0x93, 0x2e, 0xf1, 0x0d, 0xa7, 0x1d, 0x7a, 0xbe, 0xd1, + 0x29, 0x2a, 0x6d, 0xd8, 0x50, 0xad, 0xa6, 0x70, 0xe1, 0x01, 0xec, 0x74, 0x40, 0x7a, 0xb6, 0x55, + 0x50, 0xbe, 0xb0, 0x01, 0x69, 0x35, 0x1b, 0x98, 0xe2, 0xd0, 0xff, 0xb0, 0x0c, 0x4a, 0xfc, 0x3c, + 0xb5, 0x54, 0x0c, 0xc7, 0xf1, 0xee, 0xb7, 0x7c, 0x7b, 0xd7, 0x76, 0x48, 0x87, 0x58, 0x32, 0xc0, + 0x3a, 0x10, 0x27, 0xac, 0x4c, 0x75, 0x5a, 0xc9, 0xab, 0x84, 0xf3, 0xdb, 0x53, 0x4b, 0x74, 0xc1, + 0x4c, 0x5f, 0xc3, 0x19, 0xe5, 0x4c, 0x65, 0xe0, 0x4e, 0x0f, 0x5f, 0x4f, 0x03, 0xc5, 0x78, 0x90, + 0x2c, 0xfa, 0xaa, 0xc6, 0x4d, 0x6c, 0xe9, 0xa3, 0x13, 0x73, 0x76, 0xe3, 0x94, 0x5c, 0xc2, 0xb1, + 0xad, 0x1e, 0x7b, 0x01, 0x93, 0x04, 0xa9, 0x2d, 0x74, 0x79, 0x27, 0xcb, 0xdb, 0x26, 0x66, 0xf6, + 0x4e, 0xd1, 0xae, 0xe4, 0xb8, 0xef, 0xf8, 0x29, 0x61, 0x66, 0x05, 0x9c, 0xdd, 0x11, 0x39, 0x4a, + 0xd2, 0x59, 0x22, 0x84, 0x40, 0xe1, 0x51, 0x4a, 0x79, 0x5d, 0xe2, 0x51, 0x92, 0x00, 0x9c, 0x24, + 0x88, 0x7a, 0x30, 0xbd, 0x13, 0xb9, 0x9e, 0x84, 0x45, 0x5b, 0x2f, 0x4a, 0x5d, 0xf1, 0x5f, 0xf1, + 0xd3, 0x48, 0x59, 0x88, 0x63, 0x22, 0x68, 0x1b, 0xa6, 0x76, 0xb8, 0x20, 0x12, 0x96, 0xe8, 0xca, + 0xc8, 0x9a, 0x32, 0x37, 0x88, 0x44, 0x11, 0x8e, 0xd0, 0xab, 0x91, 0x0f, 0xe5, 0x63, 0x02, 0x5e, + 0x7e, 0x5d, 0x83, 0xcb, 0xbb, 0xc4, 0x0f, 0x6d, 0x33, 0xed, 0xeb, 0x9c, 0x2e, 0xae, 0xcd, 0xdf, + 0xcb, 0x42, 0xc8, 0xd9, 0x24, 0x13, 0x84, 0xb3, 0xbb, 0xa0, 0xff, 0x54, 0x83, 0x01, 0xef, 0x0f, + 0xfa, 0x15, 0x0d, 0x66, 0xb6, 0x88, 0x11, 0xf6, 0x7d, 0x72, 0xc3, 0x08, 0x65, 0x10, 0xe6, 0xbd, + 0xd3, 0x70, 0x3a, 0x2d, 0x5f, 0x57, 0x10, 0xf3, 0xf3, 0x16, 0x79, 0xd7, 0x53, 0x05, 0xe1, 0x44, + 0x0f, 0x96, 0x5e, 0x87, 0x85, 0x81, 0x86, 0x27, 0xf2, 0xec, 0xff, 0x3b, 0xe1, 0x3c, 0x4c, 0x27, + 0xf8, 0x7a, 0x07, 0x26, 0x0c, 0xcb, 0x92, 0xe9, 0x43, 0x5e, 0x2e, 0x76, 0xae, 0x68, 0xa9, 0xb1, + 0xae, 0xec, 0x27, 0xe6, 0x68, 0xd1, 0x75, 0x40, 0x46, 0xe2, 0x08, 0x6d, 0xcd, 0xb3, 0x22, 0x2b, + 0x89, 0x39, 0x72, 0x57, 0x06, 0xa0, 0x38, 0xa3, 0x85, 0xfe, 0x2a, 0xcc, 0x25, 0x6f, 0x51, 0x9d, + 0x20, 0xe6, 0x4a, 0xff, 0xeb, 0x1a, 0xa0, 0xc1, 0xab, 0xc5, 0xc8, 0x87, 0xb2, 0xa8, 0x11, 0x4d, + 0x71, 0x21, 0xbf, 0x62, 0x3a, 0x1a, 0x2c, 0x0e, 0x36, 0x16, 0x05, 0x01, 0x96, 0x74, 0xf4, 0x3f, + 0xd7, 0x20, 0xce, 0x4f, 0x80, 0x3e, 0x0d, 0x15, 0x8b, 0x04, 0xa6, 0x6f, 0xf7, 0xc2, 0xf8, 0x3b, + 0xe4, 0xb5, 0xd0, 0x46, 0x0c, 0xc2, 0x6a, 0x3d, 0xa4, 0xc3, 0x64, 0x68, 0x04, 0x3b, 0xcd, 0x86, + 0x30, 0x17, 0xd9, 0xe6, 0x7e, 0x97, 0x95, 0x60, 0x01, 0x89, 0x6f, 0x24, 0x8d, 0x0d, 0x71, 0x23, + 0x09, 0x6d, 0x9d, 0xc2, 0xf5, 0x2b, 0x74, 0xfc, 0xd5, 0x2b, 0xfd, 0x4f, 0x4a, 0x90, 0x4c, 0x09, + 0x51, 0x74, 0x08, 0x06, 0xef, 0x8b, 0x95, 0xce, 0xec, 0xbe, 0xd8, 0xc7, 0x59, 0x3e, 0x25, 0x9e, + 0x00, 0x8f, 0x1f, 0x7b, 0xa8, 0x59, 0x90, 0x78, 0xfa, 0x3a, 0x59, 0x03, 0xbd, 0xcc, 0x22, 0xa4, + 0xc2, 0xc8, 0x88, 0xfe, 0x70, 0xb4, 0x2c, 0xda, 0xb4, 0xf0, 0xa1, 0xb8, 0x11, 0x27, 0xbf, 0x9f, + 0x95, 0x62, 0xde, 0x02, 0x7d, 0x5a, 0x04, 0xd4, 0x4d, 0x24, 0x6e, 0xed, 0x45, 0x57, 0xfd, 0x16, + 0x12, 0x0d, 0xe3, 0x28, 0x3b, 0xfd, 0xef, 0x6a, 0x30, 0x25, 0xee, 0x89, 0x0f, 0x11, 0x93, 0xb7, + 0x05, 0x13, 0x4c, 0x49, 0x1f, 0x45, 0x7f, 0x69, 0x6f, 0x7b, 0x5e, 0x98, 0xb8, 0x2d, 0xcf, 0x02, + 0xc1, 0xd8, 0xbf, 0x98, 0xa3, 0xd7, 0xbf, 0x35, 0x0e, 0xcf, 0x88, 0x2a, 0x03, 0xdb, 0xb3, 0x5c, + 0x82, 0xfb, 0x70, 0x51, 0xcc, 0x52, 0xc3, 0x37, 0x6c, 0x79, 0x30, 0x54, 0xcc, 0xec, 0x12, 0x47, + 0x86, 0x03, 0xe8, 0x70, 0x16, 0x0d, 0xf4, 0xf3, 0x70, 0x49, 0x14, 0xdf, 0x24, 0x86, 0x13, 0x6e, + 0x47, 0xb4, 0x8b, 0x99, 0x60, 0xec, 0x94, 0x7a, 0x2d, 0x03, 0x1f, 0xce, 0xa4, 0xc2, 0x62, 0xb9, + 0x04, 0xa0, 0xee, 0x13, 0x43, 0x3d, 0x15, 0x1b, 0x21, 0x96, 0x6b, 0x2d, 0x13, 0x23, 0xce, 0xa1, + 0xc4, 0xfc, 0x57, 0xc6, 0x1e, 0x33, 0x87, 0x31, 0x09, 0x7d, 0x9b, 0xe5, 0x2f, 0xa0, 0xfc, 0xcd, + 0x0d, 0xd8, 0x24, 0x08, 0xa7, 0xeb, 0xa2, 0x57, 0x60, 0x8e, 0x1d, 0xf4, 0xc5, 0xd7, 0x70, 0x26, + 0xe2, 0x7c, 0x88, 0xeb, 0x09, 0x08, 0x4e, 0xd5, 0xd4, 0x7f, 0x4b, 0x83, 0x19, 0x95, 0x81, 0x86, + 0x88, 0xe1, 0xed, 0x2b, 0xe2, 0x7a, 0x84, 0x50, 0x48, 0x95, 0xea, 0x30, 0x12, 0xfb, 0xa1, 0x06, + 0x17, 0x33, 0xda, 0xb0, 0xe3, 0x29, 0x92, 0x12, 0xfd, 0xa3, 0x1c, 0x4f, 0x0d, 0x6c, 0x23, 0xf2, + 0x78, 0x2a, 0x0d, 0xc1, 0x03, 0x74, 0xd1, 0x3d, 0x18, 0x33, 0x7d, 0x5b, 0x0c, 0xcb, 0x4b, 0x85, + 0x4c, 0x12, 0xdc, 0x8c, 0x03, 0xa3, 0xeb, 0xb8, 0x89, 0x29, 0x42, 0xfd, 0x5f, 0x8d, 0x41, 0x45, + 0x49, 0x41, 0x81, 0xd6, 0x46, 0xb1, 0x68, 0x63, 0xf4, 0x91, 0x55, 0xbb, 0x06, 0x63, 0x9d, 0x5e, + 0xbf, 0xa0, 0x49, 0x2b, 0xd1, 0xdd, 0xa0, 0xe8, 0x3a, 0xbd, 0x3e, 0xba, 0x27, 0x8d, 0xe4, 0x62, + 0x66, 0xac, 0x8c, 0xa5, 0x4b, 0x19, 0xca, 0x11, 0x6f, 0x8e, 0xe7, 0xf2, 0x66, 0x17, 0xa6, 0x02, + 0x61, 0x41, 0x4f, 0x14, 0x4f, 0x7f, 0xa2, 0x8c, 0xb4, 0xb0, 0x98, 0xb9, 0xfa, 0x1d, 0x19, 0xd4, + 0x11, 0x0d, 0xaa, 0x00, 0xf4, 0x59, 0x34, 0x33, 0xb3, 0x2b, 0xca, 0x5c, 0x01, 0xd8, 0x60, 0x25, + 0x58, 0x40, 0xf4, 0x7f, 0xa9, 0x01, 0x1a, 0x44, 0x88, 0x3e, 0x0c, 0x13, 0x2c, 0xa8, 0x5b, 0x2c, + 0x34, 0xe5, 0xe6, 0xbb, 0x11, 0x04, 0x98, 0xc3, 0xd0, 0x5b, 0x22, 0x62, 0xbf, 0xd8, 0xc4, 0xc8, + 0xdd, 0x5b, 0xd0, 0x54, 0x42, 0xfc, 0xa3, 0xed, 0x69, 0x2c, 0x6f, 0x7b, 0xd2, 0xff, 0xb4, 0x44, + 0x39, 0xce, 0x76, 0x43, 0xe2, 0xb2, 0x08, 0xcb, 0x7d, 0x00, 0xa3, 0x1f, 0x7a, 0x7c, 0x3b, 0x16, + 0x8c, 0xd7, 0x2c, 0x36, 0xb8, 0x12, 0xe9, 0x8a, 0x44, 0xc8, 0x4f, 0x40, 0xe2, 0xdf, 0x58, 0x21, + 0x46, 0x49, 0x87, 0x76, 0x97, 0xbc, 0x65, 0xbb, 0x96, 0x77, 0x5f, 0x8c, 0xc5, 0xa8, 0xa4, 0xef, + 0x4a, 0x84, 0x9c, 0x74, 0xfc, 0x1b, 0x2b, 0xc4, 0xd0, 0x17, 0x60, 0x91, 0x25, 0x54, 0x75, 0x59, + 0x2a, 0x1e, 0xd1, 0x37, 0xcf, 0x71, 0xa2, 0xfd, 0xa1, 0x5c, 0x7b, 0xea, 0xf0, 0xa0, 0xba, 0x58, + 0xcf, 0xa9, 0x83, 0x73, 0x5b, 0xeb, 0xbf, 0xa3, 0xc1, 0xe5, 0xcc, 0xa1, 0x40, 0x37, 0x60, 0x21, + 0x3e, 0xf6, 0x56, 0x05, 0x5a, 0x39, 0xce, 0x2c, 0x75, 0x2b, 0x5d, 0x01, 0x0f, 0xb6, 0x41, 0x6b, + 0x72, 0x53, 0x57, 0x05, 0xa6, 0x38, 0x33, 0x7f, 0x52, 0xa0, 0xca, 0x92, 0xa9, 0x38, 0xab, 0x9d, + 0xfe, 0x73, 0x89, 0x0e, 0xc7, 0x03, 0x46, 0x59, 0x79, 0x93, 0x74, 0x64, 0x24, 0xac, 0x64, 0xe5, + 0x1a, 0x2d, 0xc4, 0x1c, 0x86, 0x9e, 0x56, 0xe3, 0xd1, 0xa5, 0xc8, 0x88, 0x62, 0xd2, 0xf5, 0x10, + 0x60, 0xcd, 0x73, 0xed, 0xd0, 0xf3, 0x6d, 0xb7, 0x83, 0xb6, 0xa0, 0x6c, 0x88, 0x6c, 0xbf, 0x82, + 0xd5, 0x3e, 0x5b, 0xc8, 0x20, 0x12, 0x38, 0x78, 0xa4, 0x56, 0xf4, 0x0b, 0x4b, 0xdc, 0xfa, 0x3f, + 0xd5, 0xe0, 0x0a, 0x95, 0x1e, 0x56, 0x74, 0xd5, 0x4d, 0x5e, 0x89, 0x1d, 0x62, 0x1f, 0xec, 0x42, + 0xc5, 0x8f, 0x9b, 0x09, 0xbe, 0xfc, 0x59, 0xf5, 0xba, 0xad, 0x92, 0xfa, 0x9b, 0xea, 0x08, 0x75, + 0xdf, 0x0b, 0xa2, 0xc9, 0x49, 0xdf, 0xc0, 0x95, 0x6b, 0x55, 0xe9, 0x09, 0x56, 0xf1, 0xeb, 0x5f, + 0x2b, 0x01, 0xac, 0x93, 0xf0, 0xbe, 0xe7, 0xef, 0xd0, 0x21, 0xfa, 0x40, 0x5d, 0xfa, 0x78, 0x0a, + 0xc6, 0x7b, 0x9e, 0x15, 0x08, 0x71, 0xc2, 0xee, 0x1d, 0xb1, 0x83, 0x5b, 0x56, 0x8a, 0xaa, 0x30, + 0xc1, 0xbc, 0xb4, 0x42, 0x6e, 0x33, 0x15, 0x95, 0xaa, 0x25, 0x01, 0xe6, 0xe5, 0x3c, 0x77, 0x1e, + 0x0b, 0x21, 0x0c, 0x84, 0xce, 0x2d, 0x72, 0xe7, 0xf1, 0x32, 0x2c, 0xa1, 0xfa, 0xd7, 0xc6, 0x21, + 0x91, 0xae, 0x3a, 0xb6, 0x9b, 0xb5, 0xb3, 0xb1, 0x9b, 0xbf, 0x00, 0x8b, 0x8e, 0x67, 0x58, 0x35, + 0xc3, 0xa1, 0x4c, 0xef, 0xb7, 0xf9, 0x74, 0x18, 0x6e, 0x47, 0xe6, 0x42, 0x66, 0x02, 0xe0, 0x76, + 0x4e, 0x1d, 0x9c, 0xdb, 0x1a, 0x85, 0x32, 0x49, 0x36, 0xcf, 0x94, 0x75, 0x7b, 0xd4, 0x64, 0xde, + 0xcb, 0x6a, 0xf0, 0xa8, 0xdc, 0x42, 0x93, 0x79, 0xb4, 0xd1, 0x2f, 0x68, 0x70, 0x99, 0xec, 0x85, + 0xc4, 0x77, 0x0d, 0xe7, 0xae, 0x6f, 0x6c, 0x6d, 0xd9, 0xa6, 0x08, 0x89, 0xe1, 0x93, 0xd3, 0x3a, + 0x3c, 0xa8, 0x5e, 0x5e, 0xcd, 0xaa, 0xf0, 0xf0, 0xa0, 0xfa, 0xc9, 0xc1, 0x5c, 0xf5, 0x51, 0xac, + 0x68, 0x66, 0x13, 0xc6, 0x8c, 0xd9, 0xe4, 0x96, 0x5e, 0x86, 0xca, 0x09, 0xa2, 0x23, 0xa7, 0x55, + 0x1f, 0xca, 0x3f, 0x98, 0x04, 0x25, 0x4e, 0xf7, 0x04, 0xf9, 0xd1, 0xfe, 0x91, 0x06, 0x97, 0x4c, + 0xc7, 0x26, 0x6e, 0x98, 0x0a, 0x47, 0xe6, 0x0b, 0x63, 0xa3, 0x50, 0x00, 0x71, 0x8f, 0xb8, 0xcd, + 0x46, 0xdd, 0x73, 0x5d, 0x62, 0x86, 0xf5, 0x0c, 0xe4, 0xdc, 0x24, 0xc9, 0x82, 0xe0, 0xcc, 0xce, + 0xb0, 0xef, 0x61, 0xe5, 0xcd, 0x86, 0x7a, 0x3d, 0xa7, 0x2e, 0xca, 0xb0, 0x84, 0xa2, 0x17, 0xa0, + 0xd2, 0xf1, 0xbd, 0x7e, 0x2f, 0xa8, 0xb3, 0x68, 0x1d, 0x3e, 0x83, 0x2c, 0x18, 0xea, 0x46, 0x5c, + 0x8c, 0xd5, 0x3a, 0xe8, 0x53, 0x30, 0xc3, 0x7f, 0xb6, 0x7c, 0xb2, 0x65, 0xef, 0x89, 0xe5, 0xc6, + 0x42, 0x00, 0x6e, 0x28, 0xe5, 0x38, 0x51, 0x0b, 0x7d, 0x0c, 0xa6, 0xed, 0x20, 0xe8, 0x13, 0x7f, + 0x03, 0xdf, 0x16, 0x39, 0x58, 0x98, 0xf7, 0xb3, 0x19, 0x15, 0xe2, 0x18, 0x8e, 0x7e, 0x55, 0x83, + 0x39, 0x9f, 0xbc, 0xd7, 0xb7, 0x7d, 0x62, 0x31, 0xa2, 0x81, 0x08, 0x96, 0xc6, 0xa3, 0x05, 0x68, + 0x2f, 0xe3, 0x04, 0x52, 0xce, 0xe7, 0xd2, 0x77, 0x90, 0x04, 0xe2, 0x54, 0x0f, 0xe8, 0x50, 0x05, + 0x76, 0xc7, 0xb5, 0xdd, 0xce, 0x8a, 0xd3, 0x09, 0x16, 0xcb, 0x6c, 0xe9, 0xb2, 0xa1, 0x6a, 0xc7, + 0xc5, 0x58, 0xad, 0x83, 0x5e, 0x82, 0xd9, 0x7e, 0x40, 0x39, 0xb7, 0x4b, 0xf8, 0xf8, 0x4e, 0xc7, + 0x21, 0x74, 0x1b, 0x2a, 0x00, 0x27, 0xeb, 0x51, 0x7b, 0x2c, 0x2a, 0x10, 0xa3, 0x0c, 0xfc, 0xc6, + 0x25, 0xed, 0xe7, 0x46, 0x02, 0x82, 0x53, 0x35, 0x97, 0x56, 0xe0, 0x62, 0xc6, 0x67, 0x9e, 0x68, + 0x79, 0xfc, 0x56, 0x09, 0x3e, 0x74, 0x2c, 0x57, 0xa2, 0x7f, 0xa8, 0x41, 0x85, 0xec, 0x85, 0xbe, + 0x21, 0x03, 0xfa, 0xe8, 0x14, 0x6d, 0x9d, 0xc9, 0x12, 0x58, 0x5e, 0x8d, 0x09, 0xf1, 0x69, 0x93, + 0xdb, 0x9d, 0x02, 0xc1, 0x6a, 0x7f, 0xa8, 0x6a, 0xcd, 0xef, 0xe3, 0xaa, 0xbe, 0x35, 0x91, 0xd5, + 0x57, 0x40, 0x96, 0x3e, 0x07, 0xf3, 0x69, 0xcc, 0x27, 0x1a, 0xa9, 0x7f, 0x51, 0x82, 0x89, 0x96, + 0x63, 0xb8, 0xe7, 0x91, 0x35, 0xfe, 0x2f, 0x27, 0x92, 0x39, 0x14, 0xca, 0x90, 0xc1, 0xba, 0x9a, + 0x9b, 0xe8, 0xa5, 0x93, 0x4a, 0xf4, 0xf2, 0x7a, 0x71, 0x12, 0x47, 0xe7, 0x75, 0xf9, 0x23, 0x0d, + 0xa6, 0x59, 0xbd, 0x73, 0xc8, 0x09, 0xf1, 0x4e, 0x32, 0x27, 0xc4, 0xcb, 0x85, 0xbf, 0x29, 0x27, + 0x05, 0xc4, 0x0f, 0xa3, 0x6f, 0x61, 0x19, 0x1f, 0xbe, 0xa8, 0x66, 0x33, 0xe7, 0x1f, 0xf3, 0x5c, + 0x56, 0xfa, 0x94, 0xdb, 0x9e, 0x69, 0x38, 0x69, 0x0d, 0xee, 0xe8, 0x94, 0xe6, 0x5d, 0x98, 0x26, + 0xe2, 0x9a, 0x74, 0xf4, 0x31, 0x85, 0x54, 0xda, 0xe8, 0xae, 0x75, 0x4c, 0x2e, 0x2a, 0x09, 0x70, + 0x4c, 0x41, 0xff, 0xb7, 0x25, 0xa8, 0x28, 0x73, 0xf9, 0x7e, 0x64, 0x69, 0xb9, 0x9e, 0x99, 0xe8, + 0xb7, 0xc4, 0x22, 0xf6, 0xae, 0x9c, 0x20, 0x59, 0xb8, 0x0f, 0x15, 0x33, 0x4e, 0x38, 0x37, 0x0a, + 0x73, 0x2b, 0x79, 0xeb, 0x44, 0xc8, 0x70, 0x5c, 0x80, 0x55, 0x22, 0xfa, 0xbf, 0x2e, 0xc1, 0x54, + 0xcb, 0xf7, 0xe8, 0x04, 0x9f, 0x83, 0x68, 0x30, 0x12, 0xa2, 0xa1, 0xd8, 0xba, 0xe5, 0x9d, 0xcd, + 0x15, 0x0e, 0x76, 0x4a, 0x38, 0xac, 0x8c, 0x42, 0xe4, 0x68, 0xf1, 0xf0, 0x1f, 0x35, 0xa8, 0x88, + 0x9a, 0xe7, 0x20, 0x20, 0xbe, 0x94, 0x14, 0x10, 0xaf, 0x8e, 0xf0, 0x5d, 0x39, 0x22, 0xe2, 0xd7, + 0x35, 0x98, 0x15, 0x35, 0xd6, 0x48, 0x77, 0x93, 0xf8, 0xe8, 0x3a, 0x4c, 0x05, 0x7d, 0x36, 0x91, + 0xe2, 0x83, 0x9e, 0x54, 0x85, 0x84, 0xbf, 0x69, 0x98, 0x2c, 0x67, 0x3d, 0xaf, 0xa2, 0xe4, 0x56, + 0xe2, 0x05, 0x38, 0x6a, 0x4c, 0x4d, 0x38, 0xdf, 0x73, 0x06, 0x2e, 0xb6, 0x63, 0xcf, 0x21, 0x98, + 0x41, 0xa8, 0xe5, 0x44, 0xff, 0x46, 0x87, 0x47, 0xcc, 0x72, 0xa2, 0xe0, 0x00, 0xf3, 0x72, 0xfd, + 0xeb, 0xe3, 0x72, 0xb0, 0x99, 0x04, 0xbb, 0x09, 0xd3, 0xa6, 0x4f, 0x8c, 0x90, 0x58, 0xb5, 0xfd, + 0x61, 0x3a, 0xc7, 0xb4, 0xb8, 0x7a, 0xd4, 0x02, 0xc7, 0x8d, 0xa9, 0xc2, 0xa4, 0x9e, 0x07, 0x95, + 0x62, 0xdd, 0x32, 0xf7, 0x2c, 0xe8, 0xb3, 0x30, 0xe1, 0xdd, 0x77, 0x65, 0x20, 0xc4, 0x91, 0x84, + 0xd9, 0xa7, 0xdc, 0xa1, 0xb5, 0x31, 0x6f, 0xc4, 0x32, 0x79, 0x88, 0xdc, 0x0f, 0x5c, 0x91, 0xad, + 0x64, 0xe5, 0x7d, 0x40, 0x0e, 0x4c, 0x75, 0xd9, 0x34, 0x70, 0x2f, 0xf7, 0x68, 0xac, 0xcc, 0x27, + 0x54, 0xcd, 0x27, 0xc8, 0x30, 0xe3, 0x88, 0x04, 0x55, 0x7c, 0xa9, 0x72, 0x16, 0xf4, 0x0c, 0x93, + 0xa8, 0x8a, 0xef, 0x7a, 0x54, 0x88, 0x63, 0x38, 0xda, 0x87, 0x0a, 0xbf, 0x91, 0xcc, 0xa5, 0xec, + 0x54, 0x71, 0x07, 0xa4, 0xe8, 0xde, 0xdd, 0x18, 0x1b, 0x1f, 0x7a, 0xa5, 0x00, 0xab, 0xb4, 0xf4, + 0x5f, 0x1e, 0x93, 0x4c, 0x2a, 0x24, 0x7e, 0x76, 0x9e, 0x75, 0xad, 0xd0, 0x7b, 0x0d, 0x9f, 0x84, + 0x89, 0xde, 0xb6, 0x11, 0x44, 0x9c, 0x1a, 0xe5, 0xbe, 0x9c, 0x68, 0xd1, 0xc2, 0x87, 0x07, 0xd5, + 0x19, 0x41, 0x9a, 0xfd, 0xc6, 0xbc, 0x2e, 0xea, 0xc3, 0xc5, 0x20, 0x34, 0x1c, 0xd2, 0xb6, 0x85, + 0xb7, 0x28, 0x08, 0x8d, 0x6e, 0xaf, 0x40, 0x0a, 0x4b, 0x76, 0x9c, 0xd4, 0x1e, 0x44, 0x85, 0xb3, + 0xf0, 0xa3, 0xbf, 0xa6, 0xc1, 0x22, 0x2b, 0x5f, 0xe9, 0x87, 0x1e, 0xcf, 0x4a, 0x1b, 0x13, 0x3f, + 0xf9, 0x61, 0x2a, 0xb3, 0xee, 0xdb, 0x39, 0xf8, 0x70, 0x2e, 0x25, 0xfd, 0xcf, 0x34, 0x40, 0x83, + 0xb3, 0x88, 0x1c, 0x28, 0x5b, 0x64, 0xcb, 0xe8, 0x3b, 0x61, 0xb4, 0x0b, 0x17, 0xba, 0xb5, 0x1a, + 0xa3, 0x8c, 0x85, 0x63, 0x43, 0xe0, 0xc5, 0x92, 0x02, 0xf2, 0x60, 0xfa, 0xfe, 0xb6, 0x1d, 0x12, + 0xc7, 0x0e, 0x42, 0x21, 0x20, 0x47, 0x25, 0x27, 0xd5, 0x8e, 0xb7, 0x22, 0xc4, 0x38, 0xa6, 0xa1, + 0xff, 0xe2, 0x18, 0x94, 0x4f, 0xf0, 0xba, 0x4e, 0x1f, 0x90, 0xb8, 0xae, 0x4e, 0x75, 0x15, 0x32, + 0x8a, 0x97, 0x8a, 0x69, 0x14, 0xf5, 0x01, 0x64, 0x38, 0x83, 0x00, 0xfa, 0x32, 0x5c, 0xb2, 0xdd, + 0x2d, 0xdf, 0x08, 0x42, 0xbf, 0x6f, 0x86, 0x7d, 0x3f, 0x22, 0x3c, 0x56, 0x84, 0x30, 0xb3, 0xee, + 0x9b, 0x19, 0xe8, 0x70, 0x26, 0x11, 0x44, 0x60, 0xea, 0xbe, 0xe7, 0xef, 0x50, 0xf9, 0x35, 0x5e, + 0x3c, 0x85, 0xf7, 0x5b, 0x0c, 0x45, 0x2c, 0xb8, 0xf8, 0xef, 0x00, 0x47, 0xb8, 0xf5, 0x3f, 0xd6, + 0x60, 0x82, 0x5f, 0x7f, 0x7a, 0x24, 0x4c, 0x1b, 0xd6, 0xd5, 0xdc, 0xb4, 0x74, 0xd4, 0xe2, 0x60, + 0x35, 0x1e, 0x11, 0x8b, 0x83, 0xf5, 0x35, 0x47, 0x9d, 0xf8, 0xe3, 0x31, 0xf1, 0x2d, 0x6c, 0xbf, + 0x6e, 0xc2, 0x45, 0xa1, 0x77, 0xde, 0xb6, 0xb7, 0x08, 0xe5, 0xae, 0x86, 0xb1, 0x1f, 0x88, 0xbb, + 0xbc, 0x4c, 0xf0, 0xd5, 0x07, 0xc1, 0x38, 0xab, 0x0d, 0xfa, 0x37, 0x1a, 0xdd, 0x19, 0x43, 0xdf, + 0x36, 0x47, 0xca, 0xa0, 0x27, 0xfb, 0xb6, 0xbc, 0xc6, 0x91, 0x71, 0x83, 0x7d, 0x23, 0xde, 0x22, + 0x59, 0xe9, 0xc3, 0x83, 0x6a, 0x35, 0xc3, 0x1b, 0x18, 0x79, 0xaf, 0xe9, 0xc0, 0x7e, 0xed, 0xc7, + 0x47, 0x56, 0x61, 0x9e, 0xf4, 0xa8, 0xc7, 0xe8, 0x26, 0x4c, 0x04, 0xa6, 0xd7, 0x23, 0x47, 0x3d, + 0x22, 0x95, 0xb6, 0xb8, 0xe4, 0x00, 0xb7, 0x69, 0x4b, 0xcc, 0x11, 0x2c, 0xbd, 0x0b, 0x33, 0x6a, + 0xcf, 0x33, 0x1c, 0x02, 0x0d, 0xd5, 0x21, 0x70, 0xe2, 0x63, 0x35, 0xd5, 0x81, 0xf0, 0xfb, 0x25, + 0x10, 0xef, 0x6e, 0x0c, 0x71, 0x5e, 0x60, 0x47, 0x59, 0xc3, 0x46, 0x78, 0x6b, 0x24, 0xfd, 0x98, + 0x5f, 0x3c, 0x06, 0x6a, 0xe2, 0x30, 0xe4, 0xc2, 0xa4, 0x63, 0x6c, 0x12, 0x27, 0x7a, 0x85, 0xe1, + 0x7a, 0xf1, 0x67, 0x02, 0x78, 0x76, 0xdd, 0x20, 0xe5, 0x55, 0xe6, 0x85, 0x58, 0x50, 0x59, 0x7a, + 0x19, 0x2a, 0x4a, 0xb5, 0x13, 0xf9, 0x60, 0xbe, 0xa9, 0xc1, 0x95, 0x88, 0x25, 0x92, 0xd7, 0xf9, + 0xd1, 0x73, 0x50, 0x36, 0x7a, 0x36, 0x73, 0x4b, 0xaa, 0x8e, 0xdd, 0x95, 0x56, 0x93, 0x95, 0x61, + 0x09, 0x45, 0x1f, 0x87, 0x72, 0x34, 0x4f, 0x42, 0x47, 0x91, 0x4b, 0x5c, 0x9e, 0xa7, 0xc8, 0x1a, + 0xe8, 0x59, 0x25, 0x0f, 0xda, 0x44, 0xbc, 0xa3, 0x49, 0xc2, 0xfc, 0x8c, 0x54, 0xff, 0xb5, 0x12, + 0xcc, 0x72, 0x5b, 0xbe, 0x66, 0xbb, 0x96, 0xed, 0x76, 0xce, 0x41, 0x94, 0x26, 0xde, 0x53, 0x2b, + 0x9d, 0xd6, 0x7b, 0x6a, 0xb7, 0x60, 0xf2, 0x3d, 0xba, 0xac, 0x23, 0x76, 0x18, 0x6a, 0x75, 0xc9, + 0xb9, 0x66, 0x12, 0x21, 0xc0, 0x02, 0x85, 0xfe, 0x5f, 0x34, 0x58, 0x48, 0x0c, 0xcb, 0x39, 0x08, + 0xe5, 0xad, 0xa4, 0x50, 0x5e, 0x29, 0x96, 0xd4, 0x42, 0xe9, 0x73, 0x8e, 0x70, 0xfe, 0xdd, 0x12, + 0x8c, 0xb7, 0x09, 0xb1, 0xce, 0x61, 0xa6, 0xdf, 0x49, 0x6c, 0x9a, 0x9f, 0x2d, 0xfc, 0xb6, 0x46, + 0x9e, 0xc5, 0xbf, 0x95, 0xb2, 0xf8, 0x3f, 0x57, 0x98, 0xc2, 0xd1, 0xe6, 0xfe, 0x6f, 0x94, 0x00, + 0x68, 0x35, 0xfe, 0xa2, 0x95, 0x88, 0xd1, 0x8b, 0xdf, 0x3c, 0x9c, 0xfe, 0xa0, 0xbc, 0x54, 0xa8, + 0xcb, 0x77, 0x93, 0xc6, 0x62, 0x7f, 0x72, 0xf2, 0xcd, 0xa4, 0xe4, 0xea, 0x1b, 0x3f, 0xa5, 0xd5, + 0xa7, 0xff, 0x73, 0x0d, 0x58, 0x5e, 0xe5, 0xc6, 0x7a, 0x1b, 0xbd, 0x04, 0xb3, 0x36, 0x3f, 0xad, + 0x6b, 0xa8, 0xc9, 0xa3, 0xd8, 0x99, 0x42, 0x53, 0x05, 0xe0, 0x64, 0x3d, 0xd4, 0x55, 0xc6, 0x75, + 0x84, 0x77, 0xe5, 0x44, 0x3f, 0x64, 0xf6, 0xd0, 0x99, 0xec, 0x89, 0xd1, 0x7f, 0x5c, 0x82, 0x0b, + 0xa9, 0xba, 0x43, 0xe8, 0xf3, 0x67, 0x23, 0xbd, 0x94, 0x84, 0xa2, 0x63, 0x67, 0x9f, 0x50, 0x54, + 0xe6, 0xf6, 0x1c, 0x3f, 0xdb, 0xdc, 0x9e, 0xdf, 0xd3, 0x80, 0x3d, 0x0e, 0x77, 0x0e, 0xd2, 0xf3, + 0x2f, 0x25, 0xa5, 0xe7, 0x67, 0x8a, 0x32, 0x4e, 0x8e, 0xd0, 0xfc, 0xed, 0x12, 0xb0, 0x7c, 0xfb, + 0x22, 0x38, 0x41, 0x39, 0xef, 0xd7, 0x72, 0xce, 0xfb, 0x9f, 0x11, 0xe1, 0x02, 0x29, 0xc7, 0x97, + 0x12, 0x32, 0xf0, 0x71, 0x25, 0x22, 0x60, 0x2c, 0x29, 0x46, 0x06, 0xa3, 0x02, 0xd0, 0x03, 0x98, + 0x0d, 0xb6, 0x3d, 0x2f, 0x8c, 0x4c, 0x60, 0x31, 0x77, 0x2b, 0x85, 0x43, 0x6a, 0xa3, 0x4f, 0xe1, + 0x0b, 0xb3, 0xad, 0xe2, 0xc6, 0x49, 0x52, 0x68, 0x19, 0x60, 0xd3, 0xf1, 0xcc, 0x9d, 0x7a, 0xb3, + 0x81, 0xa3, 0xc0, 0x4b, 0x16, 0x51, 0x54, 0x93, 0xa5, 0x58, 0xa9, 0xa1, 0xff, 0xa1, 0xc6, 0x47, + 0xeb, 0x04, 0xcb, 0xea, 0x1c, 0xa5, 0xe4, 0x47, 0x53, 0x52, 0x32, 0xef, 0x75, 0xb9, 0xef, 0x8a, + 0xaf, 0x90, 0x4f, 0x37, 0x39, 0x30, 0xeb, 0xa8, 0xcf, 0x30, 0x08, 0x36, 0x2e, 0xf4, 0x82, 0x83, + 0x78, 0xb0, 0x50, 0x29, 0xc2, 0x49, 0xe4, 0x54, 0x8c, 0x46, 0x1d, 0x57, 0x9f, 0xa5, 0x66, 0x0d, + 0x5b, 0x2a, 0x00, 0x27, 0xeb, 0xe9, 0x6f, 0xc2, 0x47, 0x78, 0xb7, 0x59, 0xdc, 0xf3, 0xea, 0x9e, + 0x49, 0x82, 0xa0, 0x6e, 0xf4, 0x0c, 0x93, 0x2a, 0xf6, 0xec, 0xba, 0x20, 0xf7, 0x78, 0x9d, 0xe0, + 0xe9, 0xf8, 0xff, 0xa7, 0x41, 0x55, 0xc1, 0x99, 0x88, 0x04, 0x89, 0x18, 0xf4, 0x5b, 0x1a, 0x54, + 0x0c, 0xd7, 0xf5, 0x42, 0x43, 0x3d, 0x80, 0xb1, 0x8a, 0x3f, 0xa8, 0x95, 0x4b, 0x6a, 0x79, 0x25, + 0x26, 0x93, 0x3a, 0x6a, 0x55, 0x20, 0x58, 0xed, 0xcd, 0xd2, 0xe7, 0x60, 0x3e, 0xdd, 0xea, 0x44, + 0x2a, 0x7c, 0x0d, 0x2e, 0x2b, 0xbd, 0x12, 0x17, 0xaf, 0xa8, 0xbe, 0xfc, 0x3c, 0x4c, 0xed, 0xda, + 0x81, 0x1d, 0x5d, 0xe0, 0x55, 0x46, 0xf1, 0x1e, 0x2f, 0xc6, 0x11, 0x5c, 0x7f, 0x03, 0x2e, 0xaa, + 0x38, 0xd8, 0x12, 0x5b, 0x6f, 0x9f, 0x64, 0x1e, 0xd6, 0xe0, 0x19, 0x05, 0x43, 0xe6, 0xed, 0xa3, + 0x93, 0xa0, 0xfb, 0xea, 0x64, 0xc4, 0xe1, 0x22, 0x44, 0xfe, 0xbb, 0x1a, 0x3c, 0x41, 0xf2, 0x18, + 0x46, 0xb0, 0xfb, 0x17, 0x46, 0x9c, 0xd1, 0x5c, 0x86, 0x14, 0xe9, 0x5d, 0xf2, 0xc0, 0x38, 0xbf, + 0x67, 0x68, 0x1f, 0x20, 0x90, 0x53, 0x32, 0x4a, 0xf4, 0x64, 0xe6, 0x1c, 0x8b, 0x14, 0x9e, 0xf2, + 0x37, 0x56, 0x88, 0xa1, 0xf7, 0xa0, 0x1c, 0x88, 0x99, 0x1c, 0xe5, 0x72, 0x64, 0x06, 0x63, 0x88, + 0x00, 0x31, 0xf1, 0x0b, 0x4b, 0x32, 0xe8, 0x37, 0x35, 0xb8, 0xe4, 0x64, 0xac, 0x0b, 0xb1, 0x25, + 0xb4, 0xcf, 0x60, 0xc9, 0x71, 0x17, 0x60, 0x16, 0x04, 0x67, 0x76, 0x05, 0xfd, 0xe3, 0xdc, 0x9b, + 0x78, 0x3c, 0x66, 0xf9, 0xee, 0x88, 0x9d, 0x3c, 0xad, 0x4b, 0x79, 0xdf, 0x9c, 0xe2, 0x2a, 0x0a, + 0xf3, 0x54, 0x6d, 0xc2, 0xe4, 0x26, 0x53, 0xf1, 0x05, 0xab, 0x17, 0xb6, 0x27, 0xc4, 0x73, 0xdd, + 0x4c, 0xff, 0xe6, 0xff, 0x63, 0x81, 0x19, 0xbd, 0x0d, 0x63, 0x96, 0x1b, 0xbd, 0xe6, 0xf1, 0xea, + 0x08, 0xfa, 0x6d, 0x1c, 0x60, 0x4a, 0xb9, 0x83, 0x22, 0x45, 0x2e, 0x94, 0x5d, 0xb1, 0xab, 0x0b, + 0x5e, 0x2c, 0xfc, 0x9e, 0xa1, 0xd4, 0x0e, 0xa4, 0x4e, 0x12, 0x95, 0x60, 0x49, 0x83, 0xd2, 0x93, + 0x0a, 0xfb, 0xf8, 0x68, 0xf4, 0x86, 0x7a, 0xf4, 0xbd, 0xa5, 0xea, 0xde, 0x27, 0x78, 0x4a, 0x7b, + 0x36, 0x57, 0xef, 0x26, 0x30, 0x19, 0x1a, 0x2c, 0x5e, 0x61, 0xb2, 0x78, 0xbc, 0x00, 0xed, 0xff, + 0x5d, 0x8a, 0x25, 0x56, 0x25, 0xd8, 0xcf, 0x00, 0x0b, 0xe4, 0x94, 0xb1, 0xf8, 0x53, 0x8b, 0xe2, + 0xc0, 0xac, 0x30, 0x63, 0xf1, 0x3c, 0xf6, 0x9c, 0xb1, 0xf8, 0xff, 0x58, 0x60, 0x46, 0xef, 0x52, + 0x75, 0x92, 0xcb, 0x71, 0x91, 0x8d, 0xe9, 0x8d, 0x11, 0xd7, 0x58, 0x10, 0x85, 0xa8, 0xf2, 0x5f, + 0x58, 0xe2, 0x47, 0x9b, 0x30, 0x25, 0x4c, 0x37, 0x71, 0xb1, 0xf6, 0xd5, 0x11, 0xb2, 0xfd, 0x46, + 0x4f, 0x33, 0xf0, 0xcb, 0x6d, 0x11, 0x62, 0xfd, 0x9f, 0x94, 0xb9, 0xd1, 0x2d, 0xce, 0xfa, 0xb6, + 0xa0, 0x1c, 0xa1, 0x1b, 0x25, 0x5c, 0x3a, 0xca, 0xc6, 0xce, 0x3f, 0x2d, 0xfa, 0x85, 0x25, 0x6e, + 0x54, 0xcf, 0x8a, 0x4c, 0x8f, 0x33, 0xe6, 0x0d, 0x17, 0x95, 0x9e, 0x0c, 0x45, 0x19, 0x3b, 0x8f, + 0x50, 0x94, 0xd3, 0x7c, 0xbb, 0xfe, 0x35, 0xb8, 0x10, 0x45, 0x8a, 0x58, 0x84, 0x39, 0x84, 0x45, + 0x0c, 0x25, 0xbb, 0xab, 0x55, 0x4f, 0x82, 0x70, 0xba, 0x2e, 0xfa, 0x7d, 0x0d, 0xca, 0xa6, 0xd8, + 0xa5, 0xc5, 0xba, 0xba, 0x3d, 0x9a, 0x67, 0x66, 0x39, 0xda, 0xf4, 0xb9, 0xba, 0x77, 0x2f, 0x92, + 0x11, 0x51, 0xf1, 0x29, 0x79, 0xea, 0x65, 0xaf, 0xd1, 0x7f, 0xa0, 0xca, 0xac, 0xc3, 0x72, 0xc4, + 0xb3, 0xab, 0x2f, 0x3c, 0xb8, 0xf3, 0xce, 0x88, 0x5f, 0xb1, 0x12, 0x63, 0xe4, 0x1f, 0xf2, 0x45, + 0xa9, 0xb7, 0xc6, 0x90, 0x53, 0xfa, 0x16, 0xb5, 0xfb, 0x4b, 0x3b, 0x30, 0x9b, 0x18, 0xc1, 0xb3, + 0x3c, 0x30, 0x58, 0x72, 0x61, 0x3e, 0xfd, 0xa1, 0x67, 0x7a, 0x40, 0x71, 0x0b, 0xa6, 0xa5, 0x04, + 0x46, 0x4f, 0x2b, 0x84, 0xe2, 0x1d, 0xf2, 0x16, 0xd9, 0xe7, 0x54, 0xab, 0x09, 0x05, 0x9f, 0x9b, + 0xed, 0xf7, 0x68, 0x81, 0x40, 0xa8, 0xff, 0x40, 0x18, 0x7d, 0x77, 0x49, 0xb7, 0xe7, 0x18, 0x21, + 0x79, 0xf4, 0xbd, 0xa4, 0xfa, 0xff, 0xd4, 0xb8, 0x20, 0x15, 0x2f, 0xac, 0x18, 0x50, 0xe9, 0xf2, + 0x5c, 0x57, 0x2c, 0xb7, 0x6a, 0xb1, 0xeb, 0x75, 0x2c, 0x52, 0x63, 0x2d, 0x46, 0x83, 0x55, 0x9c, + 0xe8, 0xfe, 0xe0, 0x1b, 0x40, 0xd7, 0x47, 0xdb, 0xf1, 0x86, 0x7e, 0x0a, 0x08, 0x0d, 0xb6, 0x51, + 0x5f, 0x5c, 0xd1, 0x8e, 0x7e, 0x71, 0xe5, 0xf8, 0x77, 0x38, 0xf4, 0xef, 0x68, 0x90, 0x99, 0x21, + 0x1a, 0xe9, 0x30, 0xc9, 0xe3, 0xc3, 0xd5, 0xc7, 0x91, 0x78, 0xf0, 0x38, 0x16, 0x10, 0xe4, 0xc3, + 0x25, 0x11, 0x7d, 0x7d, 0x8b, 0xec, 0xc7, 0xcf, 0xf2, 0x88, 0xa9, 0x1f, 0x3e, 0x0e, 0x93, 0xe5, + 0xc0, 0x69, 0xa7, 0x30, 0xe1, 0x4c, 0xdc, 0x2c, 0x00, 0x98, 0x19, 0x11, 0x8f, 0xc6, 0x29, 0x39, + 0xeb, 0xea, 0xd9, 0x06, 0x00, 0x73, 0x12, 0xc7, 0x07, 0x00, 0xb3, 0x7a, 0x8f, 0xc8, 0x71, 0x3c, + 0xeb, 0x6b, 0x8e, 0xf3, 0xf2, 0x7b, 0x1a, 0x2c, 0x0c, 0xdc, 0xa2, 0x1f, 0xea, 0x30, 0xf7, 0xdc, + 0x7c, 0x72, 0xcf, 0xa6, 0x5f, 0xb7, 0xa9, 0x64, 0x26, 0xd7, 0x78, 0x0b, 0x66, 0x13, 0xbe, 0x4b, + 0x79, 0x29, 0x4b, 0xcb, 0xbc, 0x94, 0xa5, 0xde, 0xb9, 0x2a, 0x1d, 0x79, 0xe7, 0xea, 0x70, 0x46, + 0x4c, 0x37, 0xb3, 0x03, 0xdf, 0x81, 0x49, 0x76, 0x33, 0x2a, 0x7a, 0xdd, 0xeb, 0x95, 0xc2, 0x37, + 0xae, 0x02, 0x2e, 0x06, 0xf8, 0xff, 0x58, 0x60, 0x45, 0x0d, 0x98, 0x67, 0xaf, 0x3e, 0xb7, 0x7c, + 0x6f, 0xcb, 0x76, 0xc8, 0x7a, 0x2c, 0x71, 0xe4, 0x3d, 0xec, 0x7a, 0x0a, 0x8e, 0x07, 0x5a, 0x20, + 0xcc, 0x2d, 0x49, 0xbe, 0x10, 0x5e, 0x2a, 0xe8, 0xc3, 0xe7, 0x99, 0xae, 0xa4, 0x05, 0xf9, 0x1e, + 0x00, 0x89, 0x26, 0x2e, 0x0a, 0xde, 0x79, 0xad, 0xd8, 0x0d, 0x73, 0x39, 0xfd, 0x91, 0xc4, 0x90, + 0x45, 0x01, 0x56, 0x88, 0x20, 0x1f, 0x2a, 0xdb, 0xf1, 0xe3, 0x3f, 0xc2, 0xac, 0x7b, 0x7d, 0xc4, + 0x87, 0x87, 0xf8, 0x06, 0xa5, 0x14, 0x60, 0x95, 0x08, 0xf2, 0x13, 0xaf, 0x6d, 0x8f, 0xf0, 0xb4, + 0x42, 0x6c, 0x0d, 0x1c, 0xf7, 0xd2, 0x36, 0xa5, 0xe9, 0xca, 0xab, 0x8d, 0xa3, 0xd8, 0x81, 0xf1, + 0x05, 0xc9, 0x98, 0x66, 0x5c, 0x86, 0x15, 0x2a, 0x74, 0x6c, 0xbb, 0xf1, 0x75, 0x56, 0x61, 0x16, + 0xbe, 0x3e, 0xe2, 0xb5, 0x62, 0xb1, 0xf9, 0xc7, 0x05, 0x58, 0x25, 0x82, 0x5c, 0x80, 0xae, 0xbc, + 0xe5, 0x2a, 0xcc, 0xc3, 0x42, 0xdf, 0x19, 0xdf, 0x95, 0xe5, 0x0e, 0xb8, 0xf8, 0x37, 0x56, 0x28, + 0x50, 0xbb, 0x57, 0x3a, 0x21, 0xa0, 0xb8, 0x0a, 0x35, 0x94, 0x03, 0xe2, 0xd3, 0xb1, 0x26, 0x51, + 0x61, 0xeb, 0xf5, 0x49, 0x45, 0x8b, 0x78, 0x78, 0x50, 0x9d, 0x61, 0x32, 0x64, 0x40, 0xab, 0x88, + 0x4f, 0x1c, 0x66, 0x8e, 0x3a, 0x71, 0x40, 0x37, 0x60, 0x21, 0x50, 0x4f, 0xf0, 0x99, 0x60, 0x98, + 0x65, 0x4d, 0xe4, 0xad, 0xe8, 0x76, 0xba, 0x02, 0x1e, 0x6c, 0xc3, 0x05, 0x1f, 0xb1, 0x58, 0xfb, + 0x39, 0x55, 0xf0, 0xf1, 0x32, 0x2c, 0xa1, 0x68, 0x37, 0xf5, 0x28, 0xf5, 0x85, 0x51, 0x3d, 0x07, + 0xc3, 0xbd, 0x50, 0x8d, 0xbe, 0xac, 0x3e, 0x3c, 0x3a, 0x5f, 0x3c, 0x94, 0x2b, 0xfb, 0x66, 0xf3, + 0x31, 0x8f, 0x8f, 0xf6, 0x93, 0x41, 0xcc, 0x0b, 0xa7, 0x12, 0x35, 0x2a, 0xcf, 0x20, 0x72, 0x03, + 0x98, 0xbf, 0x53, 0x86, 0x8a, 0xa2, 0x7b, 0xbc, 0x1f, 0x17, 0x56, 0x42, 0xa8, 0x98, 0x9e, 0x1b, + 0x84, 0xbe, 0xa1, 0x5c, 0xd2, 0x19, 0x91, 0xa6, 0xfc, 0xf0, 0x7a, 0x8c, 0x19, 0xab, 0x64, 0xe8, + 0x12, 0x95, 0xbe, 0x9b, 0xb1, 0x53, 0xf0, 0xdd, 0xc8, 0x25, 0x9a, 0xe1, 0xbf, 0xf9, 0x14, 0x40, + 0x24, 0xe9, 0xe5, 0xcb, 0x8e, 0x32, 0xeb, 0x59, 0x33, 0xb8, 0x29, 0x61, 0x58, 0xa9, 0x87, 0x1e, + 0xc0, 0xac, 0xa3, 0x66, 0x3c, 0x12, 0xdb, 0x50, 0xa1, 0xd3, 0xd5, 0x44, 0xea, 0xa4, 0xe8, 0xa0, + 0x4f, 0x29, 0xc2, 0x49, 0x52, 0x94, 0x0d, 0x9c, 0x28, 0x4b, 0xd7, 0x48, 0x7e, 0x48, 0x99, 0xeb, + 0x2b, 0x66, 0x03, 0x59, 0x14, 0x60, 0x85, 0x48, 0x8e, 0xb3, 0x68, 0xaa, 0x90, 0xb3, 0xa8, 0x0f, + 0x17, 0x7d, 0x12, 0xfa, 0xfb, 0xf5, 0x7d, 0x93, 0xbd, 0xdf, 0xe6, 0x87, 0x2c, 0x45, 0x56, 0xb9, + 0x58, 0x0c, 0x3c, 0x1e, 0x44, 0x85, 0xb3, 0xf0, 0x27, 0x44, 0xdc, 0xf4, 0x91, 0x22, 0xee, 0xd3, + 0x50, 0x09, 0x89, 0xb9, 0xed, 0xda, 0xa6, 0xe1, 0x34, 0x1b, 0xe2, 0x9e, 0x6a, 0xbc, 0x5a, 0x63, + 0x10, 0x56, 0xeb, 0xa1, 0x1a, 0x8c, 0xf5, 0x6d, 0x4b, 0xc8, 0xf9, 0x9f, 0x91, 0xcf, 0x78, 0x36, + 0x1b, 0x0f, 0x0f, 0xaa, 0x1f, 0x8a, 0xbd, 0x2f, 0xf2, 0xab, 0xae, 0xf5, 0x76, 0x3a, 0xd7, 0xc2, + 0xfd, 0x1e, 0x09, 0x96, 0x37, 0x9a, 0x0d, 0x4c, 0x1b, 0x67, 0x39, 0xd2, 0x66, 0x86, 0x77, 0xa4, + 0xe9, 0x7f, 0xa2, 0x09, 0x7d, 0xf7, 0x1c, 0xbd, 0x11, 0x67, 0x6d, 0xc2, 0xe9, 0xb7, 0x01, 0x62, + 0x09, 0x39, 0xb2, 0xbf, 0xe6, 0xa7, 0x13, 0x70, 0x79, 0xd4, 0x73, 0x50, 0x96, 0x20, 0x8b, 0x65, + 0xed, 0x5f, 0xd9, 0x0a, 0x89, 0x7f, 0xe7, 0xce, 0xda, 0xdd, 0x6d, 0x9f, 0x04, 0xdb, 0x9e, 0x63, + 0x15, 0xcc, 0xd0, 0x15, 0x3f, 0xfa, 0x30, 0x80, 0x11, 0xe7, 0x50, 0x42, 0x75, 0x58, 0x88, 0x5e, + 0x0e, 0xc0, 0x46, 0x48, 0x6a, 0x7d, 0x3f, 0x08, 0x45, 0xf8, 0x26, 0x73, 0x3c, 0xaf, 0xa6, 0x81, + 0x78, 0xb0, 0x7e, 0x1a, 0x09, 0x7f, 0x41, 0x60, 0x9c, 0x3d, 0x2c, 0x38, 0x80, 0x84, 0x3f, 0x23, + 0x30, 0x58, 0x5f, 0x45, 0x22, 0x1f, 0x22, 0x64, 0x02, 0x31, 0x85, 0x24, 0x7e, 0xa5, 0x70, 0xb0, + 0x3e, 0xb2, 0xe0, 0x29, 0x9f, 0x98, 0x5e, 0xb7, 0x4b, 0x5c, 0x8b, 0xa7, 0x56, 0x34, 0xfc, 0x8e, + 0xed, 0x5e, 0xf7, 0x0d, 0x56, 0x51, 0xbc, 0x76, 0xf8, 0xcc, 0xe1, 0x41, 0xf5, 0x29, 0x7c, 0x44, + 0x3d, 0x7c, 0x24, 0x16, 0xd4, 0x85, 0x0b, 0x7d, 0x96, 0x51, 0xc6, 0x6f, 0xba, 0x21, 0xf1, 0x77, + 0x0d, 0xa7, 0xe0, 0xbb, 0x18, 0x6c, 0x41, 0x6e, 0x24, 0x51, 0xe1, 0x34, 0x6e, 0xb4, 0x4f, 0x65, + 0x9d, 0xe8, 0x8e, 0x42, 0xb2, 0x5c, 0x3c, 0x85, 0x1c, 0x1e, 0x44, 0x87, 0xb3, 0x68, 0xe8, 0x7f, + 0x5f, 0x03, 0x71, 0xe2, 0x43, 0x8d, 0x5e, 0xc5, 0x72, 0x2f, 0xbf, 0xff, 0xef, 0x23, 0xdf, 0x07, + 0x81, 0x80, 0xe5, 0xed, 0x1a, 0x2a, 0xeb, 0xd3, 0xf1, 0x0f, 0xde, 0xc6, 0x79, 0xa7, 0xc6, 0x72, + 0xf3, 0x4e, 0x7d, 0x57, 0x83, 0xf4, 0xfb, 0x68, 0xe8, 0x59, 0x98, 0x12, 0x97, 0x83, 0xc4, 0x15, + 0x03, 0x1e, 0x03, 0xc7, 0x8b, 0x70, 0x04, 0x4b, 0x2a, 0xa0, 0x23, 0xdc, 0x25, 0xc8, 0x8e, 0xeb, + 0x3e, 0x5a, 0x01, 0xd5, 0x7f, 0x38, 0x07, 0x93, 0xfc, 0x3a, 0x0b, 0x95, 0x3d, 0x19, 0x61, 0x33, + 0xb7, 0x8a, 0x5f, 0x98, 0x29, 0x10, 0x1d, 0x93, 0x48, 0x2f, 0x52, 0x3a, 0x32, 0xbd, 0x08, 0xe6, + 0xc9, 0xdf, 0x46, 0x70, 0x3a, 0xd4, 0x71, 0x53, 0xe4, 0x1b, 0x17, 0x89, 0xdf, 0x50, 0x98, 0xb0, + 0xc6, 0xc7, 0x8b, 0xa7, 0xb5, 0xe3, 0x03, 0xa0, 0xd8, 0xe4, 0x73, 0x47, 0xd8, 0xe3, 0xf1, 0xfd, + 0x81, 0x89, 0xe2, 0x1e, 0x6a, 0x31, 0xe4, 0x43, 0xdc, 0x1f, 0x90, 0x1c, 0x3f, 0x99, 0xcb, 0xf1, + 0x5b, 0x30, 0x25, 0xe4, 0x86, 0x10, 0x62, 0xaf, 0x8e, 0x90, 0xd8, 0x4d, 0xb9, 0xf0, 0xc9, 0x0b, + 0x70, 0x84, 0x9c, 0xee, 0x8c, 0x5d, 0x63, 0xcf, 0xee, 0xf6, 0xbb, 0x4c, 0x72, 0x4d, 0xa8, 0x55, + 0x59, 0x31, 0x8e, 0xe0, 0xac, 0x2a, 0x77, 0xec, 0x33, 0x25, 0x4b, 0xad, 0x2a, 0xde, 0xcb, 0x88, + 0xe0, 0xe8, 0x6d, 0x28, 0x77, 0x8d, 0xbd, 0x76, 0xdf, 0xef, 0x10, 0x61, 0x87, 0xe7, 0xab, 0x26, + 0xfd, 0xd0, 0x76, 0x96, 0xa9, 0x69, 0x10, 0xfa, 0xcb, 0x4d, 0x37, 0xbc, 0xe3, 0xb7, 0x43, 0x5f, + 0xe6, 0xb0, 0x5a, 0x13, 0x58, 0xb0, 0xc4, 0x87, 0x1c, 0x98, 0xeb, 0x1a, 0x7b, 0x1b, 0xae, 0x21, + 0xd3, 0xfa, 0x57, 0x0a, 0x52, 0x60, 0xce, 0xc8, 0xb5, 0x04, 0x2e, 0x9c, 0xc2, 0x9d, 0xe1, 0xf7, + 0x9c, 0x39, 0x2b, 0xbf, 0xe7, 0x8a, 0x8c, 0x3f, 0x98, 0x65, 0x4c, 0xf8, 0x44, 0xd6, 0x11, 0xc0, + 0xd1, 0xb1, 0x05, 0xef, 0xc8, 0xd8, 0x82, 0xb9, 0xe2, 0xce, 0xca, 0x23, 0xe2, 0x0a, 0xfa, 0x50, + 0xb1, 0xe4, 0xfb, 0xfc, 0xc1, 0xe2, 0x85, 0xe2, 0xc6, 0x72, 0xfc, 0xcc, 0xbf, 0x92, 0x74, 0x37, + 0x46, 0x8d, 0x55, 0x3a, 0xe8, 0x0e, 0x4f, 0xfb, 0xee, 0x90, 0x30, 0xae, 0xc2, 0x94, 0xfd, 0x79, + 0xee, 0x0f, 0x89, 0xb2, 0xb4, 0x0f, 0x54, 0xc0, 0xd9, 0xed, 0xa8, 0x2a, 0xc9, 0x83, 0x9e, 0x17, + 0xe2, 0x7b, 0xe6, 0x89, 0x0b, 0x45, 0xbf, 0xa4, 0xc1, 0x3c, 0x7f, 0x8e, 0xa7, 0xee, 0x75, 0x7b, + 0x9e, 0x4b, 0xe8, 0xb4, 0x20, 0x36, 0xa6, 0x9f, 0x2f, 0x2e, 0x1b, 0xda, 0x29, 0x8c, 0xe2, 0xec, + 0x26, 0x55, 0x8a, 0x07, 0x28, 0xa3, 0xdf, 0xd3, 0x60, 0xb1, 0x9b, 0x93, 0xd3, 0x76, 0xf1, 0x62, + 0xf1, 0x20, 0xaa, 0xe3, 0xf2, 0xe4, 0xf2, 0x27, 0xc2, 0x8e, 0xab, 0x85, 0x73, 0xfb, 0x36, 0x6a, + 0xa8, 0xe5, 0x28, 0x17, 0xad, 0x7e, 0x1e, 0xe6, 0xd3, 0x7b, 0x80, 0x9a, 0xa8, 0x5e, 0x3b, 0xd3, + 0x44, 0xf5, 0xfa, 0x6b, 0x70, 0x25, 0x7b, 0xce, 0xa9, 0x4a, 0xc4, 0x5e, 0x7c, 0x10, 0x96, 0x48, + 0x9c, 0x86, 0x8d, 0x16, 0x62, 0x0e, 0xab, 0x7d, 0xe2, 0xfb, 0x3f, 0xb9, 0xfa, 0xd8, 0x0f, 0x7e, + 0x72, 0xf5, 0xb1, 0x1f, 0xfd, 0xe4, 0xea, 0x63, 0x5f, 0x3d, 0xbc, 0xaa, 0x7d, 0xff, 0xf0, 0xaa, + 0xf6, 0x83, 0xc3, 0xab, 0xda, 0x8f, 0x0e, 0xaf, 0x6a, 0xff, 0xfd, 0xf0, 0xaa, 0xf6, 0x2b, 0xff, + 0xe3, 0xea, 0x63, 0x6f, 0x4f, 0x89, 0x1e, 0xfd, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x81, + 0x3f, 0x02, 0x27, 0xac, 0x00, 0x00, } func (m *Addon) Marshal() (dAtA []byte, err error) { @@ -10727,6 +10787,49 @@ func (m *SeedTaint) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *SeedTemplate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SeedTemplate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SeedTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *SeedVolume) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -11369,6 +11472,49 @@ func (m *ShootStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ShootTemplate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ShootTemplate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ShootTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *Toleration) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -14288,6 +14434,19 @@ func (m *SeedTaint) Size() (n int) { return n } +func (m *SeedTemplate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *SeedVolume) Size() (n int) { if m == nil { return 0 @@ -14527,6 +14686,19 @@ func (m *ShootStatus) Size() (n int) { return n } +func (m *ShootTemplate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *Toleration) Size() (n int) { if m == nil { return 0 @@ -16411,6 +16583,17 @@ func (this *SeedTaint) String() string { }, "") return s } +func (this *SeedTemplate) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SeedTemplate{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SeedSpec", "SeedSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} func (this *SeedVolume) String() string { if this == nil { return "nil" @@ -16577,6 +16760,17 @@ func (this *ShootStatus) String() string { }, "") return s } +func (this *ShootTemplate) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ShootTemplate{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ShootSpec", "ShootSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} func (this *Toleration) String() string { if this == nil { return "nil" @@ -35718,6 +35912,125 @@ func (m *SeedTaint) Unmarshal(dAtA []byte) error { } return nil } +func (m *SeedTemplate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SeedTemplate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SeedTemplate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *SeedVolume) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -37686,6 +37999,125 @@ func (m *ShootStatus) Unmarshal(dAtA []byte) error { } return nil } +func (m *ShootTemplate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ShootTemplate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ShootTemplate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Toleration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/generated.proto b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/generated.proto index 1d387f8d..06935ddb 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/generated.proto +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/generated.proto @@ -16,7 +16,7 @@ limitations under the License. // This file was autogenerated by go-to-protobuf. Do not edit it manually! -syntax = 'proto2'; +syntax = "proto2"; package github.com.gardener.gardener.pkg.apis.core.v1beta1; @@ -1252,7 +1252,7 @@ message Networking { message NginxIngress { optional Addon addon = 1; - // LoadBalancerSourceRanges is list of whitelist IP sources for NginxIngress + // LoadBalancerSourceRanges is list of allowed IP sources for NginxIngress // +optional repeated string loadBalancerSourceRanges = 2; @@ -1869,6 +1869,17 @@ message SeedTaint { optional string value = 2; } +// SeedTemplate is a template for creating a Seed object. +message SeedTemplate { + // Standard object metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the desired behavior of the Seed. + // +optional + optional SeedSpec spec = 2; +} + // SeedVolume contains settings for persistentvolumes created in the seed cluster. message SeedVolume { // MinimumSize defines the minimum size that should be used for PVCs in the seed. @@ -2082,6 +2093,17 @@ message ShootStatus { optional string clusterIdentity = 12; } +// ShootTemplate is a template for creating a Shoot object. +message ShootTemplate { + // Standard object metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the desired behavior of the Shoot. + // +optional + optional ShootSpec spec = 2; +} + // Toleration is a toleration for a seed taint. message Toleration { // Key is the toleration key to be applied to a project or shoot. @@ -2255,6 +2277,7 @@ message Worker { // WorkerKubernetes contains configuration for Kubernetes components related to this worker pool. message WorkerKubernetes { // Kubelet contains configuration settings for all kubelets of this worker pool. + // If set, all `spec.kubernetes.kubelet` settings will be overwritten for this worker pool (no merge of settings). // +optional optional KubeletConfig kubelet = 1; } diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/helper/errors.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/helper/errors.go index 087ee521..ab2df1f2 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/helper/errors.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/helper/errors.go @@ -50,12 +50,13 @@ func (e *ErrorWithCodes) Error() string { } var ( - unauthorizedRegexp = regexp.MustCompile(`(?i)(Unauthorized|InvalidClientTokenId|InvalidAuthenticationTokenTenant|SignatureDoesNotMatch|Authentication failed|AuthFailure|AuthorizationFailed|invalid character|invalid_grant|invalid_client|Authorization Profile was not found|cannot fetch token|no active subscriptions|InvalidAccessKeyId|InvalidSecretAccessKey|query returned no results|UnauthorizedOperation|not authorized)`) - quotaExceededRegexp = regexp.MustCompile(`(?i)(LimitExceeded|Quota|Throttling|Too many requests)`) - insufficientPrivilegesRegexp = regexp.MustCompile(`(?i)(AccessDenied|OperationNotAllowed|Error 403)`) - dependenciesRegexp = regexp.MustCompile(`(?i)(PendingVerification|Access Not Configured|accessNotConfigured|DependencyViolation|OptInRequired|DeleteConflict|Conflict|inactive billing state|ReadOnlyDisabledSubscription|is already being used|InUseSubnetCannotBeDeleted|VnetInUse|InUseRouteTableCannotBeDeleted|timeout while waiting for state to become|InvalidCidrBlock|already busy for|InsufficientFreeAddressesInSubnet|InternalServerError|RetryableError|Future#WaitForCompletion: context has been cancelled|internalerror|internal server error|A resource with the ID|VnetAddressSpaceCannotChangeDueToPeerings)`) - resourcesDepletedRegexp = regexp.MustCompile(`(?i)(not available in the current hardware cluster|InsufficientInstanceCapacity|SkuNotAvailable|ZonalAllocationFailed)`) - configurationProblemRegexp = regexp.MustCompile(`(?i)(AzureBastionSubnet|not supported in your requested Availability Zone|InvalidParameter|InvalidParameterValue|not found|notFound|NetcfgInvalidSubnet|InvalidSubnet|Invalid value|KubeletHasInsufficientMemory|KubeletHasDiskPressure|KubeletHasInsufficientPID|violates constraint|no attached internet gateway found|Your query returned no results|PrivateEndpointNetworkPoliciesCannotBeEnabledOnPrivateEndpointSubnet|invalid VPC attributes|PrivateLinkServiceNetworkPoliciesCannotBeEnabledOnPrivateLinkServiceSubnet)`) + unauthorizedRegexp = regexp.MustCompile(`(?i)(Unauthorized|InvalidClientTokenId|InvalidAuthenticationTokenTenant|SignatureDoesNotMatch|Authentication failed|AuthFailure|AuthorizationFailed|invalid character|invalid_grant|invalid_client|Authorization Profile was not found|cannot fetch token|no active subscriptions|InvalidAccessKeyId|InvalidSecretAccessKey|query returned no results|UnauthorizedOperation|not authorized)`) + quotaExceededRegexp = regexp.MustCompile(`(?i)(LimitExceeded|Quota|Throttling|Too many requests)`) + insufficientPrivilegesRegexp = regexp.MustCompile(`(?i)(AccessDenied|OperationNotAllowed|Error 403)`) + dependenciesRegexp = regexp.MustCompile(`(?i)(PendingVerification|Access Not Configured|accessNotConfigured|DependencyViolation|OptInRequired|DeleteConflict|Conflict|inactive billing state|ReadOnlyDisabledSubscription|is already being used|InUseSubnetCannotBeDeleted|VnetInUse|InUseRouteTableCannotBeDeleted|timeout while waiting for state to become|InvalidCidrBlock|already busy for|InsufficientFreeAddressesInSubnet|InternalServerError|RetryableError|Future#WaitForCompletion: context has been cancelled|internalerror|internal server error|A resource with the ID|VnetAddressSpaceCannotChangeDueToPeerings)`) + resourcesDepletedRegexp = regexp.MustCompile(`(?i)(not available in the current hardware cluster|InsufficientInstanceCapacity|SkuNotAvailable|ZonalAllocationFailed|out of stock)`) + configurationProblemRegexp = regexp.MustCompile(`(?i)(AzureBastionSubnet|not supported in your requested Availability Zone|InvalidParameter|InvalidParameterValue|notFound|NetcfgInvalidSubnet|InvalidSubnet|Invalid value|KubeletHasInsufficientMemory|KubeletHasDiskPressure|KubeletHasInsufficientPID|violates constraint|no attached internet gateway found|Your query returned no results|PrivateEndpointNetworkPoliciesCannotBeEnabledOnPrivateEndpointSubnet|invalid VPC attributes|PrivateLinkServiceNetworkPoliciesCannotBeEnabledOnPrivateLinkServiceSubnet|unrecognized feature gate|runtime-config invalid key|LoadBalancingRuleMustDisableSNATSinceSameFrontendIPConfigurationIsReferencedByOutboundRule)`) + retryableConfigurationProblemRegexp = regexp.MustCompile(`(?i)(is misconfigured and requires zero voluntary evictions)`) ) // DetermineError determines the Garden error code for the given error and creates a new error with the given message. @@ -110,6 +111,9 @@ func DetermineErrorCodes(err error) []gardencorev1beta1.ErrorCode { if configurationProblemRegexp.MatchString(message) { codes.Insert(string(gardencorev1beta1.ErrorConfigurationProblem)) } + if retryableConfigurationProblemRegexp.MatchString(message) { + codes.Insert(string(gardencorev1beta1.ErrorRetryableConfigurationProblem)) + } // compute error code list based on code string set var out []gardencorev1beta1.ErrorCode @@ -197,7 +201,11 @@ func LastErrorWithTaskID(description string, taskID string, codes ...gardencorev func HasNonRetryableErrorCode(lastErrors ...gardencorev1beta1.LastError) bool { for _, lastError := range lastErrors { for _, code := range lastError.Codes { - if code == gardencorev1beta1.ErrorInfraUnauthorized || code == gardencorev1beta1.ErrorConfigurationProblem { + if code == gardencorev1beta1.ErrorInfraUnauthorized || + code == gardencorev1beta1.ErrorInfraInsufficientPrivileges || + code == gardencorev1beta1.ErrorInfraDependencies || + code == gardencorev1beta1.ErrorInfraQuotaExceeded || + code == gardencorev1beta1.ErrorConfigurationProblem { return true } } diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/helper/helper.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/helper/helper.go index 7849607f..635efe77 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/helper/helper.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/helper/helper.go @@ -20,22 +20,22 @@ import ( "strings" "time" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/json" - "k8s.io/utils/pointer" - gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" versionutils "github.com/gardener/gardener/pkg/utils/version" "github.com/Masterminds/semver" "github.com/pkg/errors" + corev1 "k8s.io/api/core/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/json" + "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/utils/pointer" ) // Now determines the current metav1.Time. @@ -285,20 +285,7 @@ func parseInt32(s string) (int32, error) { } func parseShootedSeed(annotation string) (*ShootedSeed, error) { - var ( - flags = make(map[string]struct{}) - settings = make(map[string]string) - ) - - for _, fragment := range strings.Split(annotation, ",") { - parts := strings.SplitN(fragment, "=", 2) - if len(parts) == 1 { - flags[fragment] = struct{}{} - continue - } - - settings[parts[0]] = parts[1] - } + flags, settings := getFlagsAndSettings(annotation) if _, ok := flags["true"]; !ok { return nil, nil @@ -385,6 +372,24 @@ func parseShootedSeed(annotation string) (*ShootedSeed, error) { return &shootedSeed, nil } +func getFlagsAndSettings(annotation string) (map[string]struct{}, map[string]string) { + var ( + flags = make(map[string]struct{}) + settings = make(map[string]string) + ) + + for _, fragment := range strings.Split(annotation, ",") { + parts := strings.SplitN(fragment, "=", 2) + if len(parts) == 1 { + flags[fragment] = struct{}{} + continue + } + settings[parts[0]] = parts[1] + } + + return flags, settings +} + func parseShootedSeedBlockCIDRs(settings map[string]string) ([]string, error) { cidrs, ok := settings["blockCIDRs"] if !ok { @@ -769,6 +774,35 @@ func ReadShootedSeed(shoot *gardencorev1beta1.Shoot) (*ShootedSeed, error) { return shootedSeed, nil } +// ReadManagedSeedAPIServer reads the managed seed API server settings from the corresponding annotation. +func ReadManagedSeedAPIServer(shoot *gardencorev1beta1.Shoot) (*ShootedSeedAPIServer, error) { + if shoot.Namespace != v1beta1constants.GardenNamespace || shoot.Annotations == nil { + return nil, nil + } + + val, ok := shoot.Annotations[v1beta1constants.AnnotationManagedSeedAPIServer] + if !ok { + return nil, nil + } + + _, settings := getFlagsAndSettings(val) + apiServer, err := parseShootedSeedAPIServer(settings) + if err != nil { + return nil, err + } + if apiServer == nil { + return nil, nil + } + + setDefaults_ShootedSeedAPIServer(apiServer) + + if errs := validateShootedSeedAPIServer(apiServer, nil); len(errs) > 0 { + return nil, errs.ToAggregate() + } + + return apiServer, nil +} + // HibernationIsEnabled checks if the given shoot's desired state is hibernated. func HibernationIsEnabled(shoot *gardencorev1beta1.Shoot) bool { return shoot.Spec.Hibernation != nil && shoot.Spec.Hibernation.Enabled != nil && *shoot.Spec.Hibernation.Enabled @@ -823,6 +857,11 @@ func ShootUsesUnmanagedDNS(shoot *gardencorev1beta1.Shoot) bool { return shoot.Spec.DNS != nil && len(shoot.Spec.DNS.Providers) > 0 && shoot.Spec.DNS.Providers[0].Type != nil && *shoot.Spec.DNS.Providers[0].Type == "unmanaged" } +// SeedSettingVerticalPodAutoscalerEnabled returns true if the 'verticalPodAutoscaler' setting is enabled. +func SeedSettingVerticalPodAutoscalerEnabled(settings *gardencorev1beta1.SeedSettings) bool { + return settings == nil || settings.VerticalPodAutoscaler == nil || settings.VerticalPodAutoscaler.Enabled +} + // DetermineMachineImageForName finds the cloud specific machine images in the for the given and // region. In case it does not find the machine image with the , it returns false. Otherwise, true and the // cloud-specific machine image will be returned. @@ -1196,3 +1235,109 @@ func KubernetesDashboardEnabled(addons *gardencorev1beta1.Addons) bool { func NginxIngressEnabled(addons *gardencorev1beta1.Addons) bool { return addons != nil && addons.NginxIngress != nil && addons.NginxIngress.Enabled } + +// BackupBucketIsErroneous returns `true` if the given BackupBucket has a last error. +// It also returns the error description if available. +func BackupBucketIsErroneous(bb *gardencorev1beta1.BackupBucket) (bool, string) { + if bb == nil { + return false, "" + } + lastErr := bb.Status.LastError + if lastErr == nil { + return false, "" + } + return true, lastErr.Description +} + +// SeedBackupSecretRefEqual returns true when the secret reference of the backup configuration is the same. +func SeedBackupSecretRefEqual(oldBackup, newBackup *gardencorev1beta1.SeedBackup) bool { + var ( + oldSecretRef corev1.SecretReference + newSecretRef corev1.SecretReference + ) + + if oldBackup != nil { + oldSecretRef = oldBackup.SecretRef + } + + if newBackup != nil { + newSecretRef = newBackup.SecretRef + } + + return apiequality.Semantic.DeepEqual(oldSecretRef, newSecretRef) +} + +// ShootAuditPolicyConfigMapRefEqual returns true if the name of the ConfigMap reference for the audit policy +// configuration is the same. +func ShootAuditPolicyConfigMapRefEqual(oldAPIServerConfig, newAPIServerConfig *gardencorev1beta1.KubeAPIServerConfig) bool { + var ( + oldConfigMapRefName string + newConfigMapRefName string + ) + + if oldAPIServerConfig != nil && + oldAPIServerConfig.AuditConfig != nil && + oldAPIServerConfig.AuditConfig.AuditPolicy != nil && + oldAPIServerConfig.AuditConfig.AuditPolicy.ConfigMapRef != nil { + oldConfigMapRefName = oldAPIServerConfig.AuditConfig.AuditPolicy.ConfigMapRef.Name + } + + if newAPIServerConfig != nil && + newAPIServerConfig.AuditConfig != nil && + newAPIServerConfig.AuditConfig.AuditPolicy != nil && + newAPIServerConfig.AuditConfig.AuditPolicy.ConfigMapRef != nil { + newConfigMapRefName = newAPIServerConfig.AuditConfig.AuditPolicy.ConfigMapRef.Name + } + + return oldConfigMapRefName == newConfigMapRefName +} + +// ShootDNSProviderSecretNamesEqual returns true when all the secretNames in the `.spec.dns.providers[]` list are the +// same. +func ShootDNSProviderSecretNamesEqual(oldDNS, newDNS *gardencorev1beta1.DNS) bool { + var ( + oldNames = sets.NewString() + newNames = sets.NewString() + ) + + if oldDNS != nil { + for _, provider := range oldDNS.Providers { + if provider.SecretName != nil { + oldNames.Insert(*provider.SecretName) + } + } + } + + if newDNS != nil { + for _, provider := range newDNS.Providers { + if provider.SecretName != nil { + newNames.Insert(*provider.SecretName) + } + } + } + + return oldNames.Equal(newNames) +} + +// ShootSecretResourceReferencesEqual returns true when at least one of the Secret resource references inside a Shoot +// has been changed. +func ShootSecretResourceReferencesEqual(oldResources, newResources []gardencorev1beta1.NamedResourceReference) bool { + var ( + oldNames = sets.NewString() + newNames = sets.NewString() + ) + + for _, resource := range oldResources { + if resource.ResourceRef.APIVersion == "v1" && resource.ResourceRef.Kind == "Secret" { + oldNames.Insert(resource.ResourceRef.Name) + } + } + + for _, resource := range newResources { + if resource.ResourceRef.APIVersion == "v1" && resource.ResourceRef.Kind == "Secret" { + newNames.Insert(resource.ResourceRef.Name) + } + } + + return oldNames.Equal(newNames) +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_common.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_common.go index 91228947..3c88d923 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_common.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_common.go @@ -21,19 +21,26 @@ type ErrorCode string const ( // ErrorInfraUnauthorized indicates that the last error occurred due to invalid infrastructure credentials. + // It is classified as a non-retryable error code. ErrorInfraUnauthorized ErrorCode = "ERR_INFRA_UNAUTHORIZED" // ErrorInfraInsufficientPrivileges indicates that the last error occurred due to insufficient infrastructure privileges. + // It is classified as a non-retryable error code. ErrorInfraInsufficientPrivileges ErrorCode = "ERR_INFRA_INSUFFICIENT_PRIVILEGES" // ErrorInfraQuotaExceeded indicates that the last error occurred due to infrastructure quota limits. + // It is classified as a non-retryable error code. ErrorInfraQuotaExceeded ErrorCode = "ERR_INFRA_QUOTA_EXCEEDED" // ErrorInfraDependencies indicates that the last error occurred due to dependent objects on the infrastructure level. + // It is classified as a non-retryable error code. ErrorInfraDependencies ErrorCode = "ERR_INFRA_DEPENDENCIES" // ErrorInfraResourcesDepleted indicates that the last error occurred due to depleted resource in the infrastructure. ErrorInfraResourcesDepleted ErrorCode = "ERR_INFRA_RESOURCES_DEPLETED" // ErrorCleanupClusterResources indicates that the last error occurred due to resources in the cluster that are stuck in deletion. ErrorCleanupClusterResources ErrorCode = "ERR_CLEANUP_CLUSTER_RESOURCES" // ErrorConfigurationProblem indicates that the last error occurred due to a configuration problem. + // It is classified as a non-retryable error code. ErrorConfigurationProblem ErrorCode = "ERR_CONFIGURATION_PROBLEM" + // ErrorRetryableConfigurationProblem indicates that the last error occurred due to a retryable configuration problem. + ErrorRetryableConfigurationProblem ErrorCode = "ERR_RETRYABLE_CONFIGURATION_PROBLEM" ) // LastError indicates the last occurred error for an operation on a resource. diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_project.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_project.go index 74a6e41a..3938c992 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_project.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_project.go @@ -167,6 +167,8 @@ const ( ProjectEventNamespaceReconcileFailed = "NamespaceReconcileFailed" // ProjectEventNamespaceReconcileSuccessful indicates that the namespace reconciliation has succeeded. ProjectEventNamespaceReconcileSuccessful = "NamespaceReconcileSuccessful" + // ProjectEventNamespaceNotEmpty indicates that the namespace cannot be released because it is not empty. + ProjectEventNamespaceNotEmpty = "NamespaceNotEmpty" // ProjectEventNamespaceDeletionFailed indicates that the namespace deletion failed. ProjectEventNamespaceDeletionFailed = "NamespaceDeletionFailed" // ProjectEventNamespaceMarkedForDeletion indicates that the namespace has been successfully marked for deletion. diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_seed.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_seed.go index fe4af0d3..be12b88c 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_seed.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_seed.go @@ -48,6 +48,16 @@ type SeedList struct { Items []Seed `json:"items" protobuf:"bytes,2,rep,name=items"` } +// SeedTemplate is a template for creating a Seed object. +type SeedTemplate struct { + // Standard object metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Specification of the desired behavior of the Seed. + // +optional + Spec SeedSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + // SeedSpec is the specification of a Seed. type SeedSpec struct { // Backup holds the object store configuration for the backups of shoot (currently only etcd). @@ -304,6 +314,8 @@ type SeedVolumeProvider struct { } const ( + // SeedBackupBucketsReady is a constant for a condition type indicating that associated BackupBuckets are ready. + SeedBackupBucketsReady ConditionType = "BackupBucketsReady" // SeedBootstrapped is a constant for a condition type indicating that the seed cluster has been // bootstrapped. SeedBootstrapped ConditionType = "Bootstrapped" diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_shoot.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_shoot.go index d849955c..444400e3 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_shoot.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_shoot.go @@ -54,6 +54,16 @@ type ShootList struct { Items []Shoot `json:"items" protobuf:"bytes,2,rep,name=items"` } +// ShootTemplate is a template for creating a Shoot object. +type ShootTemplate struct { + // Standard object metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Specification of the desired behavior of the Shoot. + // +optional + Spec ShootSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + // ShootSpec is the specification of a Shoot. type ShootSpec struct { // Addons contains information about enabled/disabled addons and their configuration. @@ -190,7 +200,7 @@ const ( // NginxIngress describes configuration values for the nginx-ingress addon. type NginxIngress struct { Addon `json:",inline" protobuf:"bytes,1,opt,name=addon"` - // LoadBalancerSourceRanges is list of whitelist IP sources for NginxIngress + // LoadBalancerSourceRanges is list of allowed IP sources for NginxIngress // +optional LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty" protobuf:"bytes,2,rep,name=loadBalancerSourceRanges"` // Config contains custom configuration for the nginx-ingress-controller configuration. @@ -1035,6 +1045,7 @@ type WorkerSystemComponents struct { // WorkerKubernetes contains configuration for Kubernetes components related to this worker pool. type WorkerKubernetes struct { // Kubelet contains configuration settings for all kubelets of this worker pool. + // If set, all `spec.kubernetes.kubelet` settings will be overwritten for this worker pool (no merge of settings). // +optional Kubelet *KubeletConfig `json:"kubelet,omitempty" protobuf:"bytes,1,opt,name=kubelet"` } diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.conversion.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.conversion.go index b987e3b2..19aeb217 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.conversion.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.conversion.go @@ -1161,6 +1161,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*SeedTemplate)(nil), (*core.SeedTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedTemplate_To_core_SeedTemplate(a.(*SeedTemplate), b.(*core.SeedTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.SeedTemplate)(nil), (*SeedTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_SeedTemplate_To_v1beta1_SeedTemplate(a.(*core.SeedTemplate), b.(*SeedTemplate), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*SeedVolume)(nil), (*core.SeedVolume)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_SeedVolume_To_core_SeedVolume(a.(*SeedVolume), b.(*core.SeedVolume), scope) }); err != nil { @@ -1251,6 +1261,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*ShootTemplate)(nil), (*core.ShootTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ShootTemplate_To_core_ShootTemplate(a.(*ShootTemplate), b.(*core.ShootTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ShootTemplate)(nil), (*ShootTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ShootTemplate_To_v1beta1_ShootTemplate(a.(*core.ShootTemplate), b.(*ShootTemplate), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*Toleration)(nil), (*core.Toleration)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_Toleration_To_core_Toleration(a.(*Toleration), b.(*core.Toleration), scope) }); err != nil { @@ -4345,6 +4365,32 @@ func Convert_core_SeedTaint_To_v1beta1_SeedTaint(in *core.SeedTaint, out *SeedTa return autoConvert_core_SeedTaint_To_v1beta1_SeedTaint(in, out, s) } +func autoConvert_v1beta1_SeedTemplate_To_core_SeedTemplate(in *SeedTemplate, out *core.SeedTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_SeedSpec_To_core_SeedSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_SeedTemplate_To_core_SeedTemplate is an autogenerated conversion function. +func Convert_v1beta1_SeedTemplate_To_core_SeedTemplate(in *SeedTemplate, out *core.SeedTemplate, s conversion.Scope) error { + return autoConvert_v1beta1_SeedTemplate_To_core_SeedTemplate(in, out, s) +} + +func autoConvert_core_SeedTemplate_To_v1beta1_SeedTemplate(in *core.SeedTemplate, out *SeedTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_core_SeedSpec_To_v1beta1_SeedSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_core_SeedTemplate_To_v1beta1_SeedTemplate is an autogenerated conversion function. +func Convert_core_SeedTemplate_To_v1beta1_SeedTemplate(in *core.SeedTemplate, out *SeedTemplate, s conversion.Scope) error { + return autoConvert_core_SeedTemplate_To_v1beta1_SeedTemplate(in, out, s) +} + func autoConvert_v1beta1_SeedVolume_To_core_SeedVolume(in *SeedVolume, out *core.SeedVolume, s conversion.Scope) error { out.MinimumSize = (*resource.Quantity)(unsafe.Pointer(in.MinimumSize)) out.Providers = *(*[]core.SeedVolumeProvider)(unsafe.Pointer(&in.Providers)) @@ -4645,6 +4691,32 @@ func Convert_core_ShootStatus_To_v1beta1_ShootStatus(in *core.ShootStatus, out * return autoConvert_core_ShootStatus_To_v1beta1_ShootStatus(in, out, s) } +func autoConvert_v1beta1_ShootTemplate_To_core_ShootTemplate(in *ShootTemplate, out *core.ShootTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_ShootSpec_To_core_ShootSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_ShootTemplate_To_core_ShootTemplate is an autogenerated conversion function. +func Convert_v1beta1_ShootTemplate_To_core_ShootTemplate(in *ShootTemplate, out *core.ShootTemplate, s conversion.Scope) error { + return autoConvert_v1beta1_ShootTemplate_To_core_ShootTemplate(in, out, s) +} + +func autoConvert_core_ShootTemplate_To_v1beta1_ShootTemplate(in *core.ShootTemplate, out *ShootTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_core_ShootSpec_To_v1beta1_ShootSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_core_ShootTemplate_To_v1beta1_ShootTemplate is an autogenerated conversion function. +func Convert_core_ShootTemplate_To_v1beta1_ShootTemplate(in *core.ShootTemplate, out *ShootTemplate, s conversion.Scope) error { + return autoConvert_core_ShootTemplate_To_v1beta1_ShootTemplate(in, out, s) +} + func autoConvert_v1beta1_Toleration_To_core_Toleration(in *Toleration, out *core.Toleration, s conversion.Scope) error { out.Key = in.Key out.Value = (*string)(unsafe.Pointer(in.Value)) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.deepcopy.go index 78aab253..69201037 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.deepcopy.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.deepcopy.go @@ -3343,6 +3343,24 @@ func (in *SeedTaint) DeepCopy() *SeedTaint { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedTemplate) DeepCopyInto(out *SeedTemplate) { + *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedTemplate. +func (in *SeedTemplate) DeepCopy() *SeedTemplate { + if in == nil { + return nil + } + out := new(SeedTemplate) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SeedVolume) DeepCopyInto(out *SeedVolume) { *out = *in @@ -3659,6 +3677,24 @@ func (in *ShootStatus) DeepCopy() *ShootStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ShootTemplate) DeepCopyInto(out *ShootTemplate) { + *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootTemplate. +func (in *ShootTemplate) DeepCopy() *ShootTemplate { + if in == nil { + return nil + } + out := new(ShootTemplate) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Toleration) DeepCopyInto(out *Toleration) { *out = *in diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/zz_generated.deepcopy.go b/vendor/github.com/gardener/gardener/pkg/apis/core/zz_generated.deepcopy.go index 8af2eec0..dba59657 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/zz_generated.deepcopy.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/zz_generated.deepcopy.go @@ -3414,6 +3414,24 @@ func (in *SeedTaint) DeepCopy() *SeedTaint { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedTemplate) DeepCopyInto(out *SeedTemplate) { + *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedTemplate. +func (in *SeedTemplate) DeepCopy() *SeedTemplate { + if in == nil { + return nil + } + out := new(SeedTemplate) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SeedVolume) DeepCopyInto(out *SeedVolume) { *out = *in @@ -3822,6 +3840,24 @@ func (in *ShootStatus) DeepCopy() *ShootStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ShootTemplate) DeepCopyInto(out *ShootTemplate) { + *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootTemplate. +func (in *ShootTemplate) DeepCopy() *ShootTemplate { + if in == nil { + return nil + } + out := new(ShootTemplate) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Toleration) DeepCopyInto(out *Toleration) { *out = *in diff --git a/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types.go b/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types.go index 009e8acc..54a89631 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types.go @@ -15,12 +15,12 @@ package v1alpha1 import ( - gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" - dnsv1alpha1 "github.com/gardener/external-dns-management/pkg/apis/dns/v1alpha1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" + "sigs.k8s.io/controller-runtime/pkg/client" + + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" ) // Status is the status of an Object. @@ -63,8 +63,7 @@ type Spec interface { // Object is an extension object resource. type Object interface { - metav1.Object - runtime.Object + client.Object // GetExtensionSpec retrieves the object's spec. GetExtensionSpec() Spec diff --git a/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_network.go b/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_network.go index 538632b9..f47bce11 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_network.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_network.go @@ -45,13 +45,13 @@ type Network struct { } // GetExtensionSpec implements Object. -func (i *Network) GetExtensionSpec() Spec { - return &i.Spec +func (n *Network) GetExtensionSpec() Spec { + return &n.Spec } // GetExtensionStatus implements Object. -func (i *Network) GetExtensionStatus() Status { - return &i.Status +func (n *Network) GetExtensionStatus() Status { + return &n.Status } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_operatingsystemconfig.go b/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_operatingsystemconfig.go index 866ac860..021a782e 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_operatingsystemconfig.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_operatingsystemconfig.go @@ -223,7 +223,9 @@ type CRIName string const ( // CRINameContainerD is a constant for ContainerD CRI name - CRINameContainerD = "containerd" + CRINameContainerD CRIName = "containerd" + // CRINameDocker is a constant for Docker CRI name + CRINameDocker CRIName = "docker" ) // ContainerDRuntimeContainersBinFolder is the folder where Container Runtime binaries should be saved for ContainerD usage diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/doc.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/doc.go new file mode 100644 index 00000000..7c323f91 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/doc.go @@ -0,0 +1,19 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// 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. + +// +k8s:deepcopy-gen=package + +// Package seedmanagement is the internal version of the API. +// +groupName=seedmanagement.gardener.cloud +package seedmanagement diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/field_constants.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/field_constants.go new file mode 100644 index 00000000..f9f7cff1 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/field_constants.go @@ -0,0 +1,23 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package seedmanagement + +// Field path constants that are specific to the internal API +// representation. +const ( + // ManagedSeedShootName is the field selector path for finding + // the Shoot of a seedmanagement.gardener.cloud/v1alpha1 ManagedSeed. + ManagedSeedShootName = "spec.shoot.name" +) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/helper/helper.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/helper/helper.go new file mode 100644 index 00000000..49708f0a --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/helper/helper.go @@ -0,0 +1,116 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package helper + +import ( + "bytes" + "fmt" + + "github.com/gardener/gardener/pkg/apis/core" + corev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "github.com/gardener/gardener/pkg/apis/seedmanagement" + "github.com/gardener/gardener/pkg/gardenlet/apis/config" + configv1alpha1 "github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/runtime/serializer/versioning" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var scheme *runtime.Scheme + +func init() { + scheme = runtime.NewScheme() + // core schemes are needed here to properly decode the embedded SeedTemplate objects + utilruntime.Must(core.AddToScheme(scheme)) + utilruntime.Must(corev1beta1.AddToScheme(scheme)) + utilruntime.Must(config.AddToScheme(scheme)) + utilruntime.Must(configv1alpha1.AddToScheme(scheme)) +} + +// DecodeGardenletConfiguration decodes the given raw extension into an external GardenletConfiguration version. +func DecodeGardenletConfiguration(rawConfig *runtime.RawExtension, withDefaults bool) (*configv1alpha1.GardenletConfiguration, error) { + if cfg, ok := rawConfig.Object.(*configv1alpha1.GardenletConfiguration); ok { + return cfg, nil + } + return DecodeGardenletConfigurationFromBytes(rawConfig.Raw, withDefaults) +} + +// DecodeGardenletConfigurationFromBytes decodes the given byte slice into an external GardenletConfiguration version. +func DecodeGardenletConfigurationFromBytes(bytes []byte, withDefaults bool) (*configv1alpha1.GardenletConfiguration, error) { + cfg := &configv1alpha1.GardenletConfiguration{ + TypeMeta: metav1.TypeMeta{ + APIVersion: configv1alpha1.SchemeGroupVersion.String(), + Kind: "GardenletConfiguration", + }, + } + if _, _, err := getDecoder(withDefaults).Decode(bytes, nil, cfg); err != nil { + return nil, err + } + return cfg, nil +} + +// EncodeGardenletConfiguration encodes the given external GardenletConfiguration version into a raw extension. +func EncodeGardenletConfiguration(cfg *configv1alpha1.GardenletConfiguration) (*runtime.RawExtension, error) { + raw, err := EncodeGardenletConfigurationToBytes(cfg) + if err != nil { + return nil, err + } + return &runtime.RawExtension{ + Raw: raw, + Object: cfg, + }, nil +} + +// EncodeGardenletConfigurationToBytes encodes the given external GardenletConfiguration version into a byte slice. +func EncodeGardenletConfigurationToBytes(cfg *configv1alpha1.GardenletConfiguration) ([]byte, error) { + encoder, err := getEncoder(configv1alpha1.SchemeGroupVersion, runtime.ContentTypeJSON) + if err != nil { + return nil, err + } + var b bytes.Buffer + if err := encoder.Encode(cfg, &b); err != nil { + return nil, err + } + return b.Bytes(), nil +} + +func getDecoder(withDefaulter bool) runtime.Decoder { + if withDefaulter { + return serializer.NewCodecFactory(scheme).UniversalDecoder() + } + return versioning.NewCodec(nil, serializer.NewCodecFactory(scheme).UniversalDeserializer(), runtime.UnsafeObjectConvertor(scheme), + scheme, scheme, nil, runtime.DisabledGroupVersioner, runtime.InternalGroupVersioner, scheme.Name()) + +} + +func getEncoder(gv runtime.GroupVersioner, mediaType string) (runtime.Encoder, error) { + codec := serializer.NewCodecFactory(scheme) + si, ok := runtime.SerializerInfoForMediaType(codec.SupportedMediaTypes(), mediaType) + if !ok { + return nil, fmt.Errorf("could not find encoder for media type %q", runtime.ContentTypeJSON) + } + return codec.EncoderForVersion(si.Serializer, gv), nil +} + +// GetBootstrap returns the value of the given Bootstrap, or None if nil. +func GetBootstrap(bootstrap *seedmanagement.Bootstrap) seedmanagement.Bootstrap { + if bootstrap != nil { + return *bootstrap + } + return seedmanagement.BootstrapNone +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/register.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/register.go new file mode 100644 index 00000000..ae284d1a --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/register.go @@ -0,0 +1,54 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package seedmanagement + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the name of the seedmanagement API group. +const GroupName = "seedmanagement.gardener.cloud" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + // SchemeBuilder is a new Scheme Builder which registers our API. + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + // AddToScheme is a reference to the Scheme Builder's AddToScheme function. + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &ManagedSeed{}, + &ManagedSeedList{}, + &ManagedSeedSet{}, + &ManagedSeedSetList{}, + ) + return nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/types_managedseed.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/types_managedseed.go new file mode 100644 index 00000000..211d83bf --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/types_managedseed.go @@ -0,0 +1,161 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package seedmanagement + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + + gardencore "github.com/gardener/gardener/pkg/apis/core" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ManagedSeed represents a Shoot that is registered as Seed. +type ManagedSeed struct { + metav1.TypeMeta + // Standard object metadata. + metav1.ObjectMeta + // Specification of the ManagedSeed. + Spec ManagedSeedSpec + // Most recently observed status of the ManagedSeed. + Status ManagedSeedStatus +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ManagedSeedList is a list of ManagedSeed objects. +type ManagedSeedList struct { + metav1.TypeMeta + // Standard list object metadata. + metav1.ListMeta + // Items is the list of ManagedSeeds. + Items []ManagedSeed +} + +// ManagedSeedTemplate is a template for creating a ManagedSeed object. +type ManagedSeedTemplate struct { + // Standard object metadata. + metav1.ObjectMeta + // Specification of the desired behavior of the ManagedSeed. + Spec ManagedSeedSpec +} + +// ManagedSeedSpec is the specification of a ManagedSeed. +type ManagedSeedSpec struct { + // Shoot references a Shoot that should be registered as Seed. + Shoot *Shoot + // SeedTemplate is a template for a Seed object, that should be used to register a given cluster as a Seed. + // Either SeedTemplate or Gardenlet must be specified. When Seed is specified, the ManagedSeed controller will not deploy a gardenlet into the cluster + // and an existing gardenlet reconciling the new Seed is required. + SeedTemplate *gardencore.SeedTemplate + // Gardenlet specifies that the ManagedSeed controller should deploy a gardenlet into the cluster + // with the given deployment parameters and GardenletConfiguration. + Gardenlet *Gardenlet +} + +// Shoot identifies the Shoot that should be registered as Seed. +type Shoot struct { + // Name is the name of the Shoot that will be registered as Seed. + Name string +} + +// Gardenlet specifies gardenlet deployment parameters and the GardenletConfiguration used to configure gardenlet. +type Gardenlet struct { + // Deployment specifies certain gardenlet deployment parameters, such as the number of replicas, + // the image, etc. + Deployment *GardenletDeployment + // Config is the GardenletConfiguration used to configure gardenlet. + Config runtime.Object + // Bootstrap is the mechanism that should be used for bootstrapping gardenlet connection to the Garden cluster. One of ServiceAccount, BootstrapToken, None. + // If set to ServiceAccount or BootstrapToken, a service account or a bootstrap token will be created in the garden cluster and used to compute the bootstrap kubeconfig. + // If set to None, the gardenClientConnection.kubeconfig field will be used to connect to the Garden cluster. Defaults to BootstrapToken. + Bootstrap *Bootstrap + // MergeWithParent specifies whether the GardenletConfiguration of the parent gardenlet + // should be merged with the specified GardenletConfiguration. Defaults to true. + MergeWithParent *bool +} + +// GardenletDeployment specifies certain gardenlet deployment parameters, such as the number of replicas, +// the image, etc. +type GardenletDeployment struct { + // ReplicaCount is the number of gardenlet replicas. Defaults to 1. + ReplicaCount *int32 + // RevisionHistoryLimit is the number of old gardenlet ReplicaSets to retain to allow rollback. Defaults to 1. + RevisionHistoryLimit *int32 + // ServiceAccountName is the name of the ServiceAccount to use to run gardenlet pods. + ServiceAccountName *string + // Image is the gardenlet container image. + Image *Image + // Resources are the compute resources required by the gardenlet container. + Resources *corev1.ResourceRequirements + // PodLabels are the labels on gardenlet pods. + PodLabels map[string]string + // PodAnnotations are the annotations on gardenlet pods. + PodAnnotations map[string]string + // AdditionalVolumes is the list of additional volumes that should be mounted by gardenlet containers. + AdditionalVolumes []corev1.Volume + // AdditionalVolumeMounts is the list of additional pod volumes to mount into the gardenlet container's filesystem. + AdditionalVolumeMounts []corev1.VolumeMount + // Env is the list of environment variables to set in the gardenlet container. + Env []corev1.EnvVar + // VPA specifies whether to enable VPA for gardenlet. Defaults to true. + VPA *bool +} + +// Image specifies container image parameters. +type Image struct { + // Repository is the image repository. + Repository *string + // Tag is the image tag. + Tag *string + // PullPolicy is the image pull policy. One of Always, Never, IfNotPresent. + // Defaults to Always if latest tag is specified, or IfNotPresent otherwise. + PullPolicy *corev1.PullPolicy +} + +// Bootstrap describes a mechanism for bootstrapping gardenlet connection to the Garden cluster. +type Bootstrap string + +const ( + // BootstrapServiceAccount means that a temporary service account should be used for bootstrapping gardenlet connection to the Garden cluster. + BootstrapServiceAccount Bootstrap = "ServiceAccount" + // BootstrapToken means that a bootstrap token should be used for bootstrapping gardenlet connection to the Garden cluster. + BootstrapToken Bootstrap = "BootstrapToken" + // BootstrapNone means that gardenlet connection to the Garden cluster should not be bootstrapped + // and the gardenClientConnection.kubeconfig field should be used to connect to the Garden cluster. + BootstrapNone Bootstrap = "None" +) + +// ManagedSeedStatus is the status of a ManagedSeed. +type ManagedSeedStatus struct { + // Conditions represents the latest available observations of a ManagedSeed's current state. + Conditions []gardencore.Condition + // ObservedGeneration is the most recent generation observed for this ManagedSeed. It corresponds to the + // ManagedSeed's generation, which is updated on mutation by the API Server. + ObservedGeneration int64 +} + +const ( + // ManagedSeedShootExists is a condition type for indicating whether the ManagedSeed's shoot exists. + ManagedSeedShootExists gardencore.ConditionType = "ShootExists" + // ManagedSeedShootReconciled is a condition type for indicating whether the ManagedSeed's shoot has been reconciled. + ManagedSeedShootReconciled gardencore.ConditionType = "ShootReconciled" + // ManagedSeedSeedRegistered is a condition type for indicating whether the ManagedSeed's seed has been registered, + // either directly or by deploying gardenlet into the shoot. + ManagedSeedSeedRegistered gardencore.ConditionType = "SeedRegistered" +) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/types_managedseedset.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/types_managedseedset.go new file mode 100644 index 00000000..de954c95 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/types_managedseedset.go @@ -0,0 +1,128 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package seedmanagement + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + gardencore "github.com/gardener/gardener/pkg/apis/core" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ManagedSeedSet represents a set of identical ManagedSeeds. +type ManagedSeedSet struct { + metav1.TypeMeta + // Standard object metadata. + metav1.ObjectMeta + // Spec defines the desired identities of ManagedSeeds and Shoots in this set. + Spec ManagedSeedSetSpec + // Status is the current status of ManagedSeeds and Shoots in this ManagedSeedSet. + Status ManagedSeedSetStatus +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ManagedSeedSetList is a list of ManagedSeed objects. +type ManagedSeedSetList struct { + metav1.TypeMeta + // Standard list object metadata. + metav1.ListMeta + // Items is the list of ManagedSeedSets. + Items []ManagedSeedSet +} + +// ManagedSeedSetSpec is the specification of a ManagedSeedSet. +type ManagedSeedSetSpec struct { + // Replicas is the desired number of replicas of the given Template. Defaults to 1. + Replicas *int32 + // Selector is a label query over ManagedSeeds and Shoots that should match the replica count. + // It must match the ManagedSeeds and Shoots template's labels. + Selector metav1.LabelSelector + // Template describes the ManagedSeed that will be created if insufficient replicas are detected. + // Each ManagedSeed created / updated by the ManagedSeedSet will fulfill this template. + Template ManagedSeedTemplate + // ShootTemplate describes the Shoot that will be created if insufficient replicas are detected for hosting the corresponding ManagedSeed. + // Each Shoot created / updated by the ManagedSeedSet will fulfill this template. + ShootTemplate gardencore.ShootTemplate + // UpdateStrategy specifies the UpdateStrategy that will be + // employed to update ManagedSeeds / Shoots in the ManagedSeedSet when a revision is made to + // Template / ShootTemplate. + UpdateStrategy *UpdateStrategy + // RevisionHistoryLimit is the maximum number of revisions that will + // be maintained in the ManagedSeedSet's revision history. Defaults to 10. + RevisionHistoryLimit *int32 +} + +// UpdateStrategy specifies the strategy that the ManagedSeedSet +// controller will use to perform updates. It includes any additional parameters +// necessary to perform the update for the indicated strategy. +type UpdateStrategy struct { + // Type indicates the type of the UpdateStrategy. Defaults to RollingUpdate. + Type *UpdateStrategyType + // RollingUpdate is used to communicate parameters when Type is RollingUpdateStrategyType. + RollingUpdate *RollingUpdateStrategy +} + +// UpdateStrategyType is a string enumeration type that enumerates +// all possible update strategies for the ManagedSeedSet controller. +type UpdateStrategyType string + +const ( + // RollingUpdateStrategyType indicates that update will be + // applied to all ManagedSeeds / Shoots in the ManagedSeedSet with respect to the ManagedSeedSet + // ordering constraints. + RollingUpdateStrategyType UpdateStrategyType = "RollingUpdate" +) + +// RollingUpdateStrategy is used to communicate parameter for RollingUpdateStrategyType. +type RollingUpdateStrategy struct { + // Partition indicates the ordinal at which the ManagedSeedSet should be partitioned. Defaults to 0. + Partition *int32 +} + +// ManagedSeedSetStatus represents the current state of a ManagedSeedSet. +type ManagedSeedSetStatus struct { + // ObservedGeneration is the most recent generation observed for this ManagedSeedSet. It corresponds to the + // ManagedSeedSet's generation, which is updated on mutation by the API Server. + ObservedGeneration int64 + // Replicas is the number of replicas (ManagedSeeds and their corresponding Shoots) created by the ManagedSeedSet controller. + Replicas int32 + // ReadyReplicas is the number of ManagedSeeds created by the ManagedSeedSet controller that have a Ready Condition. + ReadyReplicas int32 + // NextReplicaNumber is the ordinal number that will be assigned to the next replica of the ManagedSeedSet. + NextReplicaNumber int32 + // CurrentReplicas is the number of ManagedSeeds created by the ManagedSeedSet controller from the ManagedSeedSet version + // indicated by CurrentRevision. + CurrentReplicas int32 + // UpdatedReplicas is the number of ManagedSeeds created by the ManagedSeedSet controller from the ManagedSeedSet version + // indicated by UpdateRevision. + UpdatedReplicas int32 + // CurrentRevision, if not empty, indicates the version of the ManagedSeedSet used to generate ManagedSeeds with smaller + // ordinal numbers during updates. + CurrentRevision string + // UpdateRevision, if not empty, indicates the version of the ManagedSeedSet used to generate ManagedSeeds with larger + // ordinal numbers during updates + UpdateRevision string + // CollisionCount is the count of hash collisions for the ManagedSeedSet. The ManagedSeedSet controller + // uses this field as a collision avoidance mechanism when it needs to create the name for the + // newest ControllerRevision. + CollisionCount *int32 + // Conditions represents the latest available observations of a ManagedSeedSet's current state. + Conditions []gardencore.Condition +} + +// TODO Condition constants diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/conversions.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/conversions.go new file mode 100644 index 00000000..4882dae8 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/conversions.go @@ -0,0 +1,91 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + "fmt" + + gardencore "github.com/gardener/gardener/pkg/apis/core" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "github.com/gardener/gardener/pkg/apis/seedmanagement" + "github.com/gardener/gardener/pkg/apis/seedmanagement/helper" + configv1alpha1 "github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1" + + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" +) + +func addConversionFuncs(scheme *runtime.Scheme) error { + if err := scheme.AddFieldLabelConversionFunc( + SchemeGroupVersion.WithKind("ManagedSeed"), + func(label, value string) (string, string, error) { + switch label { + case "metadata.name", "metadata.namespace", seedmanagement.ManagedSeedShootName: + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }, + ); err != nil { + return err + } + + return nil +} + +func Convert_v1alpha1_Gardenlet_To_seedmanagement_Gardenlet(in *Gardenlet, out *seedmanagement.Gardenlet, s conversion.Scope) error { + if in.Config.Object == nil { + cfg, err := helper.DecodeGardenletConfigurationFromBytes(in.Config.Raw, false) + if err != nil { + return err + } + in.Config.Object = cfg + } + return autoConvert_v1alpha1_Gardenlet_To_seedmanagement_Gardenlet(in, out, s) +} + +func Convert_seedmanagement_Gardenlet_To_v1alpha1_Gardenlet(in *seedmanagement.Gardenlet, out *Gardenlet, s conversion.Scope) error { + if err := autoConvert_seedmanagement_Gardenlet_To_v1alpha1_Gardenlet(in, out, s); err != nil { + return err + } + if out.Config.Raw == nil { + cfg, ok := out.Config.Object.(*configv1alpha1.GardenletConfiguration) + if !ok { + return fmt.Errorf("unknown gardenlet config object type") + } + raw, err := helper.EncodeGardenletConfigurationToBytes(cfg) + if err != nil { + return err + } + out.Config.Raw = raw + } + return nil +} + +func Convert_v1beta1_SeedTemplate_To_core_SeedTemplate(in *gardencorev1beta1.SeedTemplate, out *gardencore.SeedTemplate, s conversion.Scope) error { + return gardencorev1beta1.Convert_v1beta1_SeedTemplate_To_core_SeedTemplate(in, out, s) +} + +func Convert_core_SeedTemplate_To_v1beta1_SeedTemplate(in *gardencore.SeedTemplate, out *gardencorev1beta1.SeedTemplate, s conversion.Scope) error { + return gardencorev1beta1.Convert_core_SeedTemplate_To_v1beta1_SeedTemplate(in, out, s) +} + +func Convert_v1beta1_ShootTemplate_To_core_ShootTemplate(in *gardencorev1beta1.ShootTemplate, out *gardencore.ShootTemplate, s conversion.Scope) error { + return gardencorev1beta1.Convert_v1beta1_ShootTemplate_To_core_ShootTemplate(in, out, s) +} + +func Convert_core_ShootTemplate_To_v1beta1_ShootTemplate(in *gardencore.ShootTemplate, out *gardencorev1beta1.ShootTemplate, s conversion.Scope) error { + return gardencorev1beta1.Convert_core_ShootTemplate_To_v1beta1_ShootTemplate(in, out, s) +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/defaults_managedseed.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/defaults_managedseed.go new file mode 100644 index 00000000..062f3658 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/defaults_managedseed.go @@ -0,0 +1,147 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + "fmt" + + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "github.com/gardener/gardener/pkg/apis/seedmanagement/helper" + configv1alpha1 "github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/utils/pointer" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return RegisterDefaults(scheme) +} + +// SetDefaults_ManagedSeed sets default values for ManagedSeed objects. +func SetDefaults_ManagedSeed(obj *ManagedSeed) { + switch { + case obj.Spec.SeedTemplate != nil: + setDefaultsSeedSpec(&obj.Spec.SeedTemplate.Spec, obj.Name, obj.Namespace, true) + case obj.Spec.Gardenlet != nil: + setDefaultsGardenlet(obj.Spec.Gardenlet, obj.Name, obj.Namespace) + } +} + +// SetDefaults_GardenletDeployment sets default values for GardenletDeployment objects. +func SetDefaults_GardenletDeployment(obj *GardenletDeployment) { + // Set default replica count + if obj.ReplicaCount == nil { + obj.ReplicaCount = pointer.Int32Ptr(1) + } + + // Set default revision history limit + if obj.RevisionHistoryLimit == nil { + obj.RevisionHistoryLimit = pointer.Int32Ptr(1) + } + + // Set default image + if obj.Image == nil { + obj.Image = &Image{} + } + + // Set default VPA + if obj.VPA == nil { + obj.VPA = pointer.BoolPtr(true) + } +} + +// SetDefaults_Image sets default values for Image objects. +func SetDefaults_Image(obj *Image) { + // Set default pull policy + if obj.PullPolicy == nil { + var pullPolicy corev1.PullPolicy + if obj.Tag != nil && *obj.Tag == "latest" { + pullPolicy = corev1.PullAlways + } else { + pullPolicy = corev1.PullIfNotPresent + } + obj.PullPolicy = &pullPolicy + } +} + +func setDefaultsGardenlet(obj *Gardenlet, name, namespace string) { + // Set deployment defaults + if obj.Deployment == nil { + obj.Deployment = &GardenletDeployment{} + } + + // Decode gardenlet config to an external version + // Without defaults, since we don't want to set gardenlet config defaults in the resource at this point + gardenletConfig, err := helper.DecodeGardenletConfiguration(&obj.Config, false) + if err != nil { + return + } + + // If the gardenlet config was decoded without errors to nil, + // initialize it with an empty config + if gardenletConfig == nil { + gardenletConfig = &configv1alpha1.GardenletConfiguration{ + TypeMeta: metav1.TypeMeta{ + APIVersion: configv1alpha1.SchemeGroupVersion.String(), + Kind: "GardenletConfiguration", + }, + } + } + + // Set gardenlet config defaults + setDefaultsGardenletConfiguration(gardenletConfig, name, namespace) + + // Set gardenlet config back to obj.Config + // Encoding back to bytes is not needed, it will be done by the custom conversion code + obj.Config = runtime.RawExtension{Object: gardenletConfig} + + // Set default garden connection bootstrap + if obj.Bootstrap == nil { + gardenConnectionBootstrap := BootstrapToken + obj.Bootstrap = &gardenConnectionBootstrap + } + + // Set default merge with parent + if obj.MergeWithParent == nil { + obj.MergeWithParent = pointer.BoolPtr(true) + } +} + +func setDefaultsGardenletConfiguration(obj *configv1alpha1.GardenletConfiguration, name, namespace string) { + // Initialize seed config + if obj.SeedConfig == nil { + obj.SeedConfig = &configv1alpha1.SeedConfig{} + } + + // Set seed spec defaults + setDefaultsSeedSpec(&obj.SeedConfig.SeedTemplate.Spec, name, namespace, false) +} + +func setDefaultsSeedSpec(spec *gardencorev1beta1.SeedSpec, name, namespace string, withSecretRef bool) { + if spec.SecretRef == nil && withSecretRef { + spec.SecretRef = &corev1.SecretReference{ + Name: fmt.Sprintf("seed-%s", name), + Namespace: namespace, + } + } + if spec.Backup != nil && spec.Backup.SecretRef == (corev1.SecretReference{}) { + spec.Backup.SecretRef = corev1.SecretReference{ + Name: fmt.Sprintf("backup-%s", name), + Namespace: namespace, + } + } +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/defaults_managedseedset.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/defaults_managedseedset.go new file mode 100644 index 00000000..53c329b6 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/defaults_managedseedset.go @@ -0,0 +1,54 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + "k8s.io/utils/pointer" +) + +// SetDefaults_ManagedSeedSet sets default values for ManagedSeed objects. +func SetDefaults_ManagedSeedSet(obj *ManagedSeedSet) { + // Set default replicas + if obj.Spec.Replicas == nil { + obj.Spec.Replicas = pointer.Int32Ptr(1) + } + + // Set update strategy defaults + if obj.Spec.UpdateStrategy == nil { + obj.Spec.UpdateStrategy = &UpdateStrategy{} + } + + // Set default revision history limit + if obj.Spec.RevisionHistoryLimit == nil { + obj.Spec.RevisionHistoryLimit = pointer.Int32Ptr(10) + } +} + +// SetDefaults_UpdateStrategy sets default values for UpdateStrategy objects. +func SetDefaults_UpdateStrategy(obj *UpdateStrategy) { + // Set default type + if obj.Type == nil { + t := RollingUpdateStrategyType + obj.Type = &t + } +} + +// SetDefaults_RollingUpdateStrategy sets default values for RollingUpdateStrategy objects. +func SetDefaults_RollingUpdateStrategy(obj *RollingUpdateStrategy) { + // Set default partition + if obj.Partition == nil { + obj.Partition = pointer.Int32Ptr(0) + } +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/doc.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/doc.go new file mode 100644 index 00000000..d5b1cb98 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/doc.go @@ -0,0 +1,26 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package v1alpha1 is the v1alpha1 version of the API. +// +k8s:deepcopy-gen=package,register +// +k8s:conversion-gen=github.com/gardener/gardener/pkg/apis/seedmanagement +// +k8s:openapi-gen=true +// +k8s:defaulter-gen=TypeMeta +// +k8s:protobuf-gen=package + +//go:generate gen-crd-api-reference-docs -api-dir . -config ../../../../hack/api-reference/seedmanagement-config.json -template-dir ../../../../hack/api-reference/template -out-file ../../../../hack/api-reference/seedmanagement.md + +// Package v1alpha1 is a version of the API. +// +groupName=seedmanagement.gardener.cloud +package v1alpha1 diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/generated.pb.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/generated.pb.go new file mode 100644 index 00000000..39118f80 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/generated.pb.go @@ -0,0 +1,4750 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/generated.proto + +package v1alpha1 + +import ( + fmt "fmt" + + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + + io "io" + + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" + + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +func (m *Gardenlet) Reset() { *m = Gardenlet{} } +func (*Gardenlet) ProtoMessage() {} +func (*Gardenlet) Descriptor() ([]byte, []int) { + return fileDescriptor_d64c05a219673fe5, []int{0} +} +func (m *Gardenlet) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Gardenlet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Gardenlet) XXX_Merge(src proto.Message) { + xxx_messageInfo_Gardenlet.Merge(m, src) +} +func (m *Gardenlet) XXX_Size() int { + return m.Size() +} +func (m *Gardenlet) XXX_DiscardUnknown() { + xxx_messageInfo_Gardenlet.DiscardUnknown(m) +} + +var xxx_messageInfo_Gardenlet proto.InternalMessageInfo + +func (m *GardenletDeployment) Reset() { *m = GardenletDeployment{} } +func (*GardenletDeployment) ProtoMessage() {} +func (*GardenletDeployment) Descriptor() ([]byte, []int) { + return fileDescriptor_d64c05a219673fe5, []int{1} +} +func (m *GardenletDeployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GardenletDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *GardenletDeployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_GardenletDeployment.Merge(m, src) +} +func (m *GardenletDeployment) XXX_Size() int { + return m.Size() +} +func (m *GardenletDeployment) XXX_DiscardUnknown() { + xxx_messageInfo_GardenletDeployment.DiscardUnknown(m) +} + +var xxx_messageInfo_GardenletDeployment proto.InternalMessageInfo + +func (m *Image) Reset() { *m = Image{} } +func (*Image) ProtoMessage() {} +func (*Image) Descriptor() ([]byte, []int) { + return fileDescriptor_d64c05a219673fe5, []int{2} +} +func (m *Image) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Image) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Image) XXX_Merge(src proto.Message) { + xxx_messageInfo_Image.Merge(m, src) +} +func (m *Image) XXX_Size() int { + return m.Size() +} +func (m *Image) XXX_DiscardUnknown() { + xxx_messageInfo_Image.DiscardUnknown(m) +} + +var xxx_messageInfo_Image proto.InternalMessageInfo + +func (m *ManagedSeed) Reset() { *m = ManagedSeed{} } +func (*ManagedSeed) ProtoMessage() {} +func (*ManagedSeed) Descriptor() ([]byte, []int) { + return fileDescriptor_d64c05a219673fe5, []int{3} +} +func (m *ManagedSeed) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ManagedSeed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ManagedSeed) XXX_Merge(src proto.Message) { + xxx_messageInfo_ManagedSeed.Merge(m, src) +} +func (m *ManagedSeed) XXX_Size() int { + return m.Size() +} +func (m *ManagedSeed) XXX_DiscardUnknown() { + xxx_messageInfo_ManagedSeed.DiscardUnknown(m) +} + +var xxx_messageInfo_ManagedSeed proto.InternalMessageInfo + +func (m *ManagedSeedList) Reset() { *m = ManagedSeedList{} } +func (*ManagedSeedList) ProtoMessage() {} +func (*ManagedSeedList) Descriptor() ([]byte, []int) { + return fileDescriptor_d64c05a219673fe5, []int{4} +} +func (m *ManagedSeedList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ManagedSeedList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ManagedSeedList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ManagedSeedList.Merge(m, src) +} +func (m *ManagedSeedList) XXX_Size() int { + return m.Size() +} +func (m *ManagedSeedList) XXX_DiscardUnknown() { + xxx_messageInfo_ManagedSeedList.DiscardUnknown(m) +} + +var xxx_messageInfo_ManagedSeedList proto.InternalMessageInfo + +func (m *ManagedSeedSet) Reset() { *m = ManagedSeedSet{} } +func (*ManagedSeedSet) ProtoMessage() {} +func (*ManagedSeedSet) Descriptor() ([]byte, []int) { + return fileDescriptor_d64c05a219673fe5, []int{5} +} +func (m *ManagedSeedSet) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ManagedSeedSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ManagedSeedSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_ManagedSeedSet.Merge(m, src) +} +func (m *ManagedSeedSet) XXX_Size() int { + return m.Size() +} +func (m *ManagedSeedSet) XXX_DiscardUnknown() { + xxx_messageInfo_ManagedSeedSet.DiscardUnknown(m) +} + +var xxx_messageInfo_ManagedSeedSet proto.InternalMessageInfo + +func (m *ManagedSeedSetList) Reset() { *m = ManagedSeedSetList{} } +func (*ManagedSeedSetList) ProtoMessage() {} +func (*ManagedSeedSetList) Descriptor() ([]byte, []int) { + return fileDescriptor_d64c05a219673fe5, []int{6} +} +func (m *ManagedSeedSetList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ManagedSeedSetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ManagedSeedSetList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ManagedSeedSetList.Merge(m, src) +} +func (m *ManagedSeedSetList) XXX_Size() int { + return m.Size() +} +func (m *ManagedSeedSetList) XXX_DiscardUnknown() { + xxx_messageInfo_ManagedSeedSetList.DiscardUnknown(m) +} + +var xxx_messageInfo_ManagedSeedSetList proto.InternalMessageInfo + +func (m *ManagedSeedSetSpec) Reset() { *m = ManagedSeedSetSpec{} } +func (*ManagedSeedSetSpec) ProtoMessage() {} +func (*ManagedSeedSetSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_d64c05a219673fe5, []int{7} +} +func (m *ManagedSeedSetSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ManagedSeedSetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ManagedSeedSetSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_ManagedSeedSetSpec.Merge(m, src) +} +func (m *ManagedSeedSetSpec) XXX_Size() int { + return m.Size() +} +func (m *ManagedSeedSetSpec) XXX_DiscardUnknown() { + xxx_messageInfo_ManagedSeedSetSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_ManagedSeedSetSpec proto.InternalMessageInfo + +func (m *ManagedSeedSetStatus) Reset() { *m = ManagedSeedSetStatus{} } +func (*ManagedSeedSetStatus) ProtoMessage() {} +func (*ManagedSeedSetStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_d64c05a219673fe5, []int{8} +} +func (m *ManagedSeedSetStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ManagedSeedSetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ManagedSeedSetStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_ManagedSeedSetStatus.Merge(m, src) +} +func (m *ManagedSeedSetStatus) XXX_Size() int { + return m.Size() +} +func (m *ManagedSeedSetStatus) XXX_DiscardUnknown() { + xxx_messageInfo_ManagedSeedSetStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_ManagedSeedSetStatus proto.InternalMessageInfo + +func (m *ManagedSeedSpec) Reset() { *m = ManagedSeedSpec{} } +func (*ManagedSeedSpec) ProtoMessage() {} +func (*ManagedSeedSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_d64c05a219673fe5, []int{9} +} +func (m *ManagedSeedSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ManagedSeedSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ManagedSeedSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_ManagedSeedSpec.Merge(m, src) +} +func (m *ManagedSeedSpec) XXX_Size() int { + return m.Size() +} +func (m *ManagedSeedSpec) XXX_DiscardUnknown() { + xxx_messageInfo_ManagedSeedSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_ManagedSeedSpec proto.InternalMessageInfo + +func (m *ManagedSeedStatus) Reset() { *m = ManagedSeedStatus{} } +func (*ManagedSeedStatus) ProtoMessage() {} +func (*ManagedSeedStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_d64c05a219673fe5, []int{10} +} +func (m *ManagedSeedStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ManagedSeedStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ManagedSeedStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_ManagedSeedStatus.Merge(m, src) +} +func (m *ManagedSeedStatus) XXX_Size() int { + return m.Size() +} +func (m *ManagedSeedStatus) XXX_DiscardUnknown() { + xxx_messageInfo_ManagedSeedStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_ManagedSeedStatus proto.InternalMessageInfo + +func (m *ManagedSeedTemplate) Reset() { *m = ManagedSeedTemplate{} } +func (*ManagedSeedTemplate) ProtoMessage() {} +func (*ManagedSeedTemplate) Descriptor() ([]byte, []int) { + return fileDescriptor_d64c05a219673fe5, []int{11} +} +func (m *ManagedSeedTemplate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ManagedSeedTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ManagedSeedTemplate) XXX_Merge(src proto.Message) { + xxx_messageInfo_ManagedSeedTemplate.Merge(m, src) +} +func (m *ManagedSeedTemplate) XXX_Size() int { + return m.Size() +} +func (m *ManagedSeedTemplate) XXX_DiscardUnknown() { + xxx_messageInfo_ManagedSeedTemplate.DiscardUnknown(m) +} + +var xxx_messageInfo_ManagedSeedTemplate proto.InternalMessageInfo + +func (m *RollingUpdateStrategy) Reset() { *m = RollingUpdateStrategy{} } +func (*RollingUpdateStrategy) ProtoMessage() {} +func (*RollingUpdateStrategy) Descriptor() ([]byte, []int) { + return fileDescriptor_d64c05a219673fe5, []int{12} +} +func (m *RollingUpdateStrategy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RollingUpdateStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *RollingUpdateStrategy) XXX_Merge(src proto.Message) { + xxx_messageInfo_RollingUpdateStrategy.Merge(m, src) +} +func (m *RollingUpdateStrategy) XXX_Size() int { + return m.Size() +} +func (m *RollingUpdateStrategy) XXX_DiscardUnknown() { + xxx_messageInfo_RollingUpdateStrategy.DiscardUnknown(m) +} + +var xxx_messageInfo_RollingUpdateStrategy proto.InternalMessageInfo + +func (m *Shoot) Reset() { *m = Shoot{} } +func (*Shoot) ProtoMessage() {} +func (*Shoot) Descriptor() ([]byte, []int) { + return fileDescriptor_d64c05a219673fe5, []int{13} +} +func (m *Shoot) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Shoot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Shoot) XXX_Merge(src proto.Message) { + xxx_messageInfo_Shoot.Merge(m, src) +} +func (m *Shoot) XXX_Size() int { + return m.Size() +} +func (m *Shoot) XXX_DiscardUnknown() { + xxx_messageInfo_Shoot.DiscardUnknown(m) +} + +var xxx_messageInfo_Shoot proto.InternalMessageInfo + +func (m *UpdateStrategy) Reset() { *m = UpdateStrategy{} } +func (*UpdateStrategy) ProtoMessage() {} +func (*UpdateStrategy) Descriptor() ([]byte, []int) { + return fileDescriptor_d64c05a219673fe5, []int{14} +} +func (m *UpdateStrategy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *UpdateStrategy) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateStrategy.Merge(m, src) +} +func (m *UpdateStrategy) XXX_Size() int { + return m.Size() +} +func (m *UpdateStrategy) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateStrategy.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateStrategy proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Gardenlet)(nil), "github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1.Gardenlet") + proto.RegisterType((*GardenletDeployment)(nil), "github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1.GardenletDeployment") + proto.RegisterMapType((map[string]string)(nil), "github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1.GardenletDeployment.PodAnnotationsEntry") + proto.RegisterMapType((map[string]string)(nil), "github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1.GardenletDeployment.PodLabelsEntry") + proto.RegisterType((*Image)(nil), "github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1.Image") + proto.RegisterType((*ManagedSeed)(nil), "github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1.ManagedSeed") + proto.RegisterType((*ManagedSeedList)(nil), "github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1.ManagedSeedList") + proto.RegisterType((*ManagedSeedSet)(nil), "github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1.ManagedSeedSet") + proto.RegisterType((*ManagedSeedSetList)(nil), "github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1.ManagedSeedSetList") + proto.RegisterType((*ManagedSeedSetSpec)(nil), "github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1.ManagedSeedSetSpec") + proto.RegisterType((*ManagedSeedSetStatus)(nil), "github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1.ManagedSeedSetStatus") + proto.RegisterType((*ManagedSeedSpec)(nil), "github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1.ManagedSeedSpec") + proto.RegisterType((*ManagedSeedStatus)(nil), "github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1.ManagedSeedStatus") + proto.RegisterType((*ManagedSeedTemplate)(nil), "github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1.ManagedSeedTemplate") + proto.RegisterType((*RollingUpdateStrategy)(nil), "github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1.RollingUpdateStrategy") + proto.RegisterType((*Shoot)(nil), "github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1.Shoot") + proto.RegisterType((*UpdateStrategy)(nil), "github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1.UpdateStrategy") +} + +func init() { + proto.RegisterFile("github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/generated.proto", fileDescriptor_d64c05a219673fe5) +} + +var fileDescriptor_d64c05a219673fe5 = []byte{ + // 1650 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xcd, 0x6f, 0x1b, 0xc7, + 0x15, 0xd7, 0x52, 0xa2, 0xcc, 0x7d, 0x92, 0x28, 0x6b, 0x24, 0xab, 0xb4, 0x80, 0x92, 0x02, 0x4f, + 0x2a, 0x5a, 0x2f, 0x2b, 0xd5, 0x28, 0x5c, 0xb7, 0x2e, 0xca, 0x95, 0x55, 0x7f, 0x40, 0x92, 0xd5, + 0x91, 0xe4, 0x02, 0x45, 0x0f, 0x1d, 0x2e, 0xc7, 0xd4, 0x56, 0xdc, 0x0f, 0xef, 0x0e, 0x69, 0x13, + 0x01, 0x02, 0x23, 0xb7, 0x1c, 0x02, 0x04, 0xfe, 0x17, 0x02, 0xe4, 0x6f, 0xf1, 0x29, 0x30, 0x82, + 0x1c, 0x0c, 0x04, 0x20, 0x6c, 0x26, 0x48, 0x90, 0x7f, 0xc1, 0x87, 0x20, 0x98, 0xd9, 0xd9, 0x4f, + 0x92, 0x89, 0x22, 0x31, 0x3e, 0xe4, 0xb6, 0xf3, 0x3e, 0x7e, 0xef, 0xcd, 0x9b, 0x37, 0x6f, 0xde, + 0x5b, 0xd8, 0x6b, 0x99, 0xec, 0xa4, 0xd3, 0xd0, 0x0c, 0xc7, 0xaa, 0xb5, 0x88, 0xd7, 0xa4, 0x36, + 0xf5, 0xe2, 0x0f, 0xf7, 0xb4, 0x55, 0x23, 0xae, 0xe9, 0xd7, 0x7c, 0x4a, 0x9b, 0x16, 0xb1, 0x49, + 0x8b, 0x5a, 0xd4, 0x66, 0xb5, 0xee, 0x26, 0x69, 0xbb, 0x27, 0x64, 0xb3, 0xd6, 0xe2, 0x62, 0x84, + 0xd1, 0xa6, 0xe6, 0x7a, 0x0e, 0x73, 0xd0, 0xad, 0x18, 0x4e, 0x0b, 0x51, 0xe2, 0x0f, 0xf7, 0xb4, + 0xa5, 0x71, 0x38, 0x2d, 0x0d, 0xa7, 0x85, 0x70, 0x6b, 0xfa, 0xd9, 0xbc, 0x31, 0x1c, 0x8f, 0xd6, + 0xba, 0x9b, 0x0d, 0xca, 0x86, 0x5d, 0x58, 0xbb, 0x96, 0xc4, 0x70, 0x5a, 0x4e, 0x4d, 0x90, 0x1b, + 0x9d, 0x47, 0x62, 0x25, 0x16, 0xe2, 0x4b, 0x8a, 0x57, 0x4f, 0x6f, 0xf8, 0x9a, 0xe9, 0x70, 0xe0, + 0x10, 0x77, 0x08, 0xf2, 0x7a, 0x2c, 0x63, 0x11, 0xe3, 0xc4, 0xb4, 0xa9, 0xd7, 0x8b, 0xbd, 0xb1, + 0x28, 0x23, 0xa3, 0xb4, 0x6a, 0xe3, 0xb4, 0xbc, 0x8e, 0xcd, 0x4c, 0x8b, 0x0e, 0x29, 0xfc, 0xf9, + 0xa7, 0x14, 0x7c, 0xe3, 0x84, 0x5a, 0x24, 0xab, 0x57, 0x7d, 0x9d, 0x03, 0xf5, 0x8e, 0x08, 0x52, + 0x9b, 0x32, 0xf4, 0x81, 0x02, 0xd0, 0xa4, 0x6e, 0xdb, 0xe9, 0xf1, 0xd8, 0x96, 0x94, 0x75, 0x65, + 0x63, 0x6e, 0x0b, 0x6b, 0x17, 0x3a, 0x18, 0x2d, 0x82, 0xbf, 0x1d, 0x21, 0xeb, 0xc5, 0x41, 0xbf, + 0x02, 0xf1, 0x1a, 0x27, 0xac, 0xa2, 0x63, 0x98, 0x35, 0x1c, 0xfb, 0x91, 0xd9, 0x2a, 0xe5, 0x84, + 0xfd, 0x6b, 0x5a, 0xb0, 0x37, 0x2d, 0xb9, 0x37, 0x61, 0x56, 0xee, 0x4d, 0xc3, 0xe4, 0xc9, 0xce, + 0x53, 0x46, 0x6d, 0xdf, 0x74, 0x6c, 0xbd, 0xf8, 0xa2, 0x5f, 0x99, 0x1a, 0xf4, 0x2b, 0xb3, 0xdb, + 0x02, 0x04, 0x4b, 0x30, 0x74, 0x03, 0xd4, 0x86, 0xe3, 0x30, 0x9f, 0x79, 0xc4, 0x2d, 0x4d, 0xaf, + 0x2b, 0x1b, 0xaa, 0xbe, 0x36, 0xe8, 0x57, 0x54, 0x3d, 0x24, 0xbe, 0x4d, 0x2e, 0x70, 0x2c, 0x8c, + 0x6e, 0xc1, 0xa2, 0x45, 0xbd, 0x16, 0xfd, 0xb7, 0xc9, 0x4e, 0x0e, 0x88, 0xc7, 0x23, 0x33, 0xb3, + 0xae, 0x6c, 0x14, 0xf4, 0xe5, 0x41, 0xbf, 0xb2, 0xb8, 0x97, 0x66, 0xe1, 0xac, 0x6c, 0xf5, 0xb9, + 0x0a, 0xcb, 0x23, 0x62, 0x80, 0xae, 0xc3, 0xbc, 0x47, 0xdd, 0xb6, 0x69, 0x90, 0x6d, 0xa7, 0x23, + 0xa3, 0x9d, 0xd7, 0x2f, 0x0f, 0xfa, 0x95, 0x79, 0x9c, 0xa0, 0xe3, 0x94, 0x14, 0xda, 0x85, 0x15, + 0x8f, 0x76, 0x4d, 0xbe, 0xd5, 0xbb, 0xa6, 0xcf, 0x1c, 0xaf, 0xb7, 0x6b, 0x5a, 0x26, 0x13, 0xb1, + 0xca, 0xeb, 0xa5, 0x41, 0xbf, 0xb2, 0x82, 0x47, 0xf0, 0xf1, 0x48, 0x2d, 0xf4, 0x4f, 0x40, 0x3e, + 0xf5, 0xba, 0xa6, 0x41, 0xeb, 0x86, 0xc1, 0xf1, 0xf7, 0x89, 0x45, 0x65, 0x74, 0x56, 0x07, 0xfd, + 0x0a, 0x3a, 0x1c, 0xe2, 0xe2, 0x11, 0x1a, 0x88, 0x42, 0xde, 0xb4, 0x48, 0x8b, 0x8a, 0xc0, 0xcc, + 0x6d, 0xdd, 0xbe, 0x60, 0xca, 0xdc, 0xe3, 0x58, 0xba, 0x3a, 0xe8, 0x57, 0xf2, 0xe2, 0x13, 0x07, + 0xe8, 0xe8, 0x18, 0x54, 0x8f, 0xfa, 0x4e, 0xc7, 0x33, 0xa8, 0x5f, 0xca, 0x0b, 0x53, 0x1b, 0x89, + 0xec, 0xd0, 0xf8, 0x25, 0xd4, 0xba, 0x9b, 0x1a, 0x96, 0x42, 0x98, 0x3e, 0xee, 0x98, 0x9e, 0x00, + 0xf7, 0xf5, 0x05, 0x7e, 0xda, 0x21, 0xc7, 0xc7, 0x31, 0x12, 0x7a, 0xae, 0x80, 0xea, 0x3a, 0xcd, + 0x5d, 0xd2, 0xa0, 0x6d, 0xbf, 0x34, 0xbb, 0x3e, 0xbd, 0x31, 0xb7, 0x45, 0x26, 0x9f, 0xf5, 0xda, + 0x41, 0x68, 0x63, 0xc7, 0x66, 0x5e, 0x4f, 0x5f, 0x92, 0x99, 0xaa, 0x46, 0x74, 0x1c, 0xbb, 0x81, + 0x3e, 0x55, 0xa0, 0xe8, 0x3a, 0xcd, 0xba, 0x6d, 0x3b, 0x8c, 0x30, 0xd3, 0xb1, 0xfd, 0xd2, 0x25, + 0xe1, 0xd9, 0xa3, 0x5f, 0xc6, 0xb3, 0x84, 0xa1, 0xc0, 0xbd, 0x55, 0xe9, 0x5e, 0x31, 0xcd, 0xc4, + 0x19, 0xaf, 0x90, 0x01, 0x4b, 0xa4, 0xd9, 0x34, 0xf9, 0x82, 0xb4, 0x1f, 0x3a, 0xed, 0x8e, 0x45, + 0xfd, 0x52, 0x41, 0xb8, 0xba, 0x36, 0xea, 0x70, 0x02, 0x11, 0xfd, 0xaa, 0x84, 0x5f, 0xaa, 0x67, + 0x95, 0xf1, 0x30, 0x1e, 0x7a, 0x02, 0xab, 0x59, 0xe2, 0x1e, 0xcf, 0x3e, 0xbf, 0xa4, 0x0a, 0x4b, + 0x95, 0xf1, 0x96, 0x84, 0x9c, 0x5e, 0x96, 0xe6, 0x56, 0xeb, 0x23, 0x61, 0xf0, 0x18, 0x78, 0xf4, + 0x17, 0x98, 0xa6, 0x76, 0xb7, 0x04, 0xe3, 0xf7, 0xb3, 0x63, 0x77, 0x1f, 0x12, 0x4f, 0x9f, 0x93, + 0x06, 0xa6, 0x77, 0xec, 0x2e, 0xe6, 0x3a, 0xe8, 0x2a, 0x4c, 0x77, 0x5d, 0x52, 0x9a, 0x13, 0xb5, + 0xe2, 0x12, 0x67, 0x3d, 0x3c, 0xa8, 0x63, 0x4e, 0x5b, 0xfb, 0x1b, 0x14, 0xd3, 0xc9, 0x80, 0x2e, + 0xc3, 0xf4, 0x29, 0xed, 0x89, 0x22, 0xa0, 0x62, 0xfe, 0x89, 0x56, 0x20, 0xdf, 0x25, 0xed, 0x0e, + 0x15, 0x57, 0x5b, 0xc5, 0xc1, 0xe2, 0x66, 0xee, 0x86, 0xb2, 0x56, 0x87, 0xe5, 0x11, 0x07, 0xf6, + 0x73, 0x20, 0xaa, 0x9f, 0x28, 0x10, 0x5c, 0x2d, 0xa4, 0x01, 0x78, 0xd4, 0x75, 0x7c, 0x93, 0x57, + 0x85, 0x40, 0x39, 0x28, 0xcf, 0x38, 0xa2, 0xe2, 0x84, 0x04, 0xdf, 0x15, 0x23, 0x41, 0x6d, 0x56, + 0x83, 0x5d, 0x1d, 0x91, 0x16, 0xe6, 0x34, 0xf4, 0x00, 0xc0, 0xed, 0xb4, 0xdb, 0x07, 0x4e, 0xdb, + 0x34, 0x7a, 0xb2, 0x8a, 0xd4, 0x38, 0xd4, 0x41, 0x44, 0x7d, 0xdb, 0xaf, 0xfc, 0x76, 0xf8, 0xd5, + 0xd4, 0x62, 0x01, 0x9c, 0x80, 0xa8, 0x7e, 0x99, 0x83, 0xb9, 0x3d, 0x91, 0xc2, 0xcd, 0x43, 0x4a, + 0x9b, 0xe8, 0x7f, 0x50, 0xe0, 0x2f, 0x66, 0x93, 0x30, 0x22, 0x1f, 0xa7, 0x3f, 0x8e, 0x7d, 0x1c, + 0xc4, 0x1d, 0xe0, 0xd2, 0xfc, 0x8c, 0x1e, 0x34, 0xfe, 0x4f, 0x0d, 0xb6, 0x47, 0x19, 0xd1, 0x91, + 0x3c, 0x27, 0x88, 0x69, 0x38, 0x42, 0x45, 0x2e, 0xcc, 0xf8, 0x2e, 0x35, 0xe4, 0xd3, 0xb3, 0x7f, + 0xc1, 0xab, 0x96, 0xf0, 0xfd, 0xd0, 0xa5, 0x86, 0x3e, 0x2f, 0x6d, 0xcf, 0xf0, 0x15, 0x16, 0x96, + 0xd0, 0x53, 0x98, 0xf5, 0x19, 0x61, 0x1d, 0x5f, 0x04, 0x6c, 0x6e, 0xeb, 0x60, 0x82, 0x36, 0x05, + 0x6e, 0xfc, 0x22, 0x06, 0x6b, 0x2c, 0xed, 0x55, 0x5f, 0x2b, 0xb0, 0x98, 0x90, 0xde, 0x35, 0x7d, + 0x86, 0xfe, 0x3b, 0x14, 0x61, 0xed, 0x6c, 0x11, 0xe6, 0xda, 0x22, 0xbe, 0x97, 0xa5, 0xb5, 0x42, + 0x48, 0x49, 0x44, 0xd7, 0x81, 0xbc, 0xc9, 0xa8, 0xe5, 0x97, 0x72, 0xe2, 0x3a, 0xdd, 0x9f, 0xdc, + 0x56, 0xf5, 0x05, 0x69, 0x36, 0x7f, 0x8f, 0x1b, 0xc0, 0x81, 0x9d, 0xea, 0xd7, 0x39, 0x28, 0x26, + 0x03, 0x42, 0xd9, 0x3b, 0xc8, 0x21, 0x3f, 0x95, 0x43, 0xff, 0x9a, 0xe0, 0x79, 0x52, 0x36, 0x36, + 0x8d, 0xde, 0xcb, 0xa4, 0xd1, 0xe1, 0x64, 0xcd, 0xfe, 0x78, 0x26, 0x7d, 0xa3, 0x00, 0x4a, 0x2b, + 0xbc, 0x83, 0x64, 0xf2, 0xd2, 0xc9, 0xb4, 0x37, 0xd1, 0x0d, 0x8f, 0xc9, 0xa7, 0xef, 0x67, 0xb2, + 0x1b, 0xe5, 0x47, 0x80, 0x36, 0xa0, 0x20, 0x9b, 0x34, 0x5f, 0xb6, 0x71, 0xf3, 0xdc, 0x69, 0xd9, + 0xc6, 0xf9, 0x38, 0xe2, 0x22, 0x02, 0x05, 0x9f, 0xb6, 0xa9, 0xc1, 0x1c, 0x4f, 0xe6, 0xc7, 0x9f, + 0xce, 0x18, 0x12, 0xfe, 0x56, 0x1c, 0x4a, 0xd5, 0x38, 0x2e, 0x21, 0x05, 0x47, 0xb0, 0xe8, 0x99, + 0x02, 0x05, 0x46, 0x2d, 0xb7, 0x4d, 0x18, 0x95, 0xc9, 0x80, 0x27, 0x17, 0x9b, 0x23, 0x89, 0x1c, + 0xbb, 0x10, 0x52, 0x70, 0x64, 0x15, 0xbd, 0x0f, 0x0b, 0xfe, 0x89, 0xe3, 0xb0, 0x90, 0x25, 0xdb, + 0xc2, 0xfa, 0x19, 0xdd, 0x90, 0x2f, 0xab, 0x98, 0xd1, 0xb4, 0xc3, 0x24, 0x90, 0x7e, 0x45, 0x5a, + 0x5d, 0x48, 0x91, 0x71, 0xda, 0x1c, 0xfa, 0x50, 0x81, 0x62, 0xc7, 0x6d, 0x12, 0x46, 0x0f, 0x19, + 0x9f, 0x76, 0x5a, 0x3d, 0xd9, 0x2d, 0x5e, 0x34, 0x49, 0x8e, 0x53, 0xa0, 0x3a, 0xe2, 0xed, 0x51, + 0x9a, 0x86, 0x33, 0x86, 0xc7, 0x36, 0xec, 0xb3, 0xe7, 0x69, 0xd8, 0xab, 0x9f, 0xe5, 0x61, 0x65, + 0xd4, 0xd5, 0x44, 0xf7, 0x01, 0x39, 0x0d, 0xde, 0x99, 0xd3, 0xe6, 0x9d, 0x60, 0xc6, 0x33, 0x1d, + 0x5b, 0x24, 0xe3, 0xb4, 0xbe, 0x26, 0x83, 0x86, 0x1e, 0x0c, 0x49, 0xe0, 0x11, 0x5a, 0xe8, 0x0f, + 0x89, 0x74, 0x0e, 0xe6, 0x8a, 0xe8, 0xb0, 0x47, 0xa4, 0xf4, 0x5f, 0x61, 0xc1, 0xa3, 0xa4, 0xd9, + 0x0b, 0x59, 0x22, 0xe7, 0xf2, 0xf1, 0x49, 0xe1, 0x24, 0x13, 0xa7, 0x65, 0xd1, 0x1d, 0x58, 0xb2, + 0xe9, 0x53, 0x26, 0xd7, 0xfb, 0x1d, 0xab, 0x41, 0x3d, 0x91, 0x2d, 0xf9, 0xb8, 0x41, 0xdc, 0xcf, + 0x0a, 0xe0, 0x61, 0x1d, 0x54, 0x87, 0x45, 0xa3, 0xe3, 0x89, 0x09, 0x2c, 0xf4, 0x23, 0x2f, 0x60, + 0x7e, 0x23, 0x61, 0x16, 0xb7, 0xd3, 0x6c, 0x9c, 0x95, 0xe7, 0x10, 0xc1, 0xd9, 0x35, 0x23, 0x88, + 0xd9, 0x34, 0xc4, 0x71, 0x9a, 0x8d, 0xb3, 0xf2, 0x29, 0x2f, 0x82, 0xd3, 0x2b, 0x5d, 0x12, 0x6d, + 0xd0, 0xb0, 0x17, 0x01, 0x1b, 0x67, 0xe5, 0xd1, 0xdf, 0xc3, 0xd4, 0x8d, 0x10, 0x0a, 0xc1, 0x38, + 0x16, 0xb6, 0xe3, 0xc7, 0x29, 0x2e, 0xce, 0x48, 0xa3, 0x9b, 0x50, 0x34, 0x9c, 0x76, 0x5b, 0x2c, + 0x82, 0xc1, 0x52, 0x15, 0x9b, 0x10, 0xb9, 0xba, 0x9d, 0xe2, 0xe0, 0x8c, 0x24, 0x7a, 0x0c, 0x60, + 0x38, 0x76, 0xd0, 0x07, 0xfb, 0xb2, 0xe7, 0xbd, 0x75, 0x9e, 0x4b, 0xbb, 0x1d, 0xa2, 0xc4, 0x4f, + 0x65, 0x44, 0xf2, 0x71, 0xc2, 0x48, 0xf5, 0xdb, 0x5c, 0xaa, 0x09, 0x11, 0xe5, 0x94, 0x42, 0x5e, + 0xdc, 0x67, 0xf9, 0x68, 0x5c, 0x74, 0x9a, 0x14, 0xa5, 0x22, 0x98, 0x26, 0xc5, 0x27, 0x0e, 0xd0, + 0x51, 0x17, 0xe6, 0xfd, 0x44, 0x45, 0x93, 0xf5, 0xf8, 0x1f, 0xe7, 0x2a, 0x52, 0xa9, 0xca, 0xc8, + 0x47, 0xf8, 0x24, 0x05, 0xa7, 0xec, 0xa0, 0x0e, 0xa8, 0xad, 0x70, 0x06, 0x93, 0x05, 0xfa, 0xee, + 0xa4, 0x66, 0xba, 0x60, 0xca, 0x8d, 0x96, 0x38, 0xb6, 0x54, 0xfd, 0x5c, 0x81, 0xa5, 0xa1, 0xe6, + 0x30, 0x73, 0xe4, 0xca, 0x3b, 0x38, 0xf2, 0x31, 0xa5, 0x2a, 0x77, 0x9e, 0x52, 0x55, 0xfd, 0x4e, + 0x81, 0xe5, 0x11, 0xaf, 0xd3, 0xaf, 0x71, 0x52, 0xa8, 0xde, 0x86, 0x2b, 0x98, 0xdf, 0x57, 0xbb, + 0x95, 0x7e, 0x72, 0xd0, 0xef, 0x41, 0x75, 0x89, 0xc7, 0xcc, 0xa8, 0xe4, 0xe7, 0x83, 0x34, 0x38, + 0x08, 0x89, 0x38, 0xe6, 0x57, 0x7f, 0x07, 0xc1, 0x2d, 0x40, 0xeb, 0x30, 0x63, 0x13, 0x8b, 0xca, + 0x91, 0x2f, 0x32, 0x28, 0xfe, 0xf1, 0x08, 0x4e, 0xf5, 0x0b, 0x05, 0x32, 0xaf, 0x1b, 0xda, 0x82, + 0x19, 0xd6, 0x73, 0x43, 0xa5, 0x32, 0x57, 0x38, 0xea, 0xb9, 0xf4, 0x6d, 0xbf, 0x82, 0xd2, 0x92, + 0x9c, 0x8a, 0x85, 0x2c, 0xfa, 0x48, 0x81, 0x05, 0x2f, 0xe9, 0xb8, 0x8c, 0xd9, 0xd1, 0x05, 0x63, + 0x36, 0x32, 0x18, 0xfa, 0x92, 0x78, 0x73, 0x92, 0x2c, 0x9c, 0xb6, 0xae, 0x6b, 0x2f, 0xde, 0x94, + 0xa7, 0x5e, 0xbe, 0x29, 0x4f, 0xbd, 0x7a, 0x53, 0x9e, 0x7a, 0x36, 0x28, 0x2b, 0x2f, 0x06, 0x65, + 0xe5, 0xe5, 0xa0, 0xac, 0xbc, 0x1a, 0x94, 0x95, 0xd7, 0x83, 0xb2, 0xf2, 0xf1, 0x57, 0xe5, 0xa9, + 0xff, 0x14, 0x42, 0x3b, 0x3f, 0x04, 0x00, 0x00, 0xff, 0xff, 0x3d, 0x44, 0x1b, 0xc7, 0xe8, 0x16, + 0x00, 0x00, +} + +func (m *Gardenlet) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Gardenlet) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Gardenlet) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MergeWithParent != nil { + i-- + if *m.MergeWithParent { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.Bootstrap != nil { + i -= len(*m.Bootstrap) + copy(dAtA[i:], *m.Bootstrap) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Bootstrap))) + i-- + dAtA[i] = 0x1a + } + { + size, err := m.Config.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.Deployment != nil { + { + size, err := m.Deployment.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GardenletDeployment) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GardenletDeployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GardenletDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.VPA != nil { + i-- + if *m.VPA { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if len(m.Env) > 0 { + for iNdEx := len(m.Env) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Env[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } + if len(m.AdditionalVolumeMounts) > 0 { + for iNdEx := len(m.AdditionalVolumeMounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AdditionalVolumeMounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if len(m.AdditionalVolumes) > 0 { + for iNdEx := len(m.AdditionalVolumes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AdditionalVolumes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.PodAnnotations) > 0 { + keysForPodAnnotations := make([]string, 0, len(m.PodAnnotations)) + for k := range m.PodAnnotations { + keysForPodAnnotations = append(keysForPodAnnotations, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForPodAnnotations) + for iNdEx := len(keysForPodAnnotations) - 1; iNdEx >= 0; iNdEx-- { + v := m.PodAnnotations[string(keysForPodAnnotations[iNdEx])] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(keysForPodAnnotations[iNdEx]) + copy(dAtA[i:], keysForPodAnnotations[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(keysForPodAnnotations[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x3a + } + } + if len(m.PodLabels) > 0 { + keysForPodLabels := make([]string, 0, len(m.PodLabels)) + for k := range m.PodLabels { + keysForPodLabels = append(keysForPodLabels, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForPodLabels) + for iNdEx := len(keysForPodLabels) - 1; iNdEx >= 0; iNdEx-- { + v := m.PodLabels[string(keysForPodLabels[iNdEx])] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(keysForPodLabels[iNdEx]) + copy(dAtA[i:], keysForPodLabels[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(keysForPodLabels[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x32 + } + } + if m.Resources != nil { + { + size, err := m.Resources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.Image != nil { + { + size, err := m.Image.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.ServiceAccountName != nil { + i -= len(*m.ServiceAccountName) + copy(dAtA[i:], *m.ServiceAccountName) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ServiceAccountName))) + i-- + dAtA[i] = 0x1a + } + if m.RevisionHistoryLimit != nil { + i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit)) + i-- + dAtA[i] = 0x10 + } + if m.ReplicaCount != nil { + i = encodeVarintGenerated(dAtA, i, uint64(*m.ReplicaCount)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Image) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Image) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Image) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PullPolicy != nil { + i -= len(*m.PullPolicy) + copy(dAtA[i:], *m.PullPolicy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PullPolicy))) + i-- + dAtA[i] = 0x1a + } + if m.Tag != nil { + i -= len(*m.Tag) + copy(dAtA[i:], *m.Tag) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Tag))) + i-- + dAtA[i] = 0x12 + } + if m.Repository != nil { + i -= len(*m.Repository) + copy(dAtA[i:], *m.Repository) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Repository))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ManagedSeed) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ManagedSeed) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ManagedSeed) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ManagedSeedList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ManagedSeedList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ManagedSeedList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ManagedSeedSet) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ManagedSeedSet) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ManagedSeedSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ManagedSeedSetList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ManagedSeedSetList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ManagedSeedSetList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ManagedSeedSetSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ManagedSeedSetSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ManagedSeedSetSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RevisionHistoryLimit != nil { + i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit)) + i-- + dAtA[i] = 0x30 + } + if m.UpdateStrategy != nil { + { + size, err := m.UpdateStrategy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + { + size, err := m.ShootTemplate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size, err := m.Template.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.Selector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.Replicas != nil { + i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ManagedSeedSetStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ManagedSeedSetStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ManagedSeedSetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Conditions) > 0 { + for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } + if m.CollisionCount != nil { + i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount)) + i-- + dAtA[i] = 0x48 + } + i -= len(m.UpdateRevision) + copy(dAtA[i:], m.UpdateRevision) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UpdateRevision))) + i-- + dAtA[i] = 0x42 + i -= len(m.CurrentRevision) + copy(dAtA[i:], m.CurrentRevision) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.CurrentRevision))) + i-- + dAtA[i] = 0x3a + i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedReplicas)) + i-- + dAtA[i] = 0x30 + i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentReplicas)) + i-- + dAtA[i] = 0x28 + i = encodeVarintGenerated(dAtA, i, uint64(m.NextReplicaNumber)) + i-- + dAtA[i] = 0x20 + i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas)) + i-- + dAtA[i] = 0x18 + i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas)) + i-- + dAtA[i] = 0x10 + i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration)) + i-- + dAtA[i] = 0x8 + return len(dAtA) - i, nil +} + +func (m *ManagedSeedSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ManagedSeedSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ManagedSeedSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Gardenlet != nil { + { + size, err := m.Gardenlet.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.SeedTemplate != nil { + { + size, err := m.SeedTemplate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Shoot != nil { + { + size, err := m.Shoot.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ManagedSeedStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ManagedSeedStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ManagedSeedStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration)) + i-- + dAtA[i] = 0x10 + if len(m.Conditions) > 0 { + for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ManagedSeedTemplate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ManagedSeedTemplate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ManagedSeedTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *RollingUpdateStrategy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RollingUpdateStrategy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RollingUpdateStrategy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Partition != nil { + i = encodeVarintGenerated(dAtA, i, uint64(*m.Partition)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Shoot) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Shoot) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Shoot) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *UpdateStrategy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateStrategy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateStrategy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RollingUpdate != nil { + { + size, err := m.RollingUpdate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Type != nil { + i -= len(*m.Type) + copy(dAtA[i:], *m.Type) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Type))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Gardenlet) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Deployment != nil { + l = m.Deployment.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = m.Config.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.Bootstrap != nil { + l = len(*m.Bootstrap) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.MergeWithParent != nil { + n += 2 + } + return n +} + +func (m *GardenletDeployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ReplicaCount != nil { + n += 1 + sovGenerated(uint64(*m.ReplicaCount)) + } + if m.RevisionHistoryLimit != nil { + n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit)) + } + if m.ServiceAccountName != nil { + l = len(*m.ServiceAccountName) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Resources != nil { + l = m.Resources.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.PodLabels) > 0 { + for k, v := range m.PodLabels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if len(m.PodAnnotations) > 0 { + for k, v := range m.PodAnnotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if len(m.AdditionalVolumes) > 0 { + for _, e := range m.AdditionalVolumes { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.AdditionalVolumeMounts) > 0 { + for _, e := range m.AdditionalVolumeMounts { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Env) > 0 { + for _, e := range m.Env { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.VPA != nil { + n += 2 + } + return n +} + +func (m *Image) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Repository != nil { + l = len(*m.Repository) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Tag != nil { + l = len(*m.Tag) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.PullPolicy != nil { + l = len(*m.PullPolicy) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ManagedSeed) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ManagedSeedList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ManagedSeedSet) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ManagedSeedSetList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ManagedSeedSetSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Replicas != nil { + n += 1 + sovGenerated(uint64(*m.Replicas)) + } + l = m.Selector.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Template.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.ShootTemplate.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.UpdateStrategy != nil { + l = m.UpdateStrategy.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.RevisionHistoryLimit != nil { + n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit)) + } + return n +} + +func (m *ManagedSeedSetStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovGenerated(uint64(m.ObservedGeneration)) + n += 1 + sovGenerated(uint64(m.Replicas)) + n += 1 + sovGenerated(uint64(m.ReadyReplicas)) + n += 1 + sovGenerated(uint64(m.NextReplicaNumber)) + n += 1 + sovGenerated(uint64(m.CurrentReplicas)) + n += 1 + sovGenerated(uint64(m.UpdatedReplicas)) + l = len(m.CurrentRevision) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.UpdateRevision) + n += 1 + l + sovGenerated(uint64(l)) + if m.CollisionCount != nil { + n += 1 + sovGenerated(uint64(*m.CollisionCount)) + } + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ManagedSeedSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Shoot != nil { + l = m.Shoot.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.SeedTemplate != nil { + l = m.SeedTemplate.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Gardenlet != nil { + l = m.Gardenlet.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ManagedSeedStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + n += 1 + sovGenerated(uint64(m.ObservedGeneration)) + return n +} + +func (m *ManagedSeedTemplate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *RollingUpdateStrategy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Partition != nil { + n += 1 + sovGenerated(uint64(*m.Partition)) + } + return n +} + +func (m *Shoot) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *UpdateStrategy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != nil { + l = len(*m.Type) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.RollingUpdate != nil { + l = m.RollingUpdate.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Gardenlet) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Gardenlet{`, + `Deployment:` + strings.Replace(this.Deployment.String(), "GardenletDeployment", "GardenletDeployment", 1) + `,`, + `Config:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Config), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `Bootstrap:` + valueToStringGenerated(this.Bootstrap) + `,`, + `MergeWithParent:` + valueToStringGenerated(this.MergeWithParent) + `,`, + `}`, + }, "") + return s +} +func (this *GardenletDeployment) String() string { + if this == nil { + return "nil" + } + repeatedStringForAdditionalVolumes := "[]Volume{" + for _, f := range this.AdditionalVolumes { + repeatedStringForAdditionalVolumes += fmt.Sprintf("%v", f) + "," + } + repeatedStringForAdditionalVolumes += "}" + repeatedStringForAdditionalVolumeMounts := "[]VolumeMount{" + for _, f := range this.AdditionalVolumeMounts { + repeatedStringForAdditionalVolumeMounts += fmt.Sprintf("%v", f) + "," + } + repeatedStringForAdditionalVolumeMounts += "}" + repeatedStringForEnv := "[]EnvVar{" + for _, f := range this.Env { + repeatedStringForEnv += fmt.Sprintf("%v", f) + "," + } + repeatedStringForEnv += "}" + keysForPodLabels := make([]string, 0, len(this.PodLabels)) + for k := range this.PodLabels { + keysForPodLabels = append(keysForPodLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForPodLabels) + mapStringForPodLabels := "map[string]string{" + for _, k := range keysForPodLabels { + mapStringForPodLabels += fmt.Sprintf("%v: %v,", k, this.PodLabels[k]) + } + mapStringForPodLabels += "}" + keysForPodAnnotations := make([]string, 0, len(this.PodAnnotations)) + for k := range this.PodAnnotations { + keysForPodAnnotations = append(keysForPodAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForPodAnnotations) + mapStringForPodAnnotations := "map[string]string{" + for _, k := range keysForPodAnnotations { + mapStringForPodAnnotations += fmt.Sprintf("%v: %v,", k, this.PodAnnotations[k]) + } + mapStringForPodAnnotations += "}" + s := strings.Join([]string{`&GardenletDeployment{`, + `ReplicaCount:` + valueToStringGenerated(this.ReplicaCount) + `,`, + `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`, + `ServiceAccountName:` + valueToStringGenerated(this.ServiceAccountName) + `,`, + `Image:` + strings.Replace(this.Image.String(), "Image", "Image", 1) + `,`, + `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "ResourceRequirements", "v1.ResourceRequirements", 1) + `,`, + `PodLabels:` + mapStringForPodLabels + `,`, + `PodAnnotations:` + mapStringForPodAnnotations + `,`, + `AdditionalVolumes:` + repeatedStringForAdditionalVolumes + `,`, + `AdditionalVolumeMounts:` + repeatedStringForAdditionalVolumeMounts + `,`, + `Env:` + repeatedStringForEnv + `,`, + `VPA:` + valueToStringGenerated(this.VPA) + `,`, + `}`, + }, "") + return s +} +func (this *Image) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Image{`, + `Repository:` + valueToStringGenerated(this.Repository) + `,`, + `Tag:` + valueToStringGenerated(this.Tag) + `,`, + `PullPolicy:` + valueToStringGenerated(this.PullPolicy) + `,`, + `}`, + }, "") + return s +} +func (this *ManagedSeed) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ManagedSeed{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ManagedSeedSpec", "ManagedSeedSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ManagedSeedStatus", "ManagedSeedStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ManagedSeedList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ManagedSeed{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ManagedSeed", "ManagedSeed", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ManagedSeedList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ManagedSeedSet) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ManagedSeedSet{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ManagedSeedSetSpec", "ManagedSeedSetSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ManagedSeedSetStatus", "ManagedSeedSetStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ManagedSeedSetList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ManagedSeedSet{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ManagedSeedSet", "ManagedSeedSet", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ManagedSeedSetList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ManagedSeedSetSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ManagedSeedSetSpec{`, + `Replicas:` + valueToStringGenerated(this.Replicas) + `,`, + `Selector:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "v11.LabelSelector", 1), `&`, ``, 1) + `,`, + `Template:` + strings.Replace(strings.Replace(this.Template.String(), "ManagedSeedTemplate", "ManagedSeedTemplate", 1), `&`, ``, 1) + `,`, + `ShootTemplate:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ShootTemplate), "ShootTemplate", "v1beta1.ShootTemplate", 1), `&`, ``, 1) + `,`, + `UpdateStrategy:` + strings.Replace(this.UpdateStrategy.String(), "UpdateStrategy", "UpdateStrategy", 1) + `,`, + `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`, + `}`, + }, "") + return s +} +func (this *ManagedSeedSetStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForConditions := "[]Condition{" + for _, f := range this.Conditions { + repeatedStringForConditions += fmt.Sprintf("%v", f) + "," + } + repeatedStringForConditions += "}" + s := strings.Join([]string{`&ManagedSeedSetStatus{`, + `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, + `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`, + `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`, + `NextReplicaNumber:` + fmt.Sprintf("%v", this.NextReplicaNumber) + `,`, + `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`, + `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`, + `CurrentRevision:` + fmt.Sprintf("%v", this.CurrentRevision) + `,`, + `UpdateRevision:` + fmt.Sprintf("%v", this.UpdateRevision) + `,`, + `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`, + `Conditions:` + repeatedStringForConditions + `,`, + `}`, + }, "") + return s +} +func (this *ManagedSeedSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ManagedSeedSpec{`, + `Shoot:` + strings.Replace(this.Shoot.String(), "Shoot", "Shoot", 1) + `,`, + `SeedTemplate:` + strings.Replace(fmt.Sprintf("%v", this.SeedTemplate), "SeedTemplate", "v1beta1.SeedTemplate", 1) + `,`, + `Gardenlet:` + strings.Replace(this.Gardenlet.String(), "Gardenlet", "Gardenlet", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ManagedSeedStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForConditions := "[]Condition{" + for _, f := range this.Conditions { + repeatedStringForConditions += fmt.Sprintf("%v", f) + "," + } + repeatedStringForConditions += "}" + s := strings.Join([]string{`&ManagedSeedStatus{`, + `Conditions:` + repeatedStringForConditions + `,`, + `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, + `}`, + }, "") + return s +} +func (this *ManagedSeedTemplate) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ManagedSeedTemplate{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ManagedSeedSpec", "ManagedSeedSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *RollingUpdateStrategy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RollingUpdateStrategy{`, + `Partition:` + valueToStringGenerated(this.Partition) + `,`, + `}`, + }, "") + return s +} +func (this *Shoot) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Shoot{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateStrategy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateStrategy{`, + `Type:` + valueToStringGenerated(this.Type) + `,`, + `RollingUpdate:` + strings.Replace(this.RollingUpdate.String(), "RollingUpdateStrategy", "RollingUpdateStrategy", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Gardenlet) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Gardenlet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Gardenlet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deployment", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Deployment == nil { + m.Deployment = &GardenletDeployment{} + } + if err := m.Deployment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bootstrap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := Bootstrap(dAtA[iNdEx:postIndex]) + m.Bootstrap = &s + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MergeWithParent", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.MergeWithParent = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GardenletDeployment) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GardenletDeployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GardenletDeployment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReplicaCount", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ReplicaCount = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RevisionHistoryLimit = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceAccountName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.ServiceAccountName = &s + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &Image{} + } + if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Resources == nil { + m.Resources = &v1.ResourceRequirements{} + } + if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodLabels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PodLabels == nil { + m.PodLabels = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.PodLabels[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodAnnotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PodAnnotations == nil { + m.PodAnnotations = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.PodAnnotations[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdditionalVolumes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AdditionalVolumes = append(m.AdditionalVolumes, v1.Volume{}) + if err := m.AdditionalVolumes[len(m.AdditionalVolumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdditionalVolumeMounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AdditionalVolumeMounts = append(m.AdditionalVolumeMounts, v1.VolumeMount{}) + if err := m.AdditionalVolumeMounts[len(m.AdditionalVolumeMounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Env = append(m.Env, v1.EnvVar{}) + if err := m.Env[len(m.Env)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VPA", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.VPA = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Image) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Image: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Image: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Repository", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Repository = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tag", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Tag = &s + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PullPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := k8s_io_api_core_v1.PullPolicy(dAtA[iNdEx:postIndex]) + m.PullPolicy = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ManagedSeed) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ManagedSeed: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ManagedSeed: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ManagedSeedList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ManagedSeedList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ManagedSeedList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ManagedSeed{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ManagedSeedSet) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ManagedSeedSet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ManagedSeedSet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ManagedSeedSetList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ManagedSeedSetList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ManagedSeedSetList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ManagedSeedSet{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ManagedSeedSetSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ManagedSeedSetSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ManagedSeedSetSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Replicas = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShootTemplate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ShootTemplate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateStrategy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UpdateStrategy == nil { + m.UpdateStrategy = &UpdateStrategy{} + } + if err := m.UpdateStrategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RevisionHistoryLimit = &v + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ManagedSeedSetStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ManagedSeedSetStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ManagedSeedSetStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) + } + m.ObservedGeneration = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ObservedGeneration |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) + } + m.Replicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Replicas |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType) + } + m.ReadyReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReadyReplicas |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NextReplicaNumber", wireType) + } + m.NextReplicaNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NextReplicaNumber |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType) + } + m.CurrentReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CurrentReplicas |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdatedReplicas", wireType) + } + m.UpdatedReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UpdatedReplicas |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentRevision", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CurrentRevision = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateRevision", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UpdateRevision = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CollisionCount", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CollisionCount = &v + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, v1beta1.Condition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ManagedSeedSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ManagedSeedSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ManagedSeedSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Shoot", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Shoot == nil { + m.Shoot = &Shoot{} + } + if err := m.Shoot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SeedTemplate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SeedTemplate == nil { + m.SeedTemplate = &v1beta1.SeedTemplate{} + } + if err := m.SeedTemplate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Gardenlet", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Gardenlet == nil { + m.Gardenlet = &Gardenlet{} + } + if err := m.Gardenlet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ManagedSeedStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ManagedSeedStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ManagedSeedStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, v1beta1.Condition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) + } + m.ObservedGeneration = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ObservedGeneration |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ManagedSeedTemplate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ManagedSeedTemplate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ManagedSeedTemplate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RollingUpdateStrategy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RollingUpdateStrategy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RollingUpdateStrategy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Partition", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Partition = &v + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Shoot) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Shoot: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Shoot: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateStrategy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateStrategy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateStrategy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := UpdateStrategyType(dAtA[iNdEx:postIndex]) + m.Type = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RollingUpdate == nil { + m.RollingUpdate = &RollingUpdateStrategy{} + } + if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/generated.proto b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/generated.proto new file mode 100644 index 00000000..219d021b --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/generated.proto @@ -0,0 +1,310 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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 go-to-protobuf. Do not edit it manually! + +syntax = "proto2"; + +package github.com.gardener.gardener.pkg.apis.seedmanagement.v1alpha1; + +import "github.com/gardener/gardener/pkg/apis/core/v1beta1/generated.proto"; +import "k8s.io/api/core/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1alpha1"; + +// Gardenlet specifies gardenlet deployment parameters and the GardenletConfiguration used to configure gardenlet. +message Gardenlet { + // Deployment specifies certain gardenlet deployment parameters, such as the number of replicas, + // the image, etc. + // +optional + optional GardenletDeployment deployment = 1; + + // Config is the GardenletConfiguration used to configure gardenlet. + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension config = 2; + + // Bootstrap is the mechanism that should be used for bootstrapping gardenlet connection to the Garden cluster. One of ServiceAccount, BootstrapToken, None. + // If set to ServiceAccount or BootstrapToken, a service account or a bootstrap token will be created in the garden cluster and used to compute the bootstrap kubeconfig. + // If set to None, the gardenClientConnection.kubeconfig field will be used to connect to the Garden cluster. Defaults to BootstrapToken. + // +optional + optional string bootstrap = 3; + + // MergeWithParent specifies whether the GardenletConfiguration of the parent gardenlet + // should be merged with the specified GardenletConfiguration. Defaults to true. + // +optional + optional bool mergeWithParent = 4; +} + +// GardenletDeployment specifies certain gardenlet deployment parameters, such as the number of replicas, +// the image, etc. +message GardenletDeployment { + // ReplicaCount is the number of gardenlet replicas. Defaults to 1. + // +optional + optional int32 replicaCount = 1; + + // RevisionHistoryLimit is the number of old gardenlet ReplicaSets to retain to allow rollback. Defaults to 1. + // +optional + optional int32 revisionHistoryLimit = 2; + + // ServiceAccountName is the name of the ServiceAccount to use to run gardenlet pods. + // +optional + optional string serviceAccountName = 3; + + // Image is the gardenlet container image. + // +optional + optional Image image = 4; + + // Resources are the compute resources required by the gardenlet container. + // +optional + optional k8s.io.api.core.v1.ResourceRequirements resources = 5; + + // PodLabels are the labels on gardenlet pods. + // +optional + map podLabels = 6; + + // PodAnnotations are the annotations on gardenlet pods. + // +optional + map podAnnotations = 7; + + // AdditionalVolumes is the list of additional volumes that should be mounted by gardenlet containers. + // +optional + repeated k8s.io.api.core.v1.Volume additionalVolumes = 8; + + // AdditionalVolumeMounts is the list of additional pod volumes to mount into the gardenlet container's filesystem. + // +optional + repeated k8s.io.api.core.v1.VolumeMount additionalVolumeMounts = 9; + + // Env is the list of environment variables to set in the gardenlet container. + // +optional + repeated k8s.io.api.core.v1.EnvVar env = 10; + + // VPA specifies whether to enable VPA for gardenlet. Defaults to true. + // +optional + optional bool vpa = 11; +} + +// Image specifies container image parameters. +message Image { + // Repository is the image repository. + // +optional + optional string repository = 1; + + // Tag is the image tag. + // +optional + optional string tag = 2; + + // PullPolicy is the image pull policy. One of Always, Never, IfNotPresent. + // Defaults to Always if latest tag is specified, or IfNotPresent otherwise. + // +optional + optional string pullPolicy = 3; +} + +// ManagedSeed represents a Shoot that is registered as Seed. +message ManagedSeed { + // Standard object metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the ManagedSeed. + // +optional + optional ManagedSeedSpec spec = 2; + + // Most recently observed status of the ManagedSeed. + // +optional + optional ManagedSeedStatus status = 3; +} + +// ManagedSeedList is a list of ManagedSeed objects. +message ManagedSeedList { + // Standard list object metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of ManagedSeeds. + repeated ManagedSeed items = 2; +} + +// ManagedSeedSet represents a set of identical ManagedSeeds. +message ManagedSeedSet { + // Standard object metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Spec defines the desired identities of ManagedSeeds and Shoots in this set. + // +optional + optional ManagedSeedSetSpec spec = 2; + + // Status is the current status of ManagedSeeds and Shoots in this ManagedSeedSet. + // +optional + optional ManagedSeedSetStatus status = 3; +} + +// ManagedSeedSetList is a list of ManagedSeed objects. +message ManagedSeedSetList { + // Standard list object metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of ManagedSeedSets. + repeated ManagedSeedSet items = 2; +} + +// ManagedSeedSetSpec is the specification of a ManagedSeedSet. +message ManagedSeedSetSpec { + // Replicas is the desired number of replicas of the given Template. Defaults to 1. + // +optional + optional int32 replicas = 1; + + // Selector is a label query over ManagedSeeds and Shoots that should match the replica count. + // It must match the ManagedSeeds and Shoots template's labels. + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; + + // Template describes the ManagedSeed that will be created if insufficient replicas are detected. + // Each ManagedSeed created / updated by the ManagedSeedSet will fulfill this template. + optional ManagedSeedTemplate template = 3; + + // ShootTemplate describes the Shoot that will be created if insufficient replicas are detected for hosting the corresponding ManagedSeed. + // Each Shoot created / updated by the ManagedSeedSet will fulfill this template. + optional github.com.gardener.gardener.pkg.apis.core.v1beta1.ShootTemplate shootTemplate = 4; + + // UpdateStrategy specifies the UpdateStrategy that will be + // employed to update ManagedSeeds / Shoots in the ManagedSeedSet when a revision is made to + // Template / ShootTemplate. + // +optional + optional UpdateStrategy updateStrategy = 5; + + // RevisionHistoryLimit is the maximum number of revisions that will + // be maintained in the ManagedSeedSet's revision history. Defaults to 10. + // +optional + optional int32 revisionHistoryLimit = 6; +} + +// ManagedSeedSetStatus represents the current state of a ManagedSeedSet. +message ManagedSeedSetStatus { + // ObservedGeneration is the most recent generation observed for this ManagedSeedSet. It corresponds to the + // ManagedSeedSet's generation, which is updated on mutation by the API Server. + optional int64 observedGeneration = 1; + + // Replicas is the number of replicas (ManagedSeeds and their corresponding Shoots) created by the ManagedSeedSet controller. + optional int32 replicas = 2; + + // ReadyReplicas is the number of ManagedSeeds created by the ManagedSeedSet controller that have a Ready Condition. + optional int32 readyReplicas = 3; + + // NextReplicaNumber is the ordinal number that will be assigned to the next replica of the ManagedSeedSet. + optional int32 nextReplicaNumber = 4; + + // CurrentReplicas is the number of ManagedSeeds created by the ManagedSeedSet controller from the ManagedSeedSet version + // indicated by CurrentRevision. + optional int32 currentReplicas = 5; + + // UpdatedReplicas is the number of ManagedSeeds created by the ManagedSeedSet controller from the ManagedSeedSet version + // indicated by UpdateRevision. + optional int32 updatedReplicas = 6; + + // CurrentRevision, if not empty, indicates the version of the ManagedSeedSet used to generate ManagedSeeds with smaller + // ordinal numbers during updates. + optional string currentRevision = 7; + + // UpdateRevision, if not empty, indicates the version of the ManagedSeedSet used to generate ManagedSeeds with larger + // ordinal numbers during updates + optional string updateRevision = 8; + + // CollisionCount is the count of hash collisions for the ManagedSeedSet. The ManagedSeedSet controller + // uses this field as a collision avoidance mechanism when it needs to create the name for the + // newest ControllerRevision. + // +optional + optional int32 collisionCount = 9; + + // Conditions represents the latest available observations of a ManagedSeedSet's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +optional + repeated github.com.gardener.gardener.pkg.apis.core.v1beta1.Condition conditions = 10; +} + +// ManagedSeedSpec is the specification of a ManagedSeed. +message ManagedSeedSpec { + // Shoot references a Shoot that should be registered as Seed. + // +optional + optional Shoot shoot = 1; + + // SeedTemplate is a template for a Seed object, that should be used to register a given cluster as a Seed. + // Either SeedTemplate or Gardenlet must be specified. When Seed is specified, the ManagedSeed controller will not deploy a gardenlet into the cluster + // and an existing gardenlet reconciling the new Seed is required. + // +optional + optional github.com.gardener.gardener.pkg.apis.core.v1beta1.SeedTemplate seedTemplate = 2; + + // Gardenlet specifies that the ManagedSeed controller should deploy a gardenlet into the cluster + // with the given deployment parameters and GardenletConfiguration. + // +optional + optional Gardenlet gardenlet = 3; +} + +// ManagedSeedStatus is the status of a ManagedSeed. +message ManagedSeedStatus { + // Conditions represents the latest available observations of a ManagedSeed's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +optional + repeated github.com.gardener.gardener.pkg.apis.core.v1beta1.Condition conditions = 1; + + // ObservedGeneration is the most recent generation observed for this ManagedSeed. It corresponds to the + // ManagedSeed's generation, which is updated on mutation by the API Server. + optional int64 observedGeneration = 2; +} + +// ManagedSeedTemplate is a template for creating a ManagedSeed object. +message ManagedSeedTemplate { + // Standard object metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the desired behavior of the ManagedSeed. + // +optional + optional ManagedSeedSpec spec = 2; +} + +// RollingUpdateStrategy is used to communicate parameters for RollingUpdateStrategyType. +message RollingUpdateStrategy { + // Partition indicates the ordinal at which the ManagedSeedSet should be partitioned. Defaults to 0. + // +optional + optional int32 partition = 1; +} + +// Shoot identifies the Shoot that should be registered as Seed. +message Shoot { + // Name is the name of the Shoot that will be registered as Seed. + optional string name = 1; +} + +// UpdateStrategy specifies the strategy that the ManagedSeedSet +// controller will use to perform updates. It includes any additional parameters +// necessary to perform the update for the indicated strategy. +message UpdateStrategy { + // Type indicates the type of the UpdateStrategy. Defaults to RollingUpdate. + // +optional + optional string type = 1; + + // RollingUpdate is used to communicate parameters when Type is RollingUpdateStrategyType. + // +optional + optional RollingUpdateStrategy rollingUpdate = 2; +} + diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/register.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/register.go new file mode 100644 index 00000000..a3a90a8b --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/register.go @@ -0,0 +1,57 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the name of the seedmanagement API group. +const GroupName = "seedmanagement.gardener.cloud" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +// Kind takes an unqualified kind and returns a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + // SchemeBuilder is a new Scheme Builder which registers our API. + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs) + localSchemeBuilder = &SchemeBuilder + // AddToScheme is a reference to the Scheme Builder's AddToScheme function. + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &ManagedSeed{}, + &ManagedSeedList{}, + &ManagedSeedSet{}, + &ManagedSeedSetList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/types_managedseed.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/types_managedseed.go new file mode 100644 index 00000000..6ec5b161 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/types_managedseed.go @@ -0,0 +1,191 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ManagedSeed represents a Shoot that is registered as Seed. +type ManagedSeed struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Specification of the ManagedSeed. + // +optional + Spec ManagedSeedSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + // Most recently observed status of the ManagedSeed. + // +optional + Status ManagedSeedStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ManagedSeedList is a list of ManagedSeed objects. +type ManagedSeedList struct { + metav1.TypeMeta `json:",inline"` + // Standard list object metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Items is the list of ManagedSeeds. + Items []ManagedSeed `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// ManagedSeedTemplate is a template for creating a ManagedSeed object. +type ManagedSeedTemplate struct { + // Standard object metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Specification of the desired behavior of the ManagedSeed. + // +optional + Spec ManagedSeedSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +// ManagedSeedSpec is the specification of a ManagedSeed. +type ManagedSeedSpec struct { + // Shoot references a Shoot that should be registered as Seed. + // +optional + Shoot *Shoot `json:"shoot,omitempty" protobuf:"bytes,1,opt,name=shoot"` + // SeedTemplate is a template for a Seed object, that should be used to register a given cluster as a Seed. + // Either SeedTemplate or Gardenlet must be specified. When Seed is specified, the ManagedSeed controller will not deploy a gardenlet into the cluster + // and an existing gardenlet reconciling the new Seed is required. + // +optional + SeedTemplate *gardencorev1beta1.SeedTemplate `json:"seedTemplate,omitempty" protobuf:"bytes,2,opt,name=seedTemplate"` + // Gardenlet specifies that the ManagedSeed controller should deploy a gardenlet into the cluster + // with the given deployment parameters and GardenletConfiguration. + // +optional + Gardenlet *Gardenlet `json:"gardenlet,omitempty" protobuf:"bytes,3,opt,name=gardenlet"` +} + +// Shoot identifies the Shoot that should be registered as Seed. +type Shoot struct { + // Name is the name of the Shoot that will be registered as Seed. + Name string `json:"name" protobuf:"bytes,1,opt,name=name"` +} + +// Gardenlet specifies gardenlet deployment parameters and the GardenletConfiguration used to configure gardenlet. +type Gardenlet struct { + // Deployment specifies certain gardenlet deployment parameters, such as the number of replicas, + // the image, etc. + // +optional + Deployment *GardenletDeployment `json:"deployment,omitempty" protobuf:"bytes,1,opt,name=deployment"` + // Config is the GardenletConfiguration used to configure gardenlet. + // +optional + Config runtime.RawExtension `json:"config,omitempty" protobuf:"bytes,2,opt,name=config"` + // Bootstrap is the mechanism that should be used for bootstrapping gardenlet connection to the Garden cluster. One of ServiceAccount, BootstrapToken, None. + // If set to ServiceAccount or BootstrapToken, a service account or a bootstrap token will be created in the garden cluster and used to compute the bootstrap kubeconfig. + // If set to None, the gardenClientConnection.kubeconfig field will be used to connect to the Garden cluster. Defaults to BootstrapToken. + // +optional + Bootstrap *Bootstrap `json:"bootstrap,omitempty" protobuf:"bytes,3,opt,name=bootstrap"` + // MergeWithParent specifies whether the GardenletConfiguration of the parent gardenlet + // should be merged with the specified GardenletConfiguration. Defaults to true. + // +optional + MergeWithParent *bool `json:"mergeWithParent,omitempty" protobuf:"varint,4,opt,name=mergeWithParent"` +} + +// GardenletDeployment specifies certain gardenlet deployment parameters, such as the number of replicas, +// the image, etc. +type GardenletDeployment struct { + // ReplicaCount is the number of gardenlet replicas. Defaults to 1. + // +optional + ReplicaCount *int32 `json:"replicaCount,omitempty" protobuf:"varint,1,opt,name=replicaCount"` + // RevisionHistoryLimit is the number of old gardenlet ReplicaSets to retain to allow rollback. Defaults to 1. + // +optional + RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,2,opt,name=revisionHistoryLimit"` + // ServiceAccountName is the name of the ServiceAccount to use to run gardenlet pods. + // +optional + ServiceAccountName *string `json:"serviceAccountName,omitempty" protobuf:"bytes,3,opt,name=serviceAccountName"` + // Image is the gardenlet container image. + // +optional + Image *Image `json:"image,omitempty" protobuf:"bytes,4,opt,name=image"` + // Resources are the compute resources required by the gardenlet container. + // +optional + Resources *corev1.ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,5,opt,name=resources"` + // PodLabels are the labels on gardenlet pods. + // +optional + PodLabels map[string]string `json:"podLabels,omitempty" protobuf:"bytes,6,opt,name=podLabels"` + // PodAnnotations are the annotations on gardenlet pods. + // +optional + PodAnnotations map[string]string `json:"podAnnotations,omitempty" protobuf:"bytes,7,opt,name=podAnnotations"` + // AdditionalVolumes is the list of additional volumes that should be mounted by gardenlet containers. + // +optional + AdditionalVolumes []corev1.Volume `json:"additionalVolumes,omitempty" protobuf:"bytes,8,rep,name=additionalVolumes"` + // AdditionalVolumeMounts is the list of additional pod volumes to mount into the gardenlet container's filesystem. + // +optional + AdditionalVolumeMounts []corev1.VolumeMount `json:"additionalVolumeMounts,omitempty" protobuf:"bytes,9,rep,name=additionalVolumeMounts"` + // Env is the list of environment variables to set in the gardenlet container. + // +optional + Env []corev1.EnvVar `json:"env,omitempty" protobuf:"bytes,10,rep,name=env"` + // VPA specifies whether to enable VPA for gardenlet. Defaults to true. + // +optional + VPA *bool `json:"vpa,omitempty" protobuf:"bytes,11,rep,name=vpa"` +} + +// Image specifies container image parameters. +type Image struct { + // Repository is the image repository. + // +optional + Repository *string `json:"repository,omitempty" protobuf:"bytes,1,opt,name=repository"` + // Tag is the image tag. + // +optional + Tag *string `json:"tag,omitempty" protobuf:"bytes,2,opt,name=tag"` + // PullPolicy is the image pull policy. One of Always, Never, IfNotPresent. + // Defaults to Always if latest tag is specified, or IfNotPresent otherwise. + // +optional + PullPolicy *corev1.PullPolicy `json:"pullPolicy,omitempty" protobuf:"bytes,3,opt,name=pullPolicy"` +} + +// Bootstrap describes a mechanism for bootstrapping gardenlet connection to the Garden cluster. +type Bootstrap string + +const ( + // BootstrapServiceAccount means that a temporary service account should be used for bootstrapping gardenlet connection to the Garden cluster. + BootstrapServiceAccount Bootstrap = "ServiceAccount" + // BootstrapToken means that a bootstrap token should be used for bootstrapping gardenlet connection to the Garden cluster. + BootstrapToken Bootstrap = "BootstrapToken" + // BootstrapNone means that gardenlet connection to the Garden cluster should not be bootstrapped + // and the gardenClientConnection.kubeconfig field should be used to connect to the Garden cluster. + BootstrapNone Bootstrap = "None" +) + +// ManagedSeedStatus is the status of a ManagedSeed. +type ManagedSeedStatus struct { + // Conditions represents the latest available observations of a ManagedSeed's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +optional + Conditions []gardencorev1beta1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` + // ObservedGeneration is the most recent generation observed for this ManagedSeed. It corresponds to the + // ManagedSeed's generation, which is updated on mutation by the API Server. + ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,2,opt,name=observedGeneration"` +} + +const ( + // ManagedSeedShootExists is a condition type for indicating whether the ManagedSeed's shoot exists. + ManagedSeedShootExists gardencorev1beta1.ConditionType = "ShootExists" + // ManagedSeedShootReconciled is a condition type for indicating whether the ManagedSeed's shoot has been reconciled. + ManagedSeedShootReconciled gardencorev1beta1.ConditionType = "ShootReconciled" + // ManagedSeedSeedRegistered is a condition type for indicating whether the ManagedSeed's seed has been registered, + // either directly or by deploying gardenlet into the shoot. + ManagedSeedSeedRegistered gardencorev1beta1.ConditionType = "SeedRegistered" +) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/types_managedseedset.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/types_managedseedset.go new file mode 100644 index 00000000..91bc279c --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/types_managedseedset.go @@ -0,0 +1,142 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ManagedSeedSet represents a set of identical ManagedSeeds. +type ManagedSeedSet struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Spec defines the desired identities of ManagedSeeds and Shoots in this set. + // +optional + Spec ManagedSeedSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + // Status is the current status of ManagedSeeds and Shoots in this ManagedSeedSet. + // +optional + Status ManagedSeedSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ManagedSeedSetList is a list of ManagedSeed objects. +type ManagedSeedSetList struct { + metav1.TypeMeta `json:",inline"` + // Standard list object metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Items is the list of ManagedSeedSets. + Items []ManagedSeedSet `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// ManagedSeedSetSpec is the specification of a ManagedSeedSet. +type ManagedSeedSetSpec struct { + // Replicas is the desired number of replicas of the given Template. Defaults to 1. + // +optional + Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` + // Selector is a label query over ManagedSeeds and Shoots that should match the replica count. + // It must match the ManagedSeeds and Shoots template's labels. + Selector metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"` + // Template describes the ManagedSeed that will be created if insufficient replicas are detected. + // Each ManagedSeed created / updated by the ManagedSeedSet will fulfill this template. + Template ManagedSeedTemplate `json:"template" protobuf:"bytes,3,opt,name=template"` + // ShootTemplate describes the Shoot that will be created if insufficient replicas are detected for hosting the corresponding ManagedSeed. + // Each Shoot created / updated by the ManagedSeedSet will fulfill this template. + ShootTemplate gardencorev1beta1.ShootTemplate `json:"shootTemplate" protobuf:"bytes,4,rep,name=shootTemplate"` + // UpdateStrategy specifies the UpdateStrategy that will be + // employed to update ManagedSeeds / Shoots in the ManagedSeedSet when a revision is made to + // Template / ShootTemplate. + // +optional + UpdateStrategy *UpdateStrategy `json:"updateStrategy,omitempty" protobuf:"bytes,5,opt,name=updateStrategy"` + // RevisionHistoryLimit is the maximum number of revisions that will + // be maintained in the ManagedSeedSet's revision history. Defaults to 10. + // +optional + RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"` +} + +// UpdateStrategy specifies the strategy that the ManagedSeedSet +// controller will use to perform updates. It includes any additional parameters +// necessary to perform the update for the indicated strategy. +type UpdateStrategy struct { + // Type indicates the type of the UpdateStrategy. Defaults to RollingUpdate. + // +optional + Type *UpdateStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=UpdateStrategyType"` + // RollingUpdate is used to communicate parameters when Type is RollingUpdateStrategyType. + // +optional + RollingUpdate *RollingUpdateStrategy `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"` +} + +// UpdateStrategyType is a string enumeration type that enumerates +// all possible update strategies for the ManagedSeedSet controller. +type UpdateStrategyType string + +const ( + // RollingUpdateStrategyType indicates that update will be + // applied to all ManagedSeeds / Shoots in the ManagedSeedSet with respect to the ManagedSeedSet + // ordering constraints. + RollingUpdateStrategyType UpdateStrategyType = "RollingUpdate" +) + +// RollingUpdateStrategy is used to communicate parameters for RollingUpdateStrategyType. +type RollingUpdateStrategy struct { + // Partition indicates the ordinal at which the ManagedSeedSet should be partitioned. Defaults to 0. + // +optional + Partition *int32 `json:"partition,omitempty" protobuf:"varint,1,opt,name=partition"` +} + +// ManagedSeedSetStatus represents the current state of a ManagedSeedSet. +type ManagedSeedSetStatus struct { + // ObservedGeneration is the most recent generation observed for this ManagedSeedSet. It corresponds to the + // ManagedSeedSet's generation, which is updated on mutation by the API Server. + ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` + // Replicas is the number of replicas (ManagedSeeds and their corresponding Shoots) created by the ManagedSeedSet controller. + Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"` + // ReadyReplicas is the number of ManagedSeeds created by the ManagedSeedSet controller that have a Ready Condition. + ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,3,opt,name=readyReplicas"` + // NextReplicaNumber is the ordinal number that will be assigned to the next replica of the ManagedSeedSet. + NextReplicaNumber int32 `json:"nextReplicaNumber,omitempty" protobuf:"bytes,4,opt,name=nextReplicaNumber"` + // CurrentReplicas is the number of ManagedSeeds created by the ManagedSeedSet controller from the ManagedSeedSet version + // indicated by CurrentRevision. + CurrentReplicas int32 `json:"currentReplicas,omitempty" protobuf:"varint,5,opt,name=currentReplicas"` + // UpdatedReplicas is the number of ManagedSeeds created by the ManagedSeedSet controller from the ManagedSeedSet version + // indicated by UpdateRevision. + UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,6,opt,name=updatedReplicas"` + // CurrentRevision, if not empty, indicates the version of the ManagedSeedSet used to generate ManagedSeeds with smaller + // ordinal numbers during updates. + CurrentRevision string `json:"currentRevision,omitempty" protobuf:"bytes,7,opt,name=currentRevision"` + // UpdateRevision, if not empty, indicates the version of the ManagedSeedSet used to generate ManagedSeeds with larger + // ordinal numbers during updates + UpdateRevision string `json:"updateRevision,omitempty" protobuf:"bytes,8,opt,name=updateRevision"` + // CollisionCount is the count of hash collisions for the ManagedSeedSet. The ManagedSeedSet controller + // uses this field as a collision avoidance mechanism when it needs to create the name for the + // newest ControllerRevision. + // +optional + CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,9,opt,name=collisionCount"` + // Conditions represents the latest available observations of a ManagedSeedSet's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +optional + Conditions []gardencorev1beta1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` +} + +// TODO Condition constants diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/zz_generated.conversion.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..34f66353 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,686 @@ +// +build !ignore_autogenerated + +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + unsafe "unsafe" + + core "github.com/gardener/gardener/pkg/apis/core" + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + seedmanagement "github.com/gardener/gardener/pkg/apis/seedmanagement" + v1 "k8s.io/api/core/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*GardenletDeployment)(nil), (*seedmanagement.GardenletDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_GardenletDeployment_To_seedmanagement_GardenletDeployment(a.(*GardenletDeployment), b.(*seedmanagement.GardenletDeployment), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*seedmanagement.GardenletDeployment)(nil), (*GardenletDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_seedmanagement_GardenletDeployment_To_v1alpha1_GardenletDeployment(a.(*seedmanagement.GardenletDeployment), b.(*GardenletDeployment), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Image)(nil), (*seedmanagement.Image)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Image_To_seedmanagement_Image(a.(*Image), b.(*seedmanagement.Image), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*seedmanagement.Image)(nil), (*Image)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_seedmanagement_Image_To_v1alpha1_Image(a.(*seedmanagement.Image), b.(*Image), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ManagedSeed)(nil), (*seedmanagement.ManagedSeed)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ManagedSeed_To_seedmanagement_ManagedSeed(a.(*ManagedSeed), b.(*seedmanagement.ManagedSeed), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*seedmanagement.ManagedSeed)(nil), (*ManagedSeed)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_seedmanagement_ManagedSeed_To_v1alpha1_ManagedSeed(a.(*seedmanagement.ManagedSeed), b.(*ManagedSeed), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ManagedSeedList)(nil), (*seedmanagement.ManagedSeedList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ManagedSeedList_To_seedmanagement_ManagedSeedList(a.(*ManagedSeedList), b.(*seedmanagement.ManagedSeedList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*seedmanagement.ManagedSeedList)(nil), (*ManagedSeedList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_seedmanagement_ManagedSeedList_To_v1alpha1_ManagedSeedList(a.(*seedmanagement.ManagedSeedList), b.(*ManagedSeedList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ManagedSeedSet)(nil), (*seedmanagement.ManagedSeedSet)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ManagedSeedSet_To_seedmanagement_ManagedSeedSet(a.(*ManagedSeedSet), b.(*seedmanagement.ManagedSeedSet), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*seedmanagement.ManagedSeedSet)(nil), (*ManagedSeedSet)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_seedmanagement_ManagedSeedSet_To_v1alpha1_ManagedSeedSet(a.(*seedmanagement.ManagedSeedSet), b.(*ManagedSeedSet), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ManagedSeedSetList)(nil), (*seedmanagement.ManagedSeedSetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ManagedSeedSetList_To_seedmanagement_ManagedSeedSetList(a.(*ManagedSeedSetList), b.(*seedmanagement.ManagedSeedSetList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*seedmanagement.ManagedSeedSetList)(nil), (*ManagedSeedSetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_seedmanagement_ManagedSeedSetList_To_v1alpha1_ManagedSeedSetList(a.(*seedmanagement.ManagedSeedSetList), b.(*ManagedSeedSetList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ManagedSeedSetSpec)(nil), (*seedmanagement.ManagedSeedSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ManagedSeedSetSpec_To_seedmanagement_ManagedSeedSetSpec(a.(*ManagedSeedSetSpec), b.(*seedmanagement.ManagedSeedSetSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*seedmanagement.ManagedSeedSetSpec)(nil), (*ManagedSeedSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_seedmanagement_ManagedSeedSetSpec_To_v1alpha1_ManagedSeedSetSpec(a.(*seedmanagement.ManagedSeedSetSpec), b.(*ManagedSeedSetSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ManagedSeedSetStatus)(nil), (*seedmanagement.ManagedSeedSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ManagedSeedSetStatus_To_seedmanagement_ManagedSeedSetStatus(a.(*ManagedSeedSetStatus), b.(*seedmanagement.ManagedSeedSetStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*seedmanagement.ManagedSeedSetStatus)(nil), (*ManagedSeedSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_seedmanagement_ManagedSeedSetStatus_To_v1alpha1_ManagedSeedSetStatus(a.(*seedmanagement.ManagedSeedSetStatus), b.(*ManagedSeedSetStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ManagedSeedSpec)(nil), (*seedmanagement.ManagedSeedSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ManagedSeedSpec_To_seedmanagement_ManagedSeedSpec(a.(*ManagedSeedSpec), b.(*seedmanagement.ManagedSeedSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*seedmanagement.ManagedSeedSpec)(nil), (*ManagedSeedSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_seedmanagement_ManagedSeedSpec_To_v1alpha1_ManagedSeedSpec(a.(*seedmanagement.ManagedSeedSpec), b.(*ManagedSeedSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ManagedSeedStatus)(nil), (*seedmanagement.ManagedSeedStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ManagedSeedStatus_To_seedmanagement_ManagedSeedStatus(a.(*ManagedSeedStatus), b.(*seedmanagement.ManagedSeedStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*seedmanagement.ManagedSeedStatus)(nil), (*ManagedSeedStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_seedmanagement_ManagedSeedStatus_To_v1alpha1_ManagedSeedStatus(a.(*seedmanagement.ManagedSeedStatus), b.(*ManagedSeedStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ManagedSeedTemplate)(nil), (*seedmanagement.ManagedSeedTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ManagedSeedTemplate_To_seedmanagement_ManagedSeedTemplate(a.(*ManagedSeedTemplate), b.(*seedmanagement.ManagedSeedTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*seedmanagement.ManagedSeedTemplate)(nil), (*ManagedSeedTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_seedmanagement_ManagedSeedTemplate_To_v1alpha1_ManagedSeedTemplate(a.(*seedmanagement.ManagedSeedTemplate), b.(*ManagedSeedTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RollingUpdateStrategy)(nil), (*seedmanagement.RollingUpdateStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_RollingUpdateStrategy_To_seedmanagement_RollingUpdateStrategy(a.(*RollingUpdateStrategy), b.(*seedmanagement.RollingUpdateStrategy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*seedmanagement.RollingUpdateStrategy)(nil), (*RollingUpdateStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_seedmanagement_RollingUpdateStrategy_To_v1alpha1_RollingUpdateStrategy(a.(*seedmanagement.RollingUpdateStrategy), b.(*RollingUpdateStrategy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Shoot)(nil), (*seedmanagement.Shoot)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Shoot_To_seedmanagement_Shoot(a.(*Shoot), b.(*seedmanagement.Shoot), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*seedmanagement.Shoot)(nil), (*Shoot)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_seedmanagement_Shoot_To_v1alpha1_Shoot(a.(*seedmanagement.Shoot), b.(*Shoot), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UpdateStrategy)(nil), (*seedmanagement.UpdateStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_UpdateStrategy_To_seedmanagement_UpdateStrategy(a.(*UpdateStrategy), b.(*seedmanagement.UpdateStrategy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*seedmanagement.UpdateStrategy)(nil), (*UpdateStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_seedmanagement_UpdateStrategy_To_v1alpha1_UpdateStrategy(a.(*seedmanagement.UpdateStrategy), b.(*UpdateStrategy), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*core.SeedTemplate)(nil), (*v1beta1.SeedTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_SeedTemplate_To_v1beta1_SeedTemplate(a.(*core.SeedTemplate), b.(*v1beta1.SeedTemplate), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*core.ShootTemplate)(nil), (*v1beta1.ShootTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ShootTemplate_To_v1beta1_ShootTemplate(a.(*core.ShootTemplate), b.(*v1beta1.ShootTemplate), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*seedmanagement.Gardenlet)(nil), (*Gardenlet)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_seedmanagement_Gardenlet_To_v1alpha1_Gardenlet(a.(*seedmanagement.Gardenlet), b.(*Gardenlet), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Gardenlet)(nil), (*seedmanagement.Gardenlet)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Gardenlet_To_seedmanagement_Gardenlet(a.(*Gardenlet), b.(*seedmanagement.Gardenlet), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1beta1.SeedTemplate)(nil), (*core.SeedTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedTemplate_To_core_SeedTemplate(a.(*v1beta1.SeedTemplate), b.(*core.SeedTemplate), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1beta1.ShootTemplate)(nil), (*core.ShootTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ShootTemplate_To_core_ShootTemplate(a.(*v1beta1.ShootTemplate), b.(*core.ShootTemplate), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_Gardenlet_To_seedmanagement_Gardenlet(in *Gardenlet, out *seedmanagement.Gardenlet, s conversion.Scope) error { + out.Deployment = (*seedmanagement.GardenletDeployment)(unsafe.Pointer(in.Deployment)) + if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.Config, &out.Config, s); err != nil { + return err + } + out.Bootstrap = (*seedmanagement.Bootstrap)(unsafe.Pointer(in.Bootstrap)) + out.MergeWithParent = (*bool)(unsafe.Pointer(in.MergeWithParent)) + return nil +} + +func autoConvert_seedmanagement_Gardenlet_To_v1alpha1_Gardenlet(in *seedmanagement.Gardenlet, out *Gardenlet, s conversion.Scope) error { + out.Deployment = (*GardenletDeployment)(unsafe.Pointer(in.Deployment)) + if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.Config, &out.Config, s); err != nil { + return err + } + out.Bootstrap = (*Bootstrap)(unsafe.Pointer(in.Bootstrap)) + out.MergeWithParent = (*bool)(unsafe.Pointer(in.MergeWithParent)) + return nil +} + +func autoConvert_v1alpha1_GardenletDeployment_To_seedmanagement_GardenletDeployment(in *GardenletDeployment, out *seedmanagement.GardenletDeployment, s conversion.Scope) error { + out.ReplicaCount = (*int32)(unsafe.Pointer(in.ReplicaCount)) + out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit)) + out.ServiceAccountName = (*string)(unsafe.Pointer(in.ServiceAccountName)) + out.Image = (*seedmanagement.Image)(unsafe.Pointer(in.Image)) + out.Resources = (*v1.ResourceRequirements)(unsafe.Pointer(in.Resources)) + out.PodLabels = *(*map[string]string)(unsafe.Pointer(&in.PodLabels)) + out.PodAnnotations = *(*map[string]string)(unsafe.Pointer(&in.PodAnnotations)) + out.AdditionalVolumes = *(*[]v1.Volume)(unsafe.Pointer(&in.AdditionalVolumes)) + out.AdditionalVolumeMounts = *(*[]v1.VolumeMount)(unsafe.Pointer(&in.AdditionalVolumeMounts)) + out.Env = *(*[]v1.EnvVar)(unsafe.Pointer(&in.Env)) + out.VPA = (*bool)(unsafe.Pointer(in.VPA)) + return nil +} + +// Convert_v1alpha1_GardenletDeployment_To_seedmanagement_GardenletDeployment is an autogenerated conversion function. +func Convert_v1alpha1_GardenletDeployment_To_seedmanagement_GardenletDeployment(in *GardenletDeployment, out *seedmanagement.GardenletDeployment, s conversion.Scope) error { + return autoConvert_v1alpha1_GardenletDeployment_To_seedmanagement_GardenletDeployment(in, out, s) +} + +func autoConvert_seedmanagement_GardenletDeployment_To_v1alpha1_GardenletDeployment(in *seedmanagement.GardenletDeployment, out *GardenletDeployment, s conversion.Scope) error { + out.ReplicaCount = (*int32)(unsafe.Pointer(in.ReplicaCount)) + out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit)) + out.ServiceAccountName = (*string)(unsafe.Pointer(in.ServiceAccountName)) + out.Image = (*Image)(unsafe.Pointer(in.Image)) + out.Resources = (*v1.ResourceRequirements)(unsafe.Pointer(in.Resources)) + out.PodLabels = *(*map[string]string)(unsafe.Pointer(&in.PodLabels)) + out.PodAnnotations = *(*map[string]string)(unsafe.Pointer(&in.PodAnnotations)) + out.AdditionalVolumes = *(*[]v1.Volume)(unsafe.Pointer(&in.AdditionalVolumes)) + out.AdditionalVolumeMounts = *(*[]v1.VolumeMount)(unsafe.Pointer(&in.AdditionalVolumeMounts)) + out.Env = *(*[]v1.EnvVar)(unsafe.Pointer(&in.Env)) + out.VPA = (*bool)(unsafe.Pointer(in.VPA)) + return nil +} + +// Convert_seedmanagement_GardenletDeployment_To_v1alpha1_GardenletDeployment is an autogenerated conversion function. +func Convert_seedmanagement_GardenletDeployment_To_v1alpha1_GardenletDeployment(in *seedmanagement.GardenletDeployment, out *GardenletDeployment, s conversion.Scope) error { + return autoConvert_seedmanagement_GardenletDeployment_To_v1alpha1_GardenletDeployment(in, out, s) +} + +func autoConvert_v1alpha1_Image_To_seedmanagement_Image(in *Image, out *seedmanagement.Image, s conversion.Scope) error { + out.Repository = (*string)(unsafe.Pointer(in.Repository)) + out.Tag = (*string)(unsafe.Pointer(in.Tag)) + out.PullPolicy = (*v1.PullPolicy)(unsafe.Pointer(in.PullPolicy)) + return nil +} + +// Convert_v1alpha1_Image_To_seedmanagement_Image is an autogenerated conversion function. +func Convert_v1alpha1_Image_To_seedmanagement_Image(in *Image, out *seedmanagement.Image, s conversion.Scope) error { + return autoConvert_v1alpha1_Image_To_seedmanagement_Image(in, out, s) +} + +func autoConvert_seedmanagement_Image_To_v1alpha1_Image(in *seedmanagement.Image, out *Image, s conversion.Scope) error { + out.Repository = (*string)(unsafe.Pointer(in.Repository)) + out.Tag = (*string)(unsafe.Pointer(in.Tag)) + out.PullPolicy = (*v1.PullPolicy)(unsafe.Pointer(in.PullPolicy)) + return nil +} + +// Convert_seedmanagement_Image_To_v1alpha1_Image is an autogenerated conversion function. +func Convert_seedmanagement_Image_To_v1alpha1_Image(in *seedmanagement.Image, out *Image, s conversion.Scope) error { + return autoConvert_seedmanagement_Image_To_v1alpha1_Image(in, out, s) +} + +func autoConvert_v1alpha1_ManagedSeed_To_seedmanagement_ManagedSeed(in *ManagedSeed, out *seedmanagement.ManagedSeed, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_ManagedSeedSpec_To_seedmanagement_ManagedSeedSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_ManagedSeedStatus_To_seedmanagement_ManagedSeedStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_ManagedSeed_To_seedmanagement_ManagedSeed is an autogenerated conversion function. +func Convert_v1alpha1_ManagedSeed_To_seedmanagement_ManagedSeed(in *ManagedSeed, out *seedmanagement.ManagedSeed, s conversion.Scope) error { + return autoConvert_v1alpha1_ManagedSeed_To_seedmanagement_ManagedSeed(in, out, s) +} + +func autoConvert_seedmanagement_ManagedSeed_To_v1alpha1_ManagedSeed(in *seedmanagement.ManagedSeed, out *ManagedSeed, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_seedmanagement_ManagedSeedSpec_To_v1alpha1_ManagedSeedSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_seedmanagement_ManagedSeedStatus_To_v1alpha1_ManagedSeedStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_seedmanagement_ManagedSeed_To_v1alpha1_ManagedSeed is an autogenerated conversion function. +func Convert_seedmanagement_ManagedSeed_To_v1alpha1_ManagedSeed(in *seedmanagement.ManagedSeed, out *ManagedSeed, s conversion.Scope) error { + return autoConvert_seedmanagement_ManagedSeed_To_v1alpha1_ManagedSeed(in, out, s) +} + +func autoConvert_v1alpha1_ManagedSeedList_To_seedmanagement_ManagedSeedList(in *ManagedSeedList, out *seedmanagement.ManagedSeedList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]seedmanagement.ManagedSeed, len(*in)) + for i := range *in { + if err := Convert_v1alpha1_ManagedSeed_To_seedmanagement_ManagedSeed(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha1_ManagedSeedList_To_seedmanagement_ManagedSeedList is an autogenerated conversion function. +func Convert_v1alpha1_ManagedSeedList_To_seedmanagement_ManagedSeedList(in *ManagedSeedList, out *seedmanagement.ManagedSeedList, s conversion.Scope) error { + return autoConvert_v1alpha1_ManagedSeedList_To_seedmanagement_ManagedSeedList(in, out, s) +} + +func autoConvert_seedmanagement_ManagedSeedList_To_v1alpha1_ManagedSeedList(in *seedmanagement.ManagedSeedList, out *ManagedSeedList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ManagedSeed, len(*in)) + for i := range *in { + if err := Convert_seedmanagement_ManagedSeed_To_v1alpha1_ManagedSeed(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_seedmanagement_ManagedSeedList_To_v1alpha1_ManagedSeedList is an autogenerated conversion function. +func Convert_seedmanagement_ManagedSeedList_To_v1alpha1_ManagedSeedList(in *seedmanagement.ManagedSeedList, out *ManagedSeedList, s conversion.Scope) error { + return autoConvert_seedmanagement_ManagedSeedList_To_v1alpha1_ManagedSeedList(in, out, s) +} + +func autoConvert_v1alpha1_ManagedSeedSet_To_seedmanagement_ManagedSeedSet(in *ManagedSeedSet, out *seedmanagement.ManagedSeedSet, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_ManagedSeedSetSpec_To_seedmanagement_ManagedSeedSetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_ManagedSeedSetStatus_To_seedmanagement_ManagedSeedSetStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_ManagedSeedSet_To_seedmanagement_ManagedSeedSet is an autogenerated conversion function. +func Convert_v1alpha1_ManagedSeedSet_To_seedmanagement_ManagedSeedSet(in *ManagedSeedSet, out *seedmanagement.ManagedSeedSet, s conversion.Scope) error { + return autoConvert_v1alpha1_ManagedSeedSet_To_seedmanagement_ManagedSeedSet(in, out, s) +} + +func autoConvert_seedmanagement_ManagedSeedSet_To_v1alpha1_ManagedSeedSet(in *seedmanagement.ManagedSeedSet, out *ManagedSeedSet, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_seedmanagement_ManagedSeedSetSpec_To_v1alpha1_ManagedSeedSetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_seedmanagement_ManagedSeedSetStatus_To_v1alpha1_ManagedSeedSetStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_seedmanagement_ManagedSeedSet_To_v1alpha1_ManagedSeedSet is an autogenerated conversion function. +func Convert_seedmanagement_ManagedSeedSet_To_v1alpha1_ManagedSeedSet(in *seedmanagement.ManagedSeedSet, out *ManagedSeedSet, s conversion.Scope) error { + return autoConvert_seedmanagement_ManagedSeedSet_To_v1alpha1_ManagedSeedSet(in, out, s) +} + +func autoConvert_v1alpha1_ManagedSeedSetList_To_seedmanagement_ManagedSeedSetList(in *ManagedSeedSetList, out *seedmanagement.ManagedSeedSetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]seedmanagement.ManagedSeedSet, len(*in)) + for i := range *in { + if err := Convert_v1alpha1_ManagedSeedSet_To_seedmanagement_ManagedSeedSet(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha1_ManagedSeedSetList_To_seedmanagement_ManagedSeedSetList is an autogenerated conversion function. +func Convert_v1alpha1_ManagedSeedSetList_To_seedmanagement_ManagedSeedSetList(in *ManagedSeedSetList, out *seedmanagement.ManagedSeedSetList, s conversion.Scope) error { + return autoConvert_v1alpha1_ManagedSeedSetList_To_seedmanagement_ManagedSeedSetList(in, out, s) +} + +func autoConvert_seedmanagement_ManagedSeedSetList_To_v1alpha1_ManagedSeedSetList(in *seedmanagement.ManagedSeedSetList, out *ManagedSeedSetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ManagedSeedSet, len(*in)) + for i := range *in { + if err := Convert_seedmanagement_ManagedSeedSet_To_v1alpha1_ManagedSeedSet(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_seedmanagement_ManagedSeedSetList_To_v1alpha1_ManagedSeedSetList is an autogenerated conversion function. +func Convert_seedmanagement_ManagedSeedSetList_To_v1alpha1_ManagedSeedSetList(in *seedmanagement.ManagedSeedSetList, out *ManagedSeedSetList, s conversion.Scope) error { + return autoConvert_seedmanagement_ManagedSeedSetList_To_v1alpha1_ManagedSeedSetList(in, out, s) +} + +func autoConvert_v1alpha1_ManagedSeedSetSpec_To_seedmanagement_ManagedSeedSetSpec(in *ManagedSeedSetSpec, out *seedmanagement.ManagedSeedSetSpec, s conversion.Scope) error { + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + out.Selector = in.Selector + if err := Convert_v1alpha1_ManagedSeedTemplate_To_seedmanagement_ManagedSeedTemplate(&in.Template, &out.Template, s); err != nil { + return err + } + if err := Convert_v1beta1_ShootTemplate_To_core_ShootTemplate(&in.ShootTemplate, &out.ShootTemplate, s); err != nil { + return err + } + out.UpdateStrategy = (*seedmanagement.UpdateStrategy)(unsafe.Pointer(in.UpdateStrategy)) + out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit)) + return nil +} + +// Convert_v1alpha1_ManagedSeedSetSpec_To_seedmanagement_ManagedSeedSetSpec is an autogenerated conversion function. +func Convert_v1alpha1_ManagedSeedSetSpec_To_seedmanagement_ManagedSeedSetSpec(in *ManagedSeedSetSpec, out *seedmanagement.ManagedSeedSetSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_ManagedSeedSetSpec_To_seedmanagement_ManagedSeedSetSpec(in, out, s) +} + +func autoConvert_seedmanagement_ManagedSeedSetSpec_To_v1alpha1_ManagedSeedSetSpec(in *seedmanagement.ManagedSeedSetSpec, out *ManagedSeedSetSpec, s conversion.Scope) error { + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + out.Selector = in.Selector + if err := Convert_seedmanagement_ManagedSeedTemplate_To_v1alpha1_ManagedSeedTemplate(&in.Template, &out.Template, s); err != nil { + return err + } + if err := Convert_core_ShootTemplate_To_v1beta1_ShootTemplate(&in.ShootTemplate, &out.ShootTemplate, s); err != nil { + return err + } + out.UpdateStrategy = (*UpdateStrategy)(unsafe.Pointer(in.UpdateStrategy)) + out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit)) + return nil +} + +// Convert_seedmanagement_ManagedSeedSetSpec_To_v1alpha1_ManagedSeedSetSpec is an autogenerated conversion function. +func Convert_seedmanagement_ManagedSeedSetSpec_To_v1alpha1_ManagedSeedSetSpec(in *seedmanagement.ManagedSeedSetSpec, out *ManagedSeedSetSpec, s conversion.Scope) error { + return autoConvert_seedmanagement_ManagedSeedSetSpec_To_v1alpha1_ManagedSeedSetSpec(in, out, s) +} + +func autoConvert_v1alpha1_ManagedSeedSetStatus_To_seedmanagement_ManagedSeedSetStatus(in *ManagedSeedSetStatus, out *seedmanagement.ManagedSeedSetStatus, s conversion.Scope) error { + out.ObservedGeneration = in.ObservedGeneration + out.Replicas = in.Replicas + out.ReadyReplicas = in.ReadyReplicas + out.NextReplicaNumber = in.NextReplicaNumber + out.CurrentReplicas = in.CurrentReplicas + out.UpdatedReplicas = in.UpdatedReplicas + out.CurrentRevision = in.CurrentRevision + out.UpdateRevision = in.UpdateRevision + out.CollisionCount = (*int32)(unsafe.Pointer(in.CollisionCount)) + out.Conditions = *(*[]core.Condition)(unsafe.Pointer(&in.Conditions)) + return nil +} + +// Convert_v1alpha1_ManagedSeedSetStatus_To_seedmanagement_ManagedSeedSetStatus is an autogenerated conversion function. +func Convert_v1alpha1_ManagedSeedSetStatus_To_seedmanagement_ManagedSeedSetStatus(in *ManagedSeedSetStatus, out *seedmanagement.ManagedSeedSetStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_ManagedSeedSetStatus_To_seedmanagement_ManagedSeedSetStatus(in, out, s) +} + +func autoConvert_seedmanagement_ManagedSeedSetStatus_To_v1alpha1_ManagedSeedSetStatus(in *seedmanagement.ManagedSeedSetStatus, out *ManagedSeedSetStatus, s conversion.Scope) error { + out.ObservedGeneration = in.ObservedGeneration + out.Replicas = in.Replicas + out.ReadyReplicas = in.ReadyReplicas + out.NextReplicaNumber = in.NextReplicaNumber + out.CurrentReplicas = in.CurrentReplicas + out.UpdatedReplicas = in.UpdatedReplicas + out.CurrentRevision = in.CurrentRevision + out.UpdateRevision = in.UpdateRevision + out.CollisionCount = (*int32)(unsafe.Pointer(in.CollisionCount)) + out.Conditions = *(*[]v1beta1.Condition)(unsafe.Pointer(&in.Conditions)) + return nil +} + +// Convert_seedmanagement_ManagedSeedSetStatus_To_v1alpha1_ManagedSeedSetStatus is an autogenerated conversion function. +func Convert_seedmanagement_ManagedSeedSetStatus_To_v1alpha1_ManagedSeedSetStatus(in *seedmanagement.ManagedSeedSetStatus, out *ManagedSeedSetStatus, s conversion.Scope) error { + return autoConvert_seedmanagement_ManagedSeedSetStatus_To_v1alpha1_ManagedSeedSetStatus(in, out, s) +} + +func autoConvert_v1alpha1_ManagedSeedSpec_To_seedmanagement_ManagedSeedSpec(in *ManagedSeedSpec, out *seedmanagement.ManagedSeedSpec, s conversion.Scope) error { + out.Shoot = (*seedmanagement.Shoot)(unsafe.Pointer(in.Shoot)) + if in.SeedTemplate != nil { + in, out := &in.SeedTemplate, &out.SeedTemplate + *out = new(core.SeedTemplate) + if err := Convert_v1beta1_SeedTemplate_To_core_SeedTemplate(*in, *out, s); err != nil { + return err + } + } else { + out.SeedTemplate = nil + } + if in.Gardenlet != nil { + in, out := &in.Gardenlet, &out.Gardenlet + *out = new(seedmanagement.Gardenlet) + if err := Convert_v1alpha1_Gardenlet_To_seedmanagement_Gardenlet(*in, *out, s); err != nil { + return err + } + } else { + out.Gardenlet = nil + } + return nil +} + +// Convert_v1alpha1_ManagedSeedSpec_To_seedmanagement_ManagedSeedSpec is an autogenerated conversion function. +func Convert_v1alpha1_ManagedSeedSpec_To_seedmanagement_ManagedSeedSpec(in *ManagedSeedSpec, out *seedmanagement.ManagedSeedSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_ManagedSeedSpec_To_seedmanagement_ManagedSeedSpec(in, out, s) +} + +func autoConvert_seedmanagement_ManagedSeedSpec_To_v1alpha1_ManagedSeedSpec(in *seedmanagement.ManagedSeedSpec, out *ManagedSeedSpec, s conversion.Scope) error { + out.Shoot = (*Shoot)(unsafe.Pointer(in.Shoot)) + if in.SeedTemplate != nil { + in, out := &in.SeedTemplate, &out.SeedTemplate + *out = new(v1beta1.SeedTemplate) + if err := Convert_core_SeedTemplate_To_v1beta1_SeedTemplate(*in, *out, s); err != nil { + return err + } + } else { + out.SeedTemplate = nil + } + if in.Gardenlet != nil { + in, out := &in.Gardenlet, &out.Gardenlet + *out = new(Gardenlet) + if err := Convert_seedmanagement_Gardenlet_To_v1alpha1_Gardenlet(*in, *out, s); err != nil { + return err + } + } else { + out.Gardenlet = nil + } + return nil +} + +// Convert_seedmanagement_ManagedSeedSpec_To_v1alpha1_ManagedSeedSpec is an autogenerated conversion function. +func Convert_seedmanagement_ManagedSeedSpec_To_v1alpha1_ManagedSeedSpec(in *seedmanagement.ManagedSeedSpec, out *ManagedSeedSpec, s conversion.Scope) error { + return autoConvert_seedmanagement_ManagedSeedSpec_To_v1alpha1_ManagedSeedSpec(in, out, s) +} + +func autoConvert_v1alpha1_ManagedSeedStatus_To_seedmanagement_ManagedSeedStatus(in *ManagedSeedStatus, out *seedmanagement.ManagedSeedStatus, s conversion.Scope) error { + out.Conditions = *(*[]core.Condition)(unsafe.Pointer(&in.Conditions)) + out.ObservedGeneration = in.ObservedGeneration + return nil +} + +// Convert_v1alpha1_ManagedSeedStatus_To_seedmanagement_ManagedSeedStatus is an autogenerated conversion function. +func Convert_v1alpha1_ManagedSeedStatus_To_seedmanagement_ManagedSeedStatus(in *ManagedSeedStatus, out *seedmanagement.ManagedSeedStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_ManagedSeedStatus_To_seedmanagement_ManagedSeedStatus(in, out, s) +} + +func autoConvert_seedmanagement_ManagedSeedStatus_To_v1alpha1_ManagedSeedStatus(in *seedmanagement.ManagedSeedStatus, out *ManagedSeedStatus, s conversion.Scope) error { + out.Conditions = *(*[]v1beta1.Condition)(unsafe.Pointer(&in.Conditions)) + out.ObservedGeneration = in.ObservedGeneration + return nil +} + +// Convert_seedmanagement_ManagedSeedStatus_To_v1alpha1_ManagedSeedStatus is an autogenerated conversion function. +func Convert_seedmanagement_ManagedSeedStatus_To_v1alpha1_ManagedSeedStatus(in *seedmanagement.ManagedSeedStatus, out *ManagedSeedStatus, s conversion.Scope) error { + return autoConvert_seedmanagement_ManagedSeedStatus_To_v1alpha1_ManagedSeedStatus(in, out, s) +} + +func autoConvert_v1alpha1_ManagedSeedTemplate_To_seedmanagement_ManagedSeedTemplate(in *ManagedSeedTemplate, out *seedmanagement.ManagedSeedTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_ManagedSeedSpec_To_seedmanagement_ManagedSeedSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_ManagedSeedTemplate_To_seedmanagement_ManagedSeedTemplate is an autogenerated conversion function. +func Convert_v1alpha1_ManagedSeedTemplate_To_seedmanagement_ManagedSeedTemplate(in *ManagedSeedTemplate, out *seedmanagement.ManagedSeedTemplate, s conversion.Scope) error { + return autoConvert_v1alpha1_ManagedSeedTemplate_To_seedmanagement_ManagedSeedTemplate(in, out, s) +} + +func autoConvert_seedmanagement_ManagedSeedTemplate_To_v1alpha1_ManagedSeedTemplate(in *seedmanagement.ManagedSeedTemplate, out *ManagedSeedTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_seedmanagement_ManagedSeedSpec_To_v1alpha1_ManagedSeedSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_seedmanagement_ManagedSeedTemplate_To_v1alpha1_ManagedSeedTemplate is an autogenerated conversion function. +func Convert_seedmanagement_ManagedSeedTemplate_To_v1alpha1_ManagedSeedTemplate(in *seedmanagement.ManagedSeedTemplate, out *ManagedSeedTemplate, s conversion.Scope) error { + return autoConvert_seedmanagement_ManagedSeedTemplate_To_v1alpha1_ManagedSeedTemplate(in, out, s) +} + +func autoConvert_v1alpha1_RollingUpdateStrategy_To_seedmanagement_RollingUpdateStrategy(in *RollingUpdateStrategy, out *seedmanagement.RollingUpdateStrategy, s conversion.Scope) error { + out.Partition = (*int32)(unsafe.Pointer(in.Partition)) + return nil +} + +// Convert_v1alpha1_RollingUpdateStrategy_To_seedmanagement_RollingUpdateStrategy is an autogenerated conversion function. +func Convert_v1alpha1_RollingUpdateStrategy_To_seedmanagement_RollingUpdateStrategy(in *RollingUpdateStrategy, out *seedmanagement.RollingUpdateStrategy, s conversion.Scope) error { + return autoConvert_v1alpha1_RollingUpdateStrategy_To_seedmanagement_RollingUpdateStrategy(in, out, s) +} + +func autoConvert_seedmanagement_RollingUpdateStrategy_To_v1alpha1_RollingUpdateStrategy(in *seedmanagement.RollingUpdateStrategy, out *RollingUpdateStrategy, s conversion.Scope) error { + out.Partition = (*int32)(unsafe.Pointer(in.Partition)) + return nil +} + +// Convert_seedmanagement_RollingUpdateStrategy_To_v1alpha1_RollingUpdateStrategy is an autogenerated conversion function. +func Convert_seedmanagement_RollingUpdateStrategy_To_v1alpha1_RollingUpdateStrategy(in *seedmanagement.RollingUpdateStrategy, out *RollingUpdateStrategy, s conversion.Scope) error { + return autoConvert_seedmanagement_RollingUpdateStrategy_To_v1alpha1_RollingUpdateStrategy(in, out, s) +} + +func autoConvert_v1alpha1_Shoot_To_seedmanagement_Shoot(in *Shoot, out *seedmanagement.Shoot, s conversion.Scope) error { + out.Name = in.Name + return nil +} + +// Convert_v1alpha1_Shoot_To_seedmanagement_Shoot is an autogenerated conversion function. +func Convert_v1alpha1_Shoot_To_seedmanagement_Shoot(in *Shoot, out *seedmanagement.Shoot, s conversion.Scope) error { + return autoConvert_v1alpha1_Shoot_To_seedmanagement_Shoot(in, out, s) +} + +func autoConvert_seedmanagement_Shoot_To_v1alpha1_Shoot(in *seedmanagement.Shoot, out *Shoot, s conversion.Scope) error { + out.Name = in.Name + return nil +} + +// Convert_seedmanagement_Shoot_To_v1alpha1_Shoot is an autogenerated conversion function. +func Convert_seedmanagement_Shoot_To_v1alpha1_Shoot(in *seedmanagement.Shoot, out *Shoot, s conversion.Scope) error { + return autoConvert_seedmanagement_Shoot_To_v1alpha1_Shoot(in, out, s) +} + +func autoConvert_v1alpha1_UpdateStrategy_To_seedmanagement_UpdateStrategy(in *UpdateStrategy, out *seedmanagement.UpdateStrategy, s conversion.Scope) error { + out.Type = (*seedmanagement.UpdateStrategyType)(unsafe.Pointer(in.Type)) + out.RollingUpdate = (*seedmanagement.RollingUpdateStrategy)(unsafe.Pointer(in.RollingUpdate)) + return nil +} + +// Convert_v1alpha1_UpdateStrategy_To_seedmanagement_UpdateStrategy is an autogenerated conversion function. +func Convert_v1alpha1_UpdateStrategy_To_seedmanagement_UpdateStrategy(in *UpdateStrategy, out *seedmanagement.UpdateStrategy, s conversion.Scope) error { + return autoConvert_v1alpha1_UpdateStrategy_To_seedmanagement_UpdateStrategy(in, out, s) +} + +func autoConvert_seedmanagement_UpdateStrategy_To_v1alpha1_UpdateStrategy(in *seedmanagement.UpdateStrategy, out *UpdateStrategy, s conversion.Scope) error { + out.Type = (*UpdateStrategyType)(unsafe.Pointer(in.Type)) + out.RollingUpdate = (*RollingUpdateStrategy)(unsafe.Pointer(in.RollingUpdate)) + return nil +} + +// Convert_seedmanagement_UpdateStrategy_To_v1alpha1_UpdateStrategy is an autogenerated conversion function. +func Convert_seedmanagement_UpdateStrategy_To_v1alpha1_UpdateStrategy(in *seedmanagement.UpdateStrategy, out *UpdateStrategy, s conversion.Scope) error { + return autoConvert_seedmanagement_UpdateStrategy_To_v1alpha1_UpdateStrategy(in, out, s) +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000..e9fa5272 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,490 @@ +// +build !ignore_autogenerated + +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1 "k8s.io/api/core/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Gardenlet) DeepCopyInto(out *Gardenlet) { + *out = *in + if in.Deployment != nil { + in, out := &in.Deployment, &out.Deployment + *out = new(GardenletDeployment) + (*in).DeepCopyInto(*out) + } + in.Config.DeepCopyInto(&out.Config) + if in.Bootstrap != nil { + in, out := &in.Bootstrap, &out.Bootstrap + *out = new(Bootstrap) + **out = **in + } + if in.MergeWithParent != nil { + in, out := &in.MergeWithParent, &out.MergeWithParent + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Gardenlet. +func (in *Gardenlet) DeepCopy() *Gardenlet { + if in == nil { + return nil + } + out := new(Gardenlet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GardenletDeployment) DeepCopyInto(out *GardenletDeployment) { + *out = *in + if in.ReplicaCount != nil { + in, out := &in.ReplicaCount, &out.ReplicaCount + *out = new(int32) + **out = **in + } + if in.RevisionHistoryLimit != nil { + in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit + *out = new(int32) + **out = **in + } + if in.ServiceAccountName != nil { + in, out := &in.ServiceAccountName, &out.ServiceAccountName + *out = new(string) + **out = **in + } + if in.Image != nil { + in, out := &in.Image, &out.Image + *out = new(Image) + (*in).DeepCopyInto(*out) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = new(v1.ResourceRequirements) + (*in).DeepCopyInto(*out) + } + if in.PodLabels != nil { + in, out := &in.PodLabels, &out.PodLabels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.PodAnnotations != nil { + in, out := &in.PodAnnotations, &out.PodAnnotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.AdditionalVolumes != nil { + in, out := &in.AdditionalVolumes, &out.AdditionalVolumes + *out = make([]v1.Volume, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.AdditionalVolumeMounts != nil { + in, out := &in.AdditionalVolumeMounts, &out.AdditionalVolumeMounts + *out = make([]v1.VolumeMount, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VPA != nil { + in, out := &in.VPA, &out.VPA + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GardenletDeployment. +func (in *GardenletDeployment) DeepCopy() *GardenletDeployment { + if in == nil { + return nil + } + out := new(GardenletDeployment) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Image) DeepCopyInto(out *Image) { + *out = *in + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(string) + **out = **in + } + if in.Tag != nil { + in, out := &in.Tag, &out.Tag + *out = new(string) + **out = **in + } + if in.PullPolicy != nil { + in, out := &in.PullPolicy, &out.PullPolicy + *out = new(v1.PullPolicy) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image. +func (in *Image) DeepCopy() *Image { + if in == nil { + return nil + } + out := new(Image) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeed) DeepCopyInto(out *ManagedSeed) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeed. +func (in *ManagedSeed) DeepCopy() *ManagedSeed { + if in == nil { + return nil + } + out := new(ManagedSeed) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ManagedSeed) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedList) DeepCopyInto(out *ManagedSeedList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ManagedSeed, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedList. +func (in *ManagedSeedList) DeepCopy() *ManagedSeedList { + if in == nil { + return nil + } + out := new(ManagedSeedList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ManagedSeedList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedSet) DeepCopyInto(out *ManagedSeedSet) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedSet. +func (in *ManagedSeedSet) DeepCopy() *ManagedSeedSet { + if in == nil { + return nil + } + out := new(ManagedSeedSet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ManagedSeedSet) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedSetList) DeepCopyInto(out *ManagedSeedSetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ManagedSeedSet, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedSetList. +func (in *ManagedSeedSetList) DeepCopy() *ManagedSeedSetList { + if in == nil { + return nil + } + out := new(ManagedSeedSetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ManagedSeedSetList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedSetSpec) DeepCopyInto(out *ManagedSeedSetSpec) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + in.Selector.DeepCopyInto(&out.Selector) + in.Template.DeepCopyInto(&out.Template) + in.ShootTemplate.DeepCopyInto(&out.ShootTemplate) + if in.UpdateStrategy != nil { + in, out := &in.UpdateStrategy, &out.UpdateStrategy + *out = new(UpdateStrategy) + (*in).DeepCopyInto(*out) + } + if in.RevisionHistoryLimit != nil { + in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedSetSpec. +func (in *ManagedSeedSetSpec) DeepCopy() *ManagedSeedSetSpec { + if in == nil { + return nil + } + out := new(ManagedSeedSetSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedSetStatus) DeepCopyInto(out *ManagedSeedSetStatus) { + *out = *in + if in.CollisionCount != nil { + in, out := &in.CollisionCount, &out.CollisionCount + *out = new(int32) + **out = **in + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1beta1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedSetStatus. +func (in *ManagedSeedSetStatus) DeepCopy() *ManagedSeedSetStatus { + if in == nil { + return nil + } + out := new(ManagedSeedSetStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedSpec) DeepCopyInto(out *ManagedSeedSpec) { + *out = *in + if in.Shoot != nil { + in, out := &in.Shoot, &out.Shoot + *out = new(Shoot) + **out = **in + } + if in.SeedTemplate != nil { + in, out := &in.SeedTemplate, &out.SeedTemplate + *out = new(v1beta1.SeedTemplate) + (*in).DeepCopyInto(*out) + } + if in.Gardenlet != nil { + in, out := &in.Gardenlet, &out.Gardenlet + *out = new(Gardenlet) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedSpec. +func (in *ManagedSeedSpec) DeepCopy() *ManagedSeedSpec { + if in == nil { + return nil + } + out := new(ManagedSeedSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedStatus) DeepCopyInto(out *ManagedSeedStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1beta1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedStatus. +func (in *ManagedSeedStatus) DeepCopy() *ManagedSeedStatus { + if in == nil { + return nil + } + out := new(ManagedSeedStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedTemplate) DeepCopyInto(out *ManagedSeedTemplate) { + *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedTemplate. +func (in *ManagedSeedTemplate) DeepCopy() *ManagedSeedTemplate { + if in == nil { + return nil + } + out := new(ManagedSeedTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RollingUpdateStrategy) DeepCopyInto(out *RollingUpdateStrategy) { + *out = *in + if in.Partition != nil { + in, out := &in.Partition, &out.Partition + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateStrategy. +func (in *RollingUpdateStrategy) DeepCopy() *RollingUpdateStrategy { + if in == nil { + return nil + } + out := new(RollingUpdateStrategy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Shoot) DeepCopyInto(out *Shoot) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Shoot. +func (in *Shoot) DeepCopy() *Shoot { + if in == nil { + return nil + } + out := new(Shoot) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UpdateStrategy) DeepCopyInto(out *UpdateStrategy) { + *out = *in + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(UpdateStrategyType) + **out = **in + } + if in.RollingUpdate != nil { + in, out := &in.RollingUpdate, &out.RollingUpdate + *out = new(RollingUpdateStrategy) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateStrategy. +func (in *UpdateStrategy) DeepCopy() *UpdateStrategy { + if in == nil { + return nil + } + out := new(UpdateStrategy) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/zz_generated.defaults.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/zz_generated.defaults.go new file mode 100644 index 00000000..96aa1bfe --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,80 @@ +// +build !ignore_autogenerated + +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&ManagedSeed{}, func(obj interface{}) { SetObjectDefaults_ManagedSeed(obj.(*ManagedSeed)) }) + scheme.AddTypeDefaultingFunc(&ManagedSeedList{}, func(obj interface{}) { SetObjectDefaults_ManagedSeedList(obj.(*ManagedSeedList)) }) + scheme.AddTypeDefaultingFunc(&ManagedSeedSet{}, func(obj interface{}) { SetObjectDefaults_ManagedSeedSet(obj.(*ManagedSeedSet)) }) + scheme.AddTypeDefaultingFunc(&ManagedSeedSetList{}, func(obj interface{}) { SetObjectDefaults_ManagedSeedSetList(obj.(*ManagedSeedSetList)) }) + return nil +} + +func SetObjectDefaults_ManagedSeed(in *ManagedSeed) { + SetDefaults_ManagedSeed(in) + if in.Spec.Gardenlet != nil { + if in.Spec.Gardenlet.Deployment != nil { + SetDefaults_GardenletDeployment(in.Spec.Gardenlet.Deployment) + if in.Spec.Gardenlet.Deployment.Image != nil { + SetDefaults_Image(in.Spec.Gardenlet.Deployment.Image) + } + } + } +} + +func SetObjectDefaults_ManagedSeedList(in *ManagedSeedList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_ManagedSeed(a) + } +} + +func SetObjectDefaults_ManagedSeedSet(in *ManagedSeedSet) { + SetDefaults_ManagedSeedSet(in) + if in.Spec.Template.Spec.Gardenlet != nil { + if in.Spec.Template.Spec.Gardenlet.Deployment != nil { + SetDefaults_GardenletDeployment(in.Spec.Template.Spec.Gardenlet.Deployment) + if in.Spec.Template.Spec.Gardenlet.Deployment.Image != nil { + SetDefaults_Image(in.Spec.Template.Spec.Gardenlet.Deployment.Image) + } + } + } + if in.Spec.UpdateStrategy != nil { + SetDefaults_UpdateStrategy(in.Spec.UpdateStrategy) + if in.Spec.UpdateStrategy.RollingUpdate != nil { + SetDefaults_RollingUpdateStrategy(in.Spec.UpdateStrategy.RollingUpdate) + } + } +} + +func SetObjectDefaults_ManagedSeedSetList(in *ManagedSeedSetList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_ManagedSeedSet(a) + } +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/zz_generated.deepcopy.go b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/zz_generated.deepcopy.go new file mode 100644 index 00000000..bea2b3c6 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/seedmanagement/zz_generated.deepcopy.go @@ -0,0 +1,492 @@ +// +build !ignore_autogenerated + +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package seedmanagement + +import ( + core "github.com/gardener/gardener/pkg/apis/core" + v1 "k8s.io/api/core/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Gardenlet) DeepCopyInto(out *Gardenlet) { + *out = *in + if in.Deployment != nil { + in, out := &in.Deployment, &out.Deployment + *out = new(GardenletDeployment) + (*in).DeepCopyInto(*out) + } + if in.Config != nil { + out.Config = in.Config.DeepCopyObject() + } + if in.Bootstrap != nil { + in, out := &in.Bootstrap, &out.Bootstrap + *out = new(Bootstrap) + **out = **in + } + if in.MergeWithParent != nil { + in, out := &in.MergeWithParent, &out.MergeWithParent + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Gardenlet. +func (in *Gardenlet) DeepCopy() *Gardenlet { + if in == nil { + return nil + } + out := new(Gardenlet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GardenletDeployment) DeepCopyInto(out *GardenletDeployment) { + *out = *in + if in.ReplicaCount != nil { + in, out := &in.ReplicaCount, &out.ReplicaCount + *out = new(int32) + **out = **in + } + if in.RevisionHistoryLimit != nil { + in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit + *out = new(int32) + **out = **in + } + if in.ServiceAccountName != nil { + in, out := &in.ServiceAccountName, &out.ServiceAccountName + *out = new(string) + **out = **in + } + if in.Image != nil { + in, out := &in.Image, &out.Image + *out = new(Image) + (*in).DeepCopyInto(*out) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = new(v1.ResourceRequirements) + (*in).DeepCopyInto(*out) + } + if in.PodLabels != nil { + in, out := &in.PodLabels, &out.PodLabels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.PodAnnotations != nil { + in, out := &in.PodAnnotations, &out.PodAnnotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.AdditionalVolumes != nil { + in, out := &in.AdditionalVolumes, &out.AdditionalVolumes + *out = make([]v1.Volume, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.AdditionalVolumeMounts != nil { + in, out := &in.AdditionalVolumeMounts, &out.AdditionalVolumeMounts + *out = make([]v1.VolumeMount, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VPA != nil { + in, out := &in.VPA, &out.VPA + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GardenletDeployment. +func (in *GardenletDeployment) DeepCopy() *GardenletDeployment { + if in == nil { + return nil + } + out := new(GardenletDeployment) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Image) DeepCopyInto(out *Image) { + *out = *in + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(string) + **out = **in + } + if in.Tag != nil { + in, out := &in.Tag, &out.Tag + *out = new(string) + **out = **in + } + if in.PullPolicy != nil { + in, out := &in.PullPolicy, &out.PullPolicy + *out = new(v1.PullPolicy) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image. +func (in *Image) DeepCopy() *Image { + if in == nil { + return nil + } + out := new(Image) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeed) DeepCopyInto(out *ManagedSeed) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeed. +func (in *ManagedSeed) DeepCopy() *ManagedSeed { + if in == nil { + return nil + } + out := new(ManagedSeed) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ManagedSeed) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedList) DeepCopyInto(out *ManagedSeedList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ManagedSeed, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedList. +func (in *ManagedSeedList) DeepCopy() *ManagedSeedList { + if in == nil { + return nil + } + out := new(ManagedSeedList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ManagedSeedList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedSet) DeepCopyInto(out *ManagedSeedSet) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedSet. +func (in *ManagedSeedSet) DeepCopy() *ManagedSeedSet { + if in == nil { + return nil + } + out := new(ManagedSeedSet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ManagedSeedSet) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedSetList) DeepCopyInto(out *ManagedSeedSetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ManagedSeedSet, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedSetList. +func (in *ManagedSeedSetList) DeepCopy() *ManagedSeedSetList { + if in == nil { + return nil + } + out := new(ManagedSeedSetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ManagedSeedSetList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedSetSpec) DeepCopyInto(out *ManagedSeedSetSpec) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + in.Selector.DeepCopyInto(&out.Selector) + in.Template.DeepCopyInto(&out.Template) + in.ShootTemplate.DeepCopyInto(&out.ShootTemplate) + if in.UpdateStrategy != nil { + in, out := &in.UpdateStrategy, &out.UpdateStrategy + *out = new(UpdateStrategy) + (*in).DeepCopyInto(*out) + } + if in.RevisionHistoryLimit != nil { + in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedSetSpec. +func (in *ManagedSeedSetSpec) DeepCopy() *ManagedSeedSetSpec { + if in == nil { + return nil + } + out := new(ManagedSeedSetSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedSetStatus) DeepCopyInto(out *ManagedSeedSetStatus) { + *out = *in + if in.CollisionCount != nil { + in, out := &in.CollisionCount, &out.CollisionCount + *out = new(int32) + **out = **in + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]core.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedSetStatus. +func (in *ManagedSeedSetStatus) DeepCopy() *ManagedSeedSetStatus { + if in == nil { + return nil + } + out := new(ManagedSeedSetStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedSpec) DeepCopyInto(out *ManagedSeedSpec) { + *out = *in + if in.Shoot != nil { + in, out := &in.Shoot, &out.Shoot + *out = new(Shoot) + **out = **in + } + if in.SeedTemplate != nil { + in, out := &in.SeedTemplate, &out.SeedTemplate + *out = new(core.SeedTemplate) + (*in).DeepCopyInto(*out) + } + if in.Gardenlet != nil { + in, out := &in.Gardenlet, &out.Gardenlet + *out = new(Gardenlet) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedSpec. +func (in *ManagedSeedSpec) DeepCopy() *ManagedSeedSpec { + if in == nil { + return nil + } + out := new(ManagedSeedSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedStatus) DeepCopyInto(out *ManagedSeedStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]core.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedStatus. +func (in *ManagedSeedStatus) DeepCopy() *ManagedSeedStatus { + if in == nil { + return nil + } + out := new(ManagedSeedStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedTemplate) DeepCopyInto(out *ManagedSeedTemplate) { + *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedTemplate. +func (in *ManagedSeedTemplate) DeepCopy() *ManagedSeedTemplate { + if in == nil { + return nil + } + out := new(ManagedSeedTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RollingUpdateStrategy) DeepCopyInto(out *RollingUpdateStrategy) { + *out = *in + if in.Partition != nil { + in, out := &in.Partition, &out.Partition + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateStrategy. +func (in *RollingUpdateStrategy) DeepCopy() *RollingUpdateStrategy { + if in == nil { + return nil + } + out := new(RollingUpdateStrategy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Shoot) DeepCopyInto(out *Shoot) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Shoot. +func (in *Shoot) DeepCopy() *Shoot { + if in == nil { + return nil + } + out := new(Shoot) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UpdateStrategy) DeepCopyInto(out *UpdateStrategy) { + *out = *in + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(UpdateStrategyType) + **out = **in + } + if in.RollingUpdate != nil { + in, out := &in.RollingUpdate, &out.RollingUpdate + *out = new(RollingUpdateStrategy) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateStrategy. +func (in *UpdateStrategy) DeepCopy() *UpdateStrategy { + if in == nil { + return nil + } + out := new(UpdateStrategy) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/settings/doc.go b/vendor/github.com/gardener/gardener/pkg/apis/settings/doc.go new file mode 100644 index 00000000..61b8fbc2 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/settings/doc.go @@ -0,0 +1,19 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// 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. + +// +k8s:deepcopy-gen=package + +// Package settings is the internal version of the API. +// +groupName=settings.gardener.cloud +package settings diff --git a/vendor/github.com/gardener/gardener/pkg/apis/settings/register.go b/vendor/github.com/gardener/gardener/pkg/apis/settings/register.go new file mode 100644 index 00000000..a8729609 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/settings/register.go @@ -0,0 +1,54 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package settings + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the name of the settings API group. +const GroupName = "settings.gardener.cloud" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + // SchemeBuilder is a new Scheme Builder which registers our API. + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + // AddToScheme is a reference to the Scheme Builder's AddToScheme function. + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &ClusterOpenIDConnectPreset{}, + &ClusterOpenIDConnectPresetList{}, + &OpenIDConnectPreset{}, + &OpenIDConnectPresetList{}, + ) + return nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/settings/types_cluster_openidconnect_preset.go b/vendor/github.com/gardener/gardener/pkg/apis/settings/types_cluster_openidconnect_preset.go new file mode 100644 index 00000000..45d1a77e --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/settings/types_cluster_openidconnect_preset.go @@ -0,0 +1,69 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package settings + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterOpenIDConnectPreset is a OpenID Connect configuration that is applied +// to a Shoot objects cluster-wide. +type ClusterOpenIDConnectPreset struct { + metav1.TypeMeta + // Standard object metadata. + metav1.ObjectMeta + // Spec is the specification of this OpenIDConnect preset. + Spec ClusterOpenIDConnectPresetSpec +} + +// ClusterOpenIDConnectPresetSpec contains the OpenIDConnect specification and +// project selector matching Shoots in Projects. +type ClusterOpenIDConnectPresetSpec struct { + OpenIDConnectPresetSpec + + // Project decides whether to apply the configuration if the + // Shoot is in a specific Project matching the label selector. + // Use the selector only if the OIDC Preset is opt-in, because end + // users may skip the admission by setting the labels. + // Defaults to the empty LabelSelector, which matches everything. + ProjectSelector *metav1.LabelSelector +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterOpenIDConnectPresetList is a collection of ClusterOpenIDConnectPresets. +type ClusterOpenIDConnectPresetList struct { + metav1.TypeMeta + // Standard list object metadata. + metav1.ListMeta + // Items is the list of ClusterOpenIDConnectPresets. + Items []ClusterOpenIDConnectPreset +} + +var _ Preset = &ClusterOpenIDConnectPreset{} + +// GetPresetSpec returns a pointer to the OpenIDConnect specification. +func (o *ClusterOpenIDConnectPreset) GetPresetSpec() *OpenIDConnectPresetSpec { + return &o.Spec.OpenIDConnectPresetSpec +} + +// SetPresetSpec sets the OpenIDConnect specification. +func (o *ClusterOpenIDConnectPreset) SetPresetSpec(s *OpenIDConnectPresetSpec) { + o.Spec.OpenIDConnectPresetSpec = *s +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/settings/types_openidconnect_preset.go b/vendor/github.com/gardener/gardener/pkg/apis/settings/types_openidconnect_preset.go new file mode 100644 index 00000000..5871f873 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/settings/types_openidconnect_preset.go @@ -0,0 +1,55 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package settings + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// OpenIDConnectPreset is a OpenID Connect configuration that is applied +// to a Shoot in a namespace. +type OpenIDConnectPreset struct { + metav1.TypeMeta + // Standard object metadata. + metav1.ObjectMeta + + Spec OpenIDConnectPresetSpec +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// OpenIDConnectPresetList is a collection of OpenIDConnectPresets. +type OpenIDConnectPresetList struct { + metav1.TypeMeta + // Standard list object metadata. + metav1.ListMeta + // Items is the list of OpenIDConnectPresets. + Items []OpenIDConnectPreset +} + +var _ Preset = &OpenIDConnectPreset{} + +// GetPresetSpec returns a pointer to the OpenIDConnect specification. +func (o *OpenIDConnectPreset) GetPresetSpec() *OpenIDConnectPresetSpec { + return &o.Spec +} + +// SetPresetSpec sets the OpenIDConnect specification. +func (o *OpenIDConnectPreset) SetPresetSpec(s *OpenIDConnectPresetSpec) { + o.Spec = *s +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/settings/types_shared.go b/vendor/github.com/gardener/gardener/pkg/apis/settings/types_shared.go new file mode 100644 index 00000000..849a9ee8 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/settings/types_shared.go @@ -0,0 +1,93 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package settings + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// OpenIDConnectPresetSpec contains the Shoot selector for which +// a specific OpenID Connect configuration is applied. +type OpenIDConnectPresetSpec struct { + + // Server contains the kube-apiserver's OpenID Connect configuration. + // This configuration is not overwritting any existing OpenID Connect + // configuration already set on the Shoot object. + Server KubeAPIServerOpenIDConnect + + // Client contains the configuration used for client OIDC authentication + // of Shoot clusters. + // This configuration is not overwritting any existing OpenID Connect + // client authentication already set on the Shoot object. + Client *OpenIDConnectClientAuthentication + + // ShootSelector decides whether to apply the configuration if the + // Shoot has matching labels. + // Use the selector only if the OIDC Preset is opt-in, because end + // users may skip the admission by setting the labels. + // Default to the empty LabelSelector, which matches everything. + ShootSelector *metav1.LabelSelector + + // Weight associated with matching the corresponding preset, + // in the range 1-100. + // Required. + Weight int32 +} + +// This is copied to not depend on the gardener package and keep it version agnostic. + +// KubeAPIServerOpenIDConnect contains configuration settings for the OIDC provider. +// Note: Descriptions were taken from the Kubernetes documentation. +type KubeAPIServerOpenIDConnect struct { + // If set, the OpenID server's certificate will be verified by one of the authorities in the oidc-ca-file, otherwise the host's root CA set will be used. + CABundle *string + // The client ID for the OpenID Connect client. + // Required. + ClientID string + // If provided, the name of a custom OpenID Connect claim for specifying user groups. The claim value is expected to be a string or array of strings. This flag is experimental, please see the authentication documentation for further details. + GroupsClaim *string + // If provided, all groups will be prefixed with this value to prevent conflicts with other authentication strategies. + GroupsPrefix *string + // The URL of the OpenID issuer, only HTTPS scheme will be accepted. If set, it will be used to verify the OIDC JSON Web Token (JWT). + // Required. + IssuerURL string + // ATTENTION: Only meaningful for Kubernetes >= 1.11 + // key=value pairs that describes a required claim in the ID Token. If set, the claim is verified to be present in the ID Token with a matching value. + RequiredClaims map[string]string + // List of allowed JOSE asymmetric signing algorithms. JWTs with a 'alg' header value not in this list will be rejected. Values are defined by RFC 7518 https://tools.ietf.org/html/rfc7518#section-3.1 + SigningAlgs []string + // The OpenID claim to use as the user name. Note that claims other than the default ('sub') is not guaranteed to be unique and immutable. This flag is experimental, please see the authentication documentation for further details. (default "sub") + UsernameClaim *string + // If provided, all usernames will be prefixed with this value. If not provided, username claims other than 'email' are prefixed by the issuer URL to avoid clashes. To skip any prefixing, provide the value '-'. + UsernamePrefix *string +} + +// OpenIDConnectClientAuthentication contains configuration for OIDC clients. +type OpenIDConnectClientAuthentication struct { + // The client Secret for the OpenID Connect client. + Secret *string + + // Extra configuration added to kubeconfig's auth-provider. + // Must not be any of idp-issuer-url, client-id, client-secret, idp-certificate-authority, idp-certificate-authority-data, id-token or refresh-token + ExtraConfig map[string]string +} + +// Preset offers access to the specification of a OpenID preset object. +// Mainly used for tests. +type Preset interface { + metav1.ObjectMetaAccessor + GetPresetSpec() *OpenIDConnectPresetSpec + SetPresetSpec(s *OpenIDConnectPresetSpec) +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/defaults.go b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/defaults.go new file mode 100644 index 00000000..8e91ce30 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/defaults.go @@ -0,0 +1,55 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return RegisterDefaults(scheme) +} + +// SetDefaults_OpenIDConnectPreset sets default values for OpenIDConnectPreset objects. +func SetDefaults_OpenIDConnectPreset(obj *OpenIDConnectPreset) { + if obj.Spec.ShootSelector == nil { + obj.Spec.ShootSelector = &metav1.LabelSelector{} + } + setDefaultServerSpec(&obj.Spec.Server) +} + +// SetDefaults_ClusterOpenIDConnectPreset sets default values for ClusterOpenIDConnectPreset objects. +func SetDefaults_ClusterOpenIDConnectPreset(obj *ClusterOpenIDConnectPreset) { + if obj.Spec.ShootSelector == nil { + obj.Spec.ShootSelector = &metav1.LabelSelector{} + } + + if obj.Spec.ProjectSelector == nil { + obj.Spec.ProjectSelector = &metav1.LabelSelector{} + } + setDefaultServerSpec(&obj.Spec.Server) +} + +func setDefaultServerSpec(spec *KubeAPIServerOpenIDConnect) { + if len(spec.SigningAlgs) == 0 { + spec.SigningAlgs = []string{DefaultSignAlg} + } + + if spec.UsernameClaim == nil { + usernameClaim := DefaultUsernameClaim + spec.UsernameClaim = &usernameClaim + } +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/doc.go b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/doc.go new file mode 100644 index 00000000..7ce0b2ee --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/doc.go @@ -0,0 +1,26 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package v1alpha1 is the v1alpha1 version of the API. +// +k8s:deepcopy-gen=package,register +// +k8s:conversion-gen=github.com/gardener/gardener/pkg/apis/settings +// +k8s:openapi-gen=true +// +k8s:defaulter-gen=TypeMeta +// +k8s:protobuf-gen=package + +//go:generate gen-crd-api-reference-docs -api-dir . -config ../../../../hack/api-reference/settings-config.json -template-dir ../../../../hack/api-reference/template -out-file ../../../../hack/api-reference/settings.md + +// Package v1alpha1 is a version of the API. +// +groupName=settings.gardener.cloud +package v1alpha1 diff --git a/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/generated.pb.go b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/generated.pb.go new file mode 100644 index 00000000..8d7d4e91 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/generated.pb.go @@ -0,0 +1,2621 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: github.com/gardener/gardener/pkg/apis/settings/v1alpha1/generated.proto + +package v1alpha1 + +import ( + fmt "fmt" + + io "io" + + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +func (m *ClusterOpenIDConnectPreset) Reset() { *m = ClusterOpenIDConnectPreset{} } +func (*ClusterOpenIDConnectPreset) ProtoMessage() {} +func (*ClusterOpenIDConnectPreset) Descriptor() ([]byte, []int) { + return fileDescriptor_f0cd3f80cc90ed56, []int{0} +} +func (m *ClusterOpenIDConnectPreset) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ClusterOpenIDConnectPreset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ClusterOpenIDConnectPreset) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClusterOpenIDConnectPreset.Merge(m, src) +} +func (m *ClusterOpenIDConnectPreset) XXX_Size() int { + return m.Size() +} +func (m *ClusterOpenIDConnectPreset) XXX_DiscardUnknown() { + xxx_messageInfo_ClusterOpenIDConnectPreset.DiscardUnknown(m) +} + +var xxx_messageInfo_ClusterOpenIDConnectPreset proto.InternalMessageInfo + +func (m *ClusterOpenIDConnectPresetList) Reset() { *m = ClusterOpenIDConnectPresetList{} } +func (*ClusterOpenIDConnectPresetList) ProtoMessage() {} +func (*ClusterOpenIDConnectPresetList) Descriptor() ([]byte, []int) { + return fileDescriptor_f0cd3f80cc90ed56, []int{1} +} +func (m *ClusterOpenIDConnectPresetList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ClusterOpenIDConnectPresetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ClusterOpenIDConnectPresetList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClusterOpenIDConnectPresetList.Merge(m, src) +} +func (m *ClusterOpenIDConnectPresetList) XXX_Size() int { + return m.Size() +} +func (m *ClusterOpenIDConnectPresetList) XXX_DiscardUnknown() { + xxx_messageInfo_ClusterOpenIDConnectPresetList.DiscardUnknown(m) +} + +var xxx_messageInfo_ClusterOpenIDConnectPresetList proto.InternalMessageInfo + +func (m *ClusterOpenIDConnectPresetSpec) Reset() { *m = ClusterOpenIDConnectPresetSpec{} } +func (*ClusterOpenIDConnectPresetSpec) ProtoMessage() {} +func (*ClusterOpenIDConnectPresetSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_f0cd3f80cc90ed56, []int{2} +} +func (m *ClusterOpenIDConnectPresetSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ClusterOpenIDConnectPresetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ClusterOpenIDConnectPresetSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClusterOpenIDConnectPresetSpec.Merge(m, src) +} +func (m *ClusterOpenIDConnectPresetSpec) XXX_Size() int { + return m.Size() +} +func (m *ClusterOpenIDConnectPresetSpec) XXX_DiscardUnknown() { + xxx_messageInfo_ClusterOpenIDConnectPresetSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_ClusterOpenIDConnectPresetSpec proto.InternalMessageInfo + +func (m *KubeAPIServerOpenIDConnect) Reset() { *m = KubeAPIServerOpenIDConnect{} } +func (*KubeAPIServerOpenIDConnect) ProtoMessage() {} +func (*KubeAPIServerOpenIDConnect) Descriptor() ([]byte, []int) { + return fileDescriptor_f0cd3f80cc90ed56, []int{3} +} +func (m *KubeAPIServerOpenIDConnect) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KubeAPIServerOpenIDConnect) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *KubeAPIServerOpenIDConnect) XXX_Merge(src proto.Message) { + xxx_messageInfo_KubeAPIServerOpenIDConnect.Merge(m, src) +} +func (m *KubeAPIServerOpenIDConnect) XXX_Size() int { + return m.Size() +} +func (m *KubeAPIServerOpenIDConnect) XXX_DiscardUnknown() { + xxx_messageInfo_KubeAPIServerOpenIDConnect.DiscardUnknown(m) +} + +var xxx_messageInfo_KubeAPIServerOpenIDConnect proto.InternalMessageInfo + +func (m *OpenIDConnectClientAuthentication) Reset() { *m = OpenIDConnectClientAuthentication{} } +func (*OpenIDConnectClientAuthentication) ProtoMessage() {} +func (*OpenIDConnectClientAuthentication) Descriptor() ([]byte, []int) { + return fileDescriptor_f0cd3f80cc90ed56, []int{4} +} +func (m *OpenIDConnectClientAuthentication) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OpenIDConnectClientAuthentication) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *OpenIDConnectClientAuthentication) XXX_Merge(src proto.Message) { + xxx_messageInfo_OpenIDConnectClientAuthentication.Merge(m, src) +} +func (m *OpenIDConnectClientAuthentication) XXX_Size() int { + return m.Size() +} +func (m *OpenIDConnectClientAuthentication) XXX_DiscardUnknown() { + xxx_messageInfo_OpenIDConnectClientAuthentication.DiscardUnknown(m) +} + +var xxx_messageInfo_OpenIDConnectClientAuthentication proto.InternalMessageInfo + +func (m *OpenIDConnectPreset) Reset() { *m = OpenIDConnectPreset{} } +func (*OpenIDConnectPreset) ProtoMessage() {} +func (*OpenIDConnectPreset) Descriptor() ([]byte, []int) { + return fileDescriptor_f0cd3f80cc90ed56, []int{5} +} +func (m *OpenIDConnectPreset) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OpenIDConnectPreset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *OpenIDConnectPreset) XXX_Merge(src proto.Message) { + xxx_messageInfo_OpenIDConnectPreset.Merge(m, src) +} +func (m *OpenIDConnectPreset) XXX_Size() int { + return m.Size() +} +func (m *OpenIDConnectPreset) XXX_DiscardUnknown() { + xxx_messageInfo_OpenIDConnectPreset.DiscardUnknown(m) +} + +var xxx_messageInfo_OpenIDConnectPreset proto.InternalMessageInfo + +func (m *OpenIDConnectPresetList) Reset() { *m = OpenIDConnectPresetList{} } +func (*OpenIDConnectPresetList) ProtoMessage() {} +func (*OpenIDConnectPresetList) Descriptor() ([]byte, []int) { + return fileDescriptor_f0cd3f80cc90ed56, []int{6} +} +func (m *OpenIDConnectPresetList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OpenIDConnectPresetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *OpenIDConnectPresetList) XXX_Merge(src proto.Message) { + xxx_messageInfo_OpenIDConnectPresetList.Merge(m, src) +} +func (m *OpenIDConnectPresetList) XXX_Size() int { + return m.Size() +} +func (m *OpenIDConnectPresetList) XXX_DiscardUnknown() { + xxx_messageInfo_OpenIDConnectPresetList.DiscardUnknown(m) +} + +var xxx_messageInfo_OpenIDConnectPresetList proto.InternalMessageInfo + +func (m *OpenIDConnectPresetSpec) Reset() { *m = OpenIDConnectPresetSpec{} } +func (*OpenIDConnectPresetSpec) ProtoMessage() {} +func (*OpenIDConnectPresetSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_f0cd3f80cc90ed56, []int{7} +} +func (m *OpenIDConnectPresetSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OpenIDConnectPresetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *OpenIDConnectPresetSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_OpenIDConnectPresetSpec.Merge(m, src) +} +func (m *OpenIDConnectPresetSpec) XXX_Size() int { + return m.Size() +} +func (m *OpenIDConnectPresetSpec) XXX_DiscardUnknown() { + xxx_messageInfo_OpenIDConnectPresetSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_OpenIDConnectPresetSpec proto.InternalMessageInfo + +func init() { + proto.RegisterType((*ClusterOpenIDConnectPreset)(nil), "github.com.gardener.gardener.pkg.apis.settings.v1alpha1.ClusterOpenIDConnectPreset") + proto.RegisterType((*ClusterOpenIDConnectPresetList)(nil), "github.com.gardener.gardener.pkg.apis.settings.v1alpha1.ClusterOpenIDConnectPresetList") + proto.RegisterType((*ClusterOpenIDConnectPresetSpec)(nil), "github.com.gardener.gardener.pkg.apis.settings.v1alpha1.ClusterOpenIDConnectPresetSpec") + proto.RegisterType((*KubeAPIServerOpenIDConnect)(nil), "github.com.gardener.gardener.pkg.apis.settings.v1alpha1.KubeAPIServerOpenIDConnect") + proto.RegisterMapType((map[string]string)(nil), "github.com.gardener.gardener.pkg.apis.settings.v1alpha1.KubeAPIServerOpenIDConnect.RequiredClaimsEntry") + proto.RegisterType((*OpenIDConnectClientAuthentication)(nil), "github.com.gardener.gardener.pkg.apis.settings.v1alpha1.OpenIDConnectClientAuthentication") + proto.RegisterMapType((map[string]string)(nil), "github.com.gardener.gardener.pkg.apis.settings.v1alpha1.OpenIDConnectClientAuthentication.ExtraConfigEntry") + proto.RegisterType((*OpenIDConnectPreset)(nil), "github.com.gardener.gardener.pkg.apis.settings.v1alpha1.OpenIDConnectPreset") + proto.RegisterType((*OpenIDConnectPresetList)(nil), "github.com.gardener.gardener.pkg.apis.settings.v1alpha1.OpenIDConnectPresetList") + proto.RegisterType((*OpenIDConnectPresetSpec)(nil), "github.com.gardener.gardener.pkg.apis.settings.v1alpha1.OpenIDConnectPresetSpec") +} + +func init() { + proto.RegisterFile("github.com/gardener/gardener/pkg/apis/settings/v1alpha1/generated.proto", fileDescriptor_f0cd3f80cc90ed56) +} + +var fileDescriptor_f0cd3f80cc90ed56 = []byte{ + // 957 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x4f, 0x6f, 0xe3, 0xc4, + 0x1b, 0x8e, 0x93, 0x26, 0xbf, 0x64, 0xd2, 0x7f, 0xbf, 0x29, 0xa2, 0x51, 0x0e, 0x4e, 0xc9, 0x01, + 0xf5, 0x00, 0x0e, 0x5d, 0x56, 0xec, 0x6a, 0x0f, 0x48, 0x49, 0x76, 0x55, 0x45, 0x14, 0x6d, 0x34, + 0x51, 0xb5, 0xd2, 0x8a, 0x03, 0x8e, 0xf3, 0xd6, 0x19, 0xe2, 0xd8, 0xde, 0x99, 0x71, 0x68, 0x85, + 0x84, 0xf8, 0x08, 0x7c, 0x06, 0x38, 0x70, 0x60, 0x3f, 0x05, 0xa7, 0x1e, 0xf7, 0xb8, 0xa7, 0x88, + 0x9a, 0x1b, 0x7c, 0x01, 0xb8, 0x21, 0x8f, 0x27, 0xb5, 0x9d, 0x36, 0xb0, 0x54, 0xad, 0xf6, 0xe6, + 0x79, 0xff, 0x3d, 0xcf, 0xfb, 0xcc, 0xeb, 0x79, 0xd1, 0xa1, 0x4d, 0xc5, 0x38, 0x18, 0x1a, 0x96, + 0x37, 0x6d, 0xd9, 0x26, 0x1b, 0x81, 0x0b, 0x2c, 0xf9, 0xf0, 0x27, 0x76, 0xcb, 0xf4, 0x29, 0x6f, + 0x71, 0x10, 0x82, 0xba, 0x36, 0x6f, 0xcd, 0x0e, 0x4c, 0xc7, 0x1f, 0x9b, 0x07, 0x2d, 0x3b, 0x0a, + 0x30, 0x05, 0x8c, 0x0c, 0x9f, 0x79, 0xc2, 0xc3, 0x0f, 0x92, 0x42, 0xc6, 0x22, 0x3f, 0xf9, 0xf0, + 0x27, 0xb6, 0x11, 0x15, 0x32, 0x16, 0x85, 0x8c, 0x45, 0xa1, 0xfa, 0x87, 0x69, 0x06, 0x9e, 0xed, + 0xb5, 0x64, 0xbd, 0x61, 0x70, 0x22, 0x4f, 0xf2, 0x20, 0xbf, 0x62, 0x9c, 0xfa, 0xfd, 0xc9, 0x43, + 0x6e, 0x50, 0x2f, 0xa2, 0x35, 0x35, 0xad, 0x31, 0x75, 0x81, 0x9d, 0x25, 0x3c, 0xa7, 0x20, 0xcc, + 0xd6, 0xec, 0x0a, 0xbb, 0x7a, 0x6b, 0x55, 0x16, 0x0b, 0x5c, 0x41, 0xa7, 0x70, 0x25, 0xe1, 0x93, + 0x7f, 0x4b, 0xe0, 0xd6, 0x18, 0xa6, 0xe6, 0x72, 0x5e, 0xf3, 0x2f, 0x0d, 0xd5, 0xbb, 0x4e, 0xc0, + 0x05, 0xb0, 0xa7, 0x3e, 0xb8, 0xbd, 0xc7, 0x5d, 0xcf, 0x75, 0xc1, 0x12, 0x7d, 0x06, 0x1c, 0x04, + 0xfe, 0x12, 0x95, 0x23, 0x8a, 0x23, 0x53, 0x98, 0x35, 0x6d, 0x4f, 0xdb, 0xaf, 0xde, 0xfb, 0xc8, + 0x88, 0x91, 0x8c, 0x34, 0x52, 0xa2, 0x57, 0x14, 0x6d, 0xcc, 0x0e, 0x8c, 0xa7, 0xc3, 0xaf, 0xc0, + 0x12, 0x9f, 0x83, 0x30, 0x3b, 0xf8, 0x7c, 0xde, 0xc8, 0x85, 0xf3, 0x06, 0x4a, 0x6c, 0xe4, 0xb2, + 0x2a, 0x3e, 0x43, 0x6b, 0xdc, 0x07, 0xab, 0x96, 0x97, 0xd5, 0x9f, 0x19, 0x37, 0xbc, 0x16, 0x63, + 0x75, 0x13, 0x03, 0x1f, 0xac, 0xce, 0xba, 0x22, 0xb1, 0x16, 0x9d, 0x88, 0x84, 0x6c, 0xfe, 0xa9, + 0x21, 0x7d, 0x75, 0xda, 0x11, 0xe5, 0x02, 0x7f, 0x71, 0xa5, 0x7f, 0xe3, 0xcd, 0xfa, 0x8f, 0xb2, + 0x65, 0xf7, 0xdb, 0x0a, 0xb8, 0xbc, 0xb0, 0xa4, 0x7a, 0x3f, 0x45, 0x45, 0x2a, 0x60, 0xca, 0x6b, + 0xf9, 0xbd, 0xc2, 0x7e, 0xf5, 0xde, 0xe0, 0x0e, 0x9a, 0xef, 0x6c, 0x28, 0xfc, 0x62, 0x2f, 0x42, + 0x22, 0x31, 0x60, 0xf3, 0x97, 0xfc, 0x3f, 0xb5, 0x1e, 0x69, 0x84, 0x7f, 0xd6, 0xd0, 0xae, 0x77, + 0xbd, 0x4f, 0x49, 0xd1, 0xbf, 0x31, 0xdf, 0x55, 0xb7, 0xd4, 0x50, 0x64, 0x77, 0x57, 0x04, 0x90, + 0x55, 0x8c, 0x30, 0x43, 0x5b, 0x3e, 0xf3, 0xa2, 0xf9, 0x1a, 0x80, 0x03, 0x96, 0xf0, 0x98, 0x9a, + 0xa8, 0x8f, 0xdf, 0xf0, 0xbe, 0xcc, 0x21, 0x38, 0x8b, 0xd4, 0xce, 0x4e, 0x38, 0x6f, 0x6c, 0xf5, + 0xb3, 0xf5, 0xc8, 0x32, 0x40, 0xf3, 0xc7, 0x22, 0xaa, 0x7f, 0x16, 0x0c, 0xa1, 0xdd, 0xef, 0x0d, + 0x80, 0xcd, 0x96, 0xa4, 0xc4, 0xfb, 0xa8, 0x6c, 0x99, 0x9d, 0xc0, 0x1d, 0x39, 0x20, 0x05, 0xab, + 0x74, 0xd6, 0xa3, 0x39, 0xe8, 0xb6, 0x63, 0x1b, 0xb9, 0xf4, 0xe2, 0x0f, 0x50, 0xd9, 0x72, 0x28, + 0xb8, 0xa2, 0xf7, 0x58, 0xb2, 0xae, 0x24, 0x53, 0xd3, 0x55, 0x76, 0x72, 0x19, 0x81, 0x0f, 0x50, + 0xd5, 0x66, 0x5e, 0xe0, 0xf3, 0xae, 0x63, 0xd2, 0x69, 0xad, 0x20, 0x13, 0xb6, 0xc2, 0x79, 0xa3, + 0x7a, 0x98, 0x98, 0x49, 0x3a, 0x06, 0xdf, 0x47, 0xeb, 0xf1, 0xb1, 0xcf, 0xe0, 0x84, 0x9e, 0xd6, + 0xd6, 0x62, 0x90, 0x70, 0xde, 0x58, 0x3f, 0x4c, 0xd9, 0x49, 0x26, 0x0a, 0xb7, 0x50, 0x85, 0x72, + 0x1e, 0x00, 0x3b, 0x26, 0x47, 0xb5, 0xa2, 0x4c, 0xf9, 0xbf, 0xe2, 0x55, 0xe9, 0x2d, 0x1c, 0x24, + 0x89, 0xc1, 0x3f, 0x69, 0x68, 0x93, 0xc1, 0x8b, 0x80, 0x32, 0x18, 0x49, 0x60, 0x5e, 0x2b, 0xc9, + 0xc9, 0xb6, 0x6f, 0x3c, 0x29, 0xab, 0xf5, 0x35, 0x48, 0x06, 0xe9, 0x89, 0x2b, 0xd8, 0x59, 0xe7, + 0x5d, 0xc5, 0x6f, 0x33, 0xeb, 0x24, 0x4b, 0xb4, 0x22, 0x0d, 0x39, 0xb5, 0x5d, 0xea, 0xda, 0x6d, + 0xc7, 0xe6, 0xb5, 0xff, 0xed, 0x15, 0x16, 0x1a, 0x0e, 0x12, 0x33, 0x49, 0xc7, 0xe0, 0x07, 0x68, + 0x23, 0xe0, 0xc0, 0x5c, 0x73, 0x0a, 0xb1, 0xf0, 0xe5, 0x58, 0x91, 0x70, 0xde, 0xd8, 0x38, 0x4e, + 0x3b, 0x48, 0x36, 0x0e, 0x3f, 0x42, 0x9b, 0x0b, 0x83, 0x92, 0xbf, 0x22, 0x33, 0x71, 0xc4, 0xf3, + 0x38, 0xe3, 0x21, 0x4b, 0x91, 0xf5, 0x36, 0xda, 0xb9, 0xa6, 0x4d, 0xbc, 0x8d, 0x0a, 0x13, 0x38, + 0x8b, 0xa7, 0x8a, 0x44, 0x9f, 0xf8, 0x1d, 0x54, 0x9c, 0x99, 0x4e, 0x00, 0xf1, 0xfc, 0x90, 0xf8, + 0xf0, 0x28, 0xff, 0x50, 0x6b, 0xbe, 0xcc, 0xa3, 0xf7, 0x32, 0xc2, 0xc5, 0x23, 0xd5, 0x0e, 0xc4, + 0x18, 0x5c, 0x41, 0x2d, 0x53, 0x50, 0xcf, 0xc5, 0x4d, 0x54, 0xe2, 0x60, 0x31, 0x10, 0x6a, 0x54, + 0x51, 0x38, 0x6f, 0x94, 0x06, 0xd2, 0x42, 0x94, 0x07, 0xff, 0xa0, 0xa1, 0x2a, 0x9c, 0x0a, 0x66, + 0x76, 0x3d, 0xf7, 0x84, 0xda, 0xea, 0xd5, 0x9a, 0xdc, 0xce, 0x2b, 0x70, 0x1d, 0x2b, 0xe3, 0x49, + 0x82, 0x16, 0xdf, 0xef, 0x8e, 0xba, 0xdf, 0x6a, 0xca, 0x43, 0xd2, 0xa4, 0xea, 0x9f, 0xa2, 0xed, + 0xe5, 0xac, 0xff, 0x24, 0xd7, 0x1f, 0x1a, 0xda, 0x79, 0x3b, 0x9b, 0x90, 0x65, 0x36, 0xe1, 0xed, + 0x3f, 0xae, 0xd7, 0xad, 0xc0, 0xdf, 0x35, 0xb4, 0xfb, 0x76, 0x76, 0xdf, 0x8b, 0xec, 0xee, 0x3b, + 0xba, 0xcd, 0x76, 0x57, 0x2c, 0xbd, 0x97, 0x05, 0xb4, 0x6a, 0xb1, 0xe0, 0x6f, 0xa2, 0xf9, 0x8f, + 0xde, 0x18, 0xd5, 0xea, 0xe0, 0x0e, 0x5e, 0xac, 0xce, 0xa6, 0xa2, 0x55, 0x8a, 0x9d, 0x44, 0x41, + 0xe2, 0x6f, 0x51, 0x29, 0x7e, 0xdd, 0xd5, 0xdd, 0x3f, 0xbf, 0xbb, 0x5f, 0x2a, 0xfe, 0xb1, 0x63, + 0x0f, 0x51, 0xa8, 0xd8, 0x41, 0x1b, 0x7c, 0xec, 0x79, 0xc9, 0xea, 0x2c, 0xdc, 0x7c, 0x75, 0xca, + 0xf7, 0x70, 0x90, 0xae, 0x46, 0xb2, 0xc5, 0xf1, 0xfb, 0xa8, 0xf4, 0x35, 0x50, 0x7b, 0x2c, 0xe4, + 0x1a, 0x2a, 0x26, 0xaa, 0x3c, 0x93, 0x56, 0xa2, 0xbc, 0x1d, 0xe3, 0xfc, 0x42, 0xcf, 0xbd, 0xba, + 0xd0, 0x73, 0xaf, 0x2f, 0xf4, 0xdc, 0x77, 0xa1, 0xae, 0x9d, 0x87, 0xba, 0xf6, 0x2a, 0xd4, 0xb5, + 0xd7, 0xa1, 0xae, 0xfd, 0x1a, 0xea, 0xda, 0xf7, 0xbf, 0xe9, 0xb9, 0xe7, 0xe5, 0x45, 0xef, 0x7f, + 0x07, 0x00, 0x00, 0xff, 0xff, 0x68, 0xeb, 0xae, 0x3a, 0x1b, 0x0c, 0x00, 0x00, +} + +func (m *ClusterOpenIDConnectPreset) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ClusterOpenIDConnectPreset) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ClusterOpenIDConnectPreset) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ClusterOpenIDConnectPresetList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ClusterOpenIDConnectPresetList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ClusterOpenIDConnectPresetList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ClusterOpenIDConnectPresetSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ClusterOpenIDConnectPresetSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ClusterOpenIDConnectPresetSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProjectSelector != nil { + { + size, err := m.ProjectSelector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + { + size, err := m.OpenIDConnectPresetSpec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *KubeAPIServerOpenIDConnect) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *KubeAPIServerOpenIDConnect) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KubeAPIServerOpenIDConnect) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.UsernamePrefix != nil { + i -= len(*m.UsernamePrefix) + copy(dAtA[i:], *m.UsernamePrefix) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.UsernamePrefix))) + i-- + dAtA[i] = 0x4a + } + if m.UsernameClaim != nil { + i -= len(*m.UsernameClaim) + copy(dAtA[i:], *m.UsernameClaim) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.UsernameClaim))) + i-- + dAtA[i] = 0x42 + } + if len(m.SigningAlgs) > 0 { + for iNdEx := len(m.SigningAlgs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SigningAlgs[iNdEx]) + copy(dAtA[i:], m.SigningAlgs[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SigningAlgs[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.RequiredClaims) > 0 { + keysForRequiredClaims := make([]string, 0, len(m.RequiredClaims)) + for k := range m.RequiredClaims { + keysForRequiredClaims = append(keysForRequiredClaims, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForRequiredClaims) + for iNdEx := len(keysForRequiredClaims) - 1; iNdEx >= 0; iNdEx-- { + v := m.RequiredClaims[string(keysForRequiredClaims[iNdEx])] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(keysForRequiredClaims[iNdEx]) + copy(dAtA[i:], keysForRequiredClaims[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(keysForRequiredClaims[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x32 + } + } + i -= len(m.IssuerURL) + copy(dAtA[i:], m.IssuerURL) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.IssuerURL))) + i-- + dAtA[i] = 0x2a + if m.GroupsPrefix != nil { + i -= len(*m.GroupsPrefix) + copy(dAtA[i:], *m.GroupsPrefix) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.GroupsPrefix))) + i-- + dAtA[i] = 0x22 + } + if m.GroupsClaim != nil { + i -= len(*m.GroupsClaim) + copy(dAtA[i:], *m.GroupsClaim) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.GroupsClaim))) + i-- + dAtA[i] = 0x1a + } + i -= len(m.ClientID) + copy(dAtA[i:], m.ClientID) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClientID))) + i-- + dAtA[i] = 0x12 + if m.CABundle != nil { + i -= len(*m.CABundle) + copy(dAtA[i:], *m.CABundle) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.CABundle))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *OpenIDConnectClientAuthentication) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OpenIDConnectClientAuthentication) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OpenIDConnectClientAuthentication) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ExtraConfig) > 0 { + keysForExtraConfig := make([]string, 0, len(m.ExtraConfig)) + for k := range m.ExtraConfig { + keysForExtraConfig = append(keysForExtraConfig, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForExtraConfig) + for iNdEx := len(keysForExtraConfig) - 1; iNdEx >= 0; iNdEx-- { + v := m.ExtraConfig[string(keysForExtraConfig[iNdEx])] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(keysForExtraConfig[iNdEx]) + copy(dAtA[i:], keysForExtraConfig[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(keysForExtraConfig[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 + } + } + if m.Secret != nil { + i -= len(*m.Secret) + copy(dAtA[i:], *m.Secret) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Secret))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *OpenIDConnectPreset) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OpenIDConnectPreset) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OpenIDConnectPreset) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *OpenIDConnectPresetList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OpenIDConnectPresetList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OpenIDConnectPresetList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *OpenIDConnectPresetSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OpenIDConnectPresetSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OpenIDConnectPresetSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i = encodeVarintGenerated(dAtA, i, uint64(m.Weight)) + i-- + dAtA[i] = 0x20 + if m.ShootSelector != nil { + { + size, err := m.ShootSelector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Client != nil { + { + size, err := m.Client.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Server.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ClusterOpenIDConnectPreset) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ClusterOpenIDConnectPresetList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ClusterOpenIDConnectPresetSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.OpenIDConnectPresetSpec.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.ProjectSelector != nil { + l = m.ProjectSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *KubeAPIServerOpenIDConnect) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CABundle != nil { + l = len(*m.CABundle) + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.ClientID) + n += 1 + l + sovGenerated(uint64(l)) + if m.GroupsClaim != nil { + l = len(*m.GroupsClaim) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.GroupsPrefix != nil { + l = len(*m.GroupsPrefix) + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.IssuerURL) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.RequiredClaims) > 0 { + for k, v := range m.RequiredClaims { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if len(m.SigningAlgs) > 0 { + for _, s := range m.SigningAlgs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.UsernameClaim != nil { + l = len(*m.UsernameClaim) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.UsernamePrefix != nil { + l = len(*m.UsernamePrefix) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *OpenIDConnectClientAuthentication) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Secret != nil { + l = len(*m.Secret) + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.ExtraConfig) > 0 { + for k, v := range m.ExtraConfig { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + return n +} + +func (m *OpenIDConnectPreset) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *OpenIDConnectPresetList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *OpenIDConnectPresetSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Server.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.Client != nil { + l = m.Client.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.ShootSelector != nil { + l = m.ShootSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + n += 1 + sovGenerated(uint64(m.Weight)) + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *ClusterOpenIDConnectPreset) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterOpenIDConnectPreset{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ClusterOpenIDConnectPresetSpec", "ClusterOpenIDConnectPresetSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterOpenIDConnectPresetList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ClusterOpenIDConnectPreset{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ClusterOpenIDConnectPreset", "ClusterOpenIDConnectPreset", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ClusterOpenIDConnectPresetList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ClusterOpenIDConnectPresetSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterOpenIDConnectPresetSpec{`, + `OpenIDConnectPresetSpec:` + strings.Replace(strings.Replace(this.OpenIDConnectPresetSpec.String(), "OpenIDConnectPresetSpec", "OpenIDConnectPresetSpec", 1), `&`, ``, 1) + `,`, + `ProjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ProjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `}`, + }, "") + return s +} +func (this *KubeAPIServerOpenIDConnect) String() string { + if this == nil { + return "nil" + } + keysForRequiredClaims := make([]string, 0, len(this.RequiredClaims)) + for k := range this.RequiredClaims { + keysForRequiredClaims = append(keysForRequiredClaims, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForRequiredClaims) + mapStringForRequiredClaims := "map[string]string{" + for _, k := range keysForRequiredClaims { + mapStringForRequiredClaims += fmt.Sprintf("%v: %v,", k, this.RequiredClaims[k]) + } + mapStringForRequiredClaims += "}" + s := strings.Join([]string{`&KubeAPIServerOpenIDConnect{`, + `CABundle:` + valueToStringGenerated(this.CABundle) + `,`, + `ClientID:` + fmt.Sprintf("%v", this.ClientID) + `,`, + `GroupsClaim:` + valueToStringGenerated(this.GroupsClaim) + `,`, + `GroupsPrefix:` + valueToStringGenerated(this.GroupsPrefix) + `,`, + `IssuerURL:` + fmt.Sprintf("%v", this.IssuerURL) + `,`, + `RequiredClaims:` + mapStringForRequiredClaims + `,`, + `SigningAlgs:` + fmt.Sprintf("%v", this.SigningAlgs) + `,`, + `UsernameClaim:` + valueToStringGenerated(this.UsernameClaim) + `,`, + `UsernamePrefix:` + valueToStringGenerated(this.UsernamePrefix) + `,`, + `}`, + }, "") + return s +} +func (this *OpenIDConnectClientAuthentication) String() string { + if this == nil { + return "nil" + } + keysForExtraConfig := make([]string, 0, len(this.ExtraConfig)) + for k := range this.ExtraConfig { + keysForExtraConfig = append(keysForExtraConfig, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForExtraConfig) + mapStringForExtraConfig := "map[string]string{" + for _, k := range keysForExtraConfig { + mapStringForExtraConfig += fmt.Sprintf("%v: %v,", k, this.ExtraConfig[k]) + } + mapStringForExtraConfig += "}" + s := strings.Join([]string{`&OpenIDConnectClientAuthentication{`, + `Secret:` + valueToStringGenerated(this.Secret) + `,`, + `ExtraConfig:` + mapStringForExtraConfig + `,`, + `}`, + }, "") + return s +} +func (this *OpenIDConnectPreset) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OpenIDConnectPreset{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "OpenIDConnectPresetSpec", "OpenIDConnectPresetSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *OpenIDConnectPresetList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]OpenIDConnectPreset{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "OpenIDConnectPreset", "OpenIDConnectPreset", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&OpenIDConnectPresetList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *OpenIDConnectPresetSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OpenIDConnectPresetSpec{`, + `Server:` + strings.Replace(strings.Replace(this.Server.String(), "KubeAPIServerOpenIDConnect", "KubeAPIServerOpenIDConnect", 1), `&`, ``, 1) + `,`, + `Client:` + strings.Replace(this.Client.String(), "OpenIDConnectClientAuthentication", "OpenIDConnectClientAuthentication", 1) + `,`, + `ShootSelector:` + strings.Replace(fmt.Sprintf("%v", this.ShootSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `Weight:` + fmt.Sprintf("%v", this.Weight) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *ClusterOpenIDConnectPreset) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterOpenIDConnectPreset: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterOpenIDConnectPreset: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterOpenIDConnectPresetList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterOpenIDConnectPresetList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterOpenIDConnectPresetList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ClusterOpenIDConnectPreset{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterOpenIDConnectPresetSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterOpenIDConnectPresetSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterOpenIDConnectPresetSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OpenIDConnectPresetSpec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.OpenIDConnectPresetSpec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProjectSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ProjectSelector == nil { + m.ProjectSelector = &v1.LabelSelector{} + } + if err := m.ProjectSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *KubeAPIServerOpenIDConnect) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KubeAPIServerOpenIDConnect: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KubeAPIServerOpenIDConnect: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CABundle", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.CABundle = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClientID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupsClaim", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.GroupsClaim = &s + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupsPrefix", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.GroupsPrefix = &s + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IssuerURL", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IssuerURL = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredClaims", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequiredClaims == nil { + m.RequiredClaims = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.RequiredClaims[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SigningAlgs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SigningAlgs = append(m.SigningAlgs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UsernameClaim", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.UsernameClaim = &s + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UsernamePrefix", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.UsernamePrefix = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OpenIDConnectClientAuthentication) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OpenIDConnectClientAuthentication: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OpenIDConnectClientAuthentication: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Secret = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExtraConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExtraConfig == nil { + m.ExtraConfig = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.ExtraConfig[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OpenIDConnectPreset) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OpenIDConnectPreset: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OpenIDConnectPreset: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OpenIDConnectPresetList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OpenIDConnectPresetList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OpenIDConnectPresetList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, OpenIDConnectPreset{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OpenIDConnectPresetSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OpenIDConnectPresetSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OpenIDConnectPresetSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Server", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Server.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Client", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Client == nil { + m.Client = &OpenIDConnectClientAuthentication{} + } + if err := m.Client.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShootSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ShootSelector == nil { + m.ShootSelector = &v1.LabelSelector{} + } + if err := m.ShootSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) + } + m.Weight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Weight |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/generated.proto b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/generated.proto new file mode 100644 index 00000000..7f5c6d37 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/generated.proto @@ -0,0 +1,167 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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 go-to-protobuf. Do not edit it manually! + +syntax = "proto2"; + +package github.com.gardener.gardener.pkg.apis.settings.v1alpha1; + +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1alpha1"; + +// ClusterOpenIDConnectPreset is a OpenID Connect configuration that is applied +// to a Shoot objects cluster-wide. +message ClusterOpenIDConnectPreset { + // Standard object metadata. + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Spec is the specification of this OpenIDConnect preset. + optional ClusterOpenIDConnectPresetSpec spec = 2; +} + +// ClusterOpenIDConnectPresetList is a collection of ClusterOpenIDConnectPresets. +message ClusterOpenIDConnectPresetList { + // Standard list object metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of ClusterOpenIDConnectPresets. + repeated ClusterOpenIDConnectPreset items = 2; +} + +// ClusterOpenIDConnectPresetSpec contains the OpenIDConnect specification and +// project selector matching Shoots in Projects. +message ClusterOpenIDConnectPresetSpec { + optional OpenIDConnectPresetSpec openIDConnectPresetSpec = 1; + + // Project decides whether to apply the configuration if the + // Shoot is in a specific Project matching the label selector. + // Use the selector only if the OIDC Preset is opt-in, because end + // users may skip the admission by setting the labels. + // Defaults to the empty LabelSelector, which matches everything. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector projectSelector = 2; +} + +// KubeAPIServerOpenIDConnect contains configuration settings for the OIDC provider. +// Note: Descriptions were taken from the Kubernetes documentation. +message KubeAPIServerOpenIDConnect { + // If set, the OpenID server's certificate will be verified by one of the authorities in the oidc-ca-file, otherwise the host's root CA set will be used. + // +optional + optional string caBundle = 1; + + // The client ID for the OpenID Connect client. + // Required. + optional string clientID = 2; + + // If provided, the name of a custom OpenID Connect claim for specifying user groups. The claim value is expected to be a string or array of strings. This field is experimental, please see the authentication documentation for further details. + // +optional + optional string groupsClaim = 3; + + // If provided, all groups will be prefixed with this value to prevent conflicts with other authentication strategies. + // +optional + optional string groupsPrefix = 4; + + // The URL of the OpenID issuer, only HTTPS scheme will be accepted. If set, it will be used to verify the OIDC JSON Web Token (JWT). + // Required. + optional string issuerURL = 5; + + // key=value pairs that describes a required claim in the ID Token. If set, the claim is verified to be present in the ID Token with a matching value. + // Only applied when the Kubernetes version of the Shoot is >= 1.11 + // +optional + map requiredClaims = 6; + + // List of allowed JOSE asymmetric signing algorithms. JWTs with a 'alg' header value not in this list will be rejected. Values are defined by RFC 7518 https://tools.ietf.org/html/rfc7518#section-3.1 + // Defaults to [RS256] + // +optional + repeated string signingAlgs = 7; + + // The OpenID claim to use as the user name. Note that claims other than the default ('sub') is not guaranteed to be unique and immutable. This field is experimental, please see the authentication documentation for further details. + // Defaults to "sub". + // +optional + optional string usernameClaim = 8; + + // If provided, all usernames will be prefixed with this value. If not provided, username claims other than 'email' are prefixed by the issuer URL to avoid clashes. To skip any prefixing, provide the value '-'. + // +optional + optional string usernamePrefix = 9; +} + +// OpenIDConnectClientAuthentication contains configuration for OIDC clients. +message OpenIDConnectClientAuthentication { + // The client Secret for the OpenID Connect client. + // +optional + optional string secret = 1; + + // Extra configuration added to kubeconfig's auth-provider. + // Must not be any of idp-issuer-url, client-id, client-secret, idp-certificate-authority, idp-certificate-authority-data, id-token or refresh-token + // +optional + map extraConfig = 2; +} + +// OpenIDConnectPreset is a OpenID Connect configuration that is applied +// to a Shoot in a namespace. +message OpenIDConnectPreset { + // Standard object metadata. + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Spec is the specification of this OpenIDConnect preset. + optional OpenIDConnectPresetSpec spec = 2; +} + +// OpenIDConnectPresetList is a collection of OpenIDConnectPresets. +message OpenIDConnectPresetList { + // Standard list object metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of OpenIDConnectPresets. + repeated OpenIDConnectPreset items = 2; +} + +// OpenIDConnectPresetSpec contains the Shoot selector for which +// a specific OpenID Connect configuration is applied. +message OpenIDConnectPresetSpec { + // Server contains the kube-apiserver's OpenID Connect configuration. + // This configuration is not overwritting any existing OpenID Connect + // configuration already set on the Shoot object. + optional KubeAPIServerOpenIDConnect server = 1; + + // Client contains the configuration used for client OIDC authentication + // of Shoot clusters. + // This configuration is not overwritting any existing OpenID Connect + // client authentication already set on the Shoot object. + // +optional + optional OpenIDConnectClientAuthentication client = 2; + + // ShootSelector decides whether to apply the configuration if the + // Shoot has matching labels. + // Use the selector only if the OIDC Preset is opt-in, because end + // users may skip the admission by setting the labels. + // Default to the empty LabelSelector, which matches everything. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector shootSelector = 3; + + // Weight associated with matching the corresponding preset, + // in the range 1-100. + // Required. + optional int32 weight = 4; +} + diff --git a/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/register.go b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/register.go new file mode 100644 index 00000000..c783212b --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/register.go @@ -0,0 +1,57 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the name of the settings API group. +const GroupName = "settings.gardener.cloud" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +// Kind takes an unqualified kind and returns a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + // SchemeBuilder is a new Scheme Builder which registers our API. + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs) + localSchemeBuilder = &SchemeBuilder + // AddToScheme is a reference to the Scheme Builder's AddToScheme function. + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &ClusterOpenIDConnectPreset{}, + &ClusterOpenIDConnectPresetList{}, + &OpenIDConnectPreset{}, + &OpenIDConnectPresetList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/types_cluster_openidconnect_preset.go b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/types_cluster_openidconnect_preset.go new file mode 100644 index 00000000..8422e9e7 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/types_cluster_openidconnect_preset.go @@ -0,0 +1,59 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterOpenIDConnectPreset is a OpenID Connect configuration that is applied +// to a Shoot objects cluster-wide. +type ClusterOpenIDConnectPreset struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Spec is the specification of this OpenIDConnect preset. + Spec ClusterOpenIDConnectPresetSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` +} + +// ClusterOpenIDConnectPresetSpec contains the OpenIDConnect specification and +// project selector matching Shoots in Projects. +type ClusterOpenIDConnectPresetSpec struct { + OpenIDConnectPresetSpec `json:",inline" protobuf:"bytes,1,opt,name=openIDConnectPresetSpec"` + + // Project decides whether to apply the configuration if the + // Shoot is in a specific Project matching the label selector. + // Use the selector only if the OIDC Preset is opt-in, because end + // users may skip the admission by setting the labels. + // Defaults to the empty LabelSelector, which matches everything. + // +optional + ProjectSelector *metav1.LabelSelector `json:"projectSelector,omitempty" protobuf:"bytes,2,opt,name=projectSelector"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterOpenIDConnectPresetList is a collection of ClusterOpenIDConnectPresets. +type ClusterOpenIDConnectPresetList struct { + metav1.TypeMeta `json:",inline"` + // Standard list object metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Items is the list of ClusterOpenIDConnectPresets. + Items []ClusterOpenIDConnectPreset `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/types_openidconnect_preset.go b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/types_openidconnect_preset.go new file mode 100644 index 00000000..b5ae4769 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/types_openidconnect_preset.go @@ -0,0 +1,44 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// OpenIDConnectPreset is a OpenID Connect configuration that is applied +// to a Shoot in a namespace. +type OpenIDConnectPreset struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Spec is the specification of this OpenIDConnect preset. + Spec OpenIDConnectPresetSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// OpenIDConnectPresetList is a collection of OpenIDConnectPresets. +type OpenIDConnectPresetList struct { + metav1.TypeMeta `json:",inline"` + // Standard list object metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Items is the list of OpenIDConnectPresets. + Items []OpenIDConnectPreset `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/types_shared.go b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/types_shared.go new file mode 100644 index 00000000..01b4e840 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/types_shared.go @@ -0,0 +1,105 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + // DefaultUsernameClaim is the default username claim. + DefaultUsernameClaim = "sub" + // DefaultSignAlg is the default signing algorithm. + DefaultSignAlg = "RS256" +) + +// OpenIDConnectPresetSpec contains the Shoot selector for which +// a specific OpenID Connect configuration is applied. +type OpenIDConnectPresetSpec struct { + + // Server contains the kube-apiserver's OpenID Connect configuration. + // This configuration is not overwritting any existing OpenID Connect + // configuration already set on the Shoot object. + Server KubeAPIServerOpenIDConnect `json:"server" protobuf:"bytes,1,opt,name=server"` + + // Client contains the configuration used for client OIDC authentication + // of Shoot clusters. + // This configuration is not overwritting any existing OpenID Connect + // client authentication already set on the Shoot object. + // +optional + Client *OpenIDConnectClientAuthentication `json:"client,omitempty" protobuf:"bytes,2,opt,name=client"` + + // ShootSelector decides whether to apply the configuration if the + // Shoot has matching labels. + // Use the selector only if the OIDC Preset is opt-in, because end + // users may skip the admission by setting the labels. + // Default to the empty LabelSelector, which matches everything. + // +optional + ShootSelector *metav1.LabelSelector `json:"shootSelector,omitempty" protobuf:"bytes,3,opt,name=shootSelector"` + + // Weight associated with matching the corresponding preset, + // in the range 1-100. + // Required. + Weight int32 `json:"weight" protobuf:"varint,4,opt,name=weight"` +} + +// This is copied to not depend on the gardener package and keep it version agnostic. + +// KubeAPIServerOpenIDConnect contains configuration settings for the OIDC provider. +// Note: Descriptions were taken from the Kubernetes documentation. +type KubeAPIServerOpenIDConnect struct { + // If set, the OpenID server's certificate will be verified by one of the authorities in the oidc-ca-file, otherwise the host's root CA set will be used. + // +optional + CABundle *string `json:"caBundle,omitempty" protobuf:"bytes,1,opt,name=caBundle"` + // The client ID for the OpenID Connect client. + // Required. + ClientID string `json:"clientID" protobuf:"bytes,2,opt,name=clientID"` + // If provided, the name of a custom OpenID Connect claim for specifying user groups. The claim value is expected to be a string or array of strings. This field is experimental, please see the authentication documentation for further details. + // +optional + GroupsClaim *string `json:"groupsClaim,omitempty" protobuf:"bytes,3,opt,name=groupsClaim"` + // If provided, all groups will be prefixed with this value to prevent conflicts with other authentication strategies. + // +optional + GroupsPrefix *string `json:"groupsPrefix,omitempty" protobuf:"bytes,4,opt,name=groupsPrefix"` + // The URL of the OpenID issuer, only HTTPS scheme will be accepted. If set, it will be used to verify the OIDC JSON Web Token (JWT). + // Required. + IssuerURL string `json:"issuerURL" protobuf:"bytes,5,opt,name=issuerURL"` + // key=value pairs that describes a required claim in the ID Token. If set, the claim is verified to be present in the ID Token with a matching value. + // Only applied when the Kubernetes version of the Shoot is >= 1.11 + // +optional + RequiredClaims map[string]string `json:"requiredClaims,omitempty" protobuf:"bytes,6,rep,name=requiredClaims"` + // List of allowed JOSE asymmetric signing algorithms. JWTs with a 'alg' header value not in this list will be rejected. Values are defined by RFC 7518 https://tools.ietf.org/html/rfc7518#section-3.1 + // Defaults to [RS256] + // +optional + SigningAlgs []string `json:"signingAlgs,omitempty" protobuf:"bytes,7,rep,name=signingAlgs"` + // The OpenID claim to use as the user name. Note that claims other than the default ('sub') is not guaranteed to be unique and immutable. This field is experimental, please see the authentication documentation for further details. + // Defaults to "sub". + // +optional + UsernameClaim *string `json:"usernameClaim,omitempty" protobuf:"bytes,8,opt,name=usernameClaim"` + // If provided, all usernames will be prefixed with this value. If not provided, username claims other than 'email' are prefixed by the issuer URL to avoid clashes. To skip any prefixing, provide the value '-'. + // +optional + UsernamePrefix *string `json:"usernamePrefix,omitempty" protobuf:"bytes,9,opt,name=usernamePrefix"` +} + +// OpenIDConnectClientAuthentication contains configuration for OIDC clients. +type OpenIDConnectClientAuthentication struct { + // The client Secret for the OpenID Connect client. + // +optional + Secret *string `json:"secret,omitempty" protobuf:"bytes,1,opt,name=secret"` + + // Extra configuration added to kubeconfig's auth-provider. + // Must not be any of idp-issuer-url, client-id, client-secret, idp-certificate-authority, idp-certificate-authority-data, id-token or refresh-token + // +optional + ExtraConfig map[string]string `json:"extraConfig,omitempty" protobuf:"bytes,2,rep,name=extraConfig"` +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/zz_generated.conversion.go b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..453f3eff --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,330 @@ +// +build !ignore_autogenerated + +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + unsafe "unsafe" + + settings "github.com/gardener/gardener/pkg/apis/settings" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*ClusterOpenIDConnectPreset)(nil), (*settings.ClusterOpenIDConnectPreset)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ClusterOpenIDConnectPreset_To_settings_ClusterOpenIDConnectPreset(a.(*ClusterOpenIDConnectPreset), b.(*settings.ClusterOpenIDConnectPreset), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*settings.ClusterOpenIDConnectPreset)(nil), (*ClusterOpenIDConnectPreset)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_settings_ClusterOpenIDConnectPreset_To_v1alpha1_ClusterOpenIDConnectPreset(a.(*settings.ClusterOpenIDConnectPreset), b.(*ClusterOpenIDConnectPreset), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterOpenIDConnectPresetList)(nil), (*settings.ClusterOpenIDConnectPresetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ClusterOpenIDConnectPresetList_To_settings_ClusterOpenIDConnectPresetList(a.(*ClusterOpenIDConnectPresetList), b.(*settings.ClusterOpenIDConnectPresetList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*settings.ClusterOpenIDConnectPresetList)(nil), (*ClusterOpenIDConnectPresetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_settings_ClusterOpenIDConnectPresetList_To_v1alpha1_ClusterOpenIDConnectPresetList(a.(*settings.ClusterOpenIDConnectPresetList), b.(*ClusterOpenIDConnectPresetList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterOpenIDConnectPresetSpec)(nil), (*settings.ClusterOpenIDConnectPresetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ClusterOpenIDConnectPresetSpec_To_settings_ClusterOpenIDConnectPresetSpec(a.(*ClusterOpenIDConnectPresetSpec), b.(*settings.ClusterOpenIDConnectPresetSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*settings.ClusterOpenIDConnectPresetSpec)(nil), (*ClusterOpenIDConnectPresetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_settings_ClusterOpenIDConnectPresetSpec_To_v1alpha1_ClusterOpenIDConnectPresetSpec(a.(*settings.ClusterOpenIDConnectPresetSpec), b.(*ClusterOpenIDConnectPresetSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeAPIServerOpenIDConnect)(nil), (*settings.KubeAPIServerOpenIDConnect)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_KubeAPIServerOpenIDConnect_To_settings_KubeAPIServerOpenIDConnect(a.(*KubeAPIServerOpenIDConnect), b.(*settings.KubeAPIServerOpenIDConnect), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*settings.KubeAPIServerOpenIDConnect)(nil), (*KubeAPIServerOpenIDConnect)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_settings_KubeAPIServerOpenIDConnect_To_v1alpha1_KubeAPIServerOpenIDConnect(a.(*settings.KubeAPIServerOpenIDConnect), b.(*KubeAPIServerOpenIDConnect), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenIDConnectClientAuthentication)(nil), (*settings.OpenIDConnectClientAuthentication)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OpenIDConnectClientAuthentication_To_settings_OpenIDConnectClientAuthentication(a.(*OpenIDConnectClientAuthentication), b.(*settings.OpenIDConnectClientAuthentication), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*settings.OpenIDConnectClientAuthentication)(nil), (*OpenIDConnectClientAuthentication)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_settings_OpenIDConnectClientAuthentication_To_v1alpha1_OpenIDConnectClientAuthentication(a.(*settings.OpenIDConnectClientAuthentication), b.(*OpenIDConnectClientAuthentication), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenIDConnectPreset)(nil), (*settings.OpenIDConnectPreset)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OpenIDConnectPreset_To_settings_OpenIDConnectPreset(a.(*OpenIDConnectPreset), b.(*settings.OpenIDConnectPreset), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*settings.OpenIDConnectPreset)(nil), (*OpenIDConnectPreset)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_settings_OpenIDConnectPreset_To_v1alpha1_OpenIDConnectPreset(a.(*settings.OpenIDConnectPreset), b.(*OpenIDConnectPreset), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenIDConnectPresetList)(nil), (*settings.OpenIDConnectPresetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OpenIDConnectPresetList_To_settings_OpenIDConnectPresetList(a.(*OpenIDConnectPresetList), b.(*settings.OpenIDConnectPresetList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*settings.OpenIDConnectPresetList)(nil), (*OpenIDConnectPresetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_settings_OpenIDConnectPresetList_To_v1alpha1_OpenIDConnectPresetList(a.(*settings.OpenIDConnectPresetList), b.(*OpenIDConnectPresetList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenIDConnectPresetSpec)(nil), (*settings.OpenIDConnectPresetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OpenIDConnectPresetSpec_To_settings_OpenIDConnectPresetSpec(a.(*OpenIDConnectPresetSpec), b.(*settings.OpenIDConnectPresetSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*settings.OpenIDConnectPresetSpec)(nil), (*OpenIDConnectPresetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_settings_OpenIDConnectPresetSpec_To_v1alpha1_OpenIDConnectPresetSpec(a.(*settings.OpenIDConnectPresetSpec), b.(*OpenIDConnectPresetSpec), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_ClusterOpenIDConnectPreset_To_settings_ClusterOpenIDConnectPreset(in *ClusterOpenIDConnectPreset, out *settings.ClusterOpenIDConnectPreset, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_ClusterOpenIDConnectPresetSpec_To_settings_ClusterOpenIDConnectPresetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_ClusterOpenIDConnectPreset_To_settings_ClusterOpenIDConnectPreset is an autogenerated conversion function. +func Convert_v1alpha1_ClusterOpenIDConnectPreset_To_settings_ClusterOpenIDConnectPreset(in *ClusterOpenIDConnectPreset, out *settings.ClusterOpenIDConnectPreset, s conversion.Scope) error { + return autoConvert_v1alpha1_ClusterOpenIDConnectPreset_To_settings_ClusterOpenIDConnectPreset(in, out, s) +} + +func autoConvert_settings_ClusterOpenIDConnectPreset_To_v1alpha1_ClusterOpenIDConnectPreset(in *settings.ClusterOpenIDConnectPreset, out *ClusterOpenIDConnectPreset, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_settings_ClusterOpenIDConnectPresetSpec_To_v1alpha1_ClusterOpenIDConnectPresetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_settings_ClusterOpenIDConnectPreset_To_v1alpha1_ClusterOpenIDConnectPreset is an autogenerated conversion function. +func Convert_settings_ClusterOpenIDConnectPreset_To_v1alpha1_ClusterOpenIDConnectPreset(in *settings.ClusterOpenIDConnectPreset, out *ClusterOpenIDConnectPreset, s conversion.Scope) error { + return autoConvert_settings_ClusterOpenIDConnectPreset_To_v1alpha1_ClusterOpenIDConnectPreset(in, out, s) +} + +func autoConvert_v1alpha1_ClusterOpenIDConnectPresetList_To_settings_ClusterOpenIDConnectPresetList(in *ClusterOpenIDConnectPresetList, out *settings.ClusterOpenIDConnectPresetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]settings.ClusterOpenIDConnectPreset)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_ClusterOpenIDConnectPresetList_To_settings_ClusterOpenIDConnectPresetList is an autogenerated conversion function. +func Convert_v1alpha1_ClusterOpenIDConnectPresetList_To_settings_ClusterOpenIDConnectPresetList(in *ClusterOpenIDConnectPresetList, out *settings.ClusterOpenIDConnectPresetList, s conversion.Scope) error { + return autoConvert_v1alpha1_ClusterOpenIDConnectPresetList_To_settings_ClusterOpenIDConnectPresetList(in, out, s) +} + +func autoConvert_settings_ClusterOpenIDConnectPresetList_To_v1alpha1_ClusterOpenIDConnectPresetList(in *settings.ClusterOpenIDConnectPresetList, out *ClusterOpenIDConnectPresetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ClusterOpenIDConnectPreset)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_settings_ClusterOpenIDConnectPresetList_To_v1alpha1_ClusterOpenIDConnectPresetList is an autogenerated conversion function. +func Convert_settings_ClusterOpenIDConnectPresetList_To_v1alpha1_ClusterOpenIDConnectPresetList(in *settings.ClusterOpenIDConnectPresetList, out *ClusterOpenIDConnectPresetList, s conversion.Scope) error { + return autoConvert_settings_ClusterOpenIDConnectPresetList_To_v1alpha1_ClusterOpenIDConnectPresetList(in, out, s) +} + +func autoConvert_v1alpha1_ClusterOpenIDConnectPresetSpec_To_settings_ClusterOpenIDConnectPresetSpec(in *ClusterOpenIDConnectPresetSpec, out *settings.ClusterOpenIDConnectPresetSpec, s conversion.Scope) error { + if err := Convert_v1alpha1_OpenIDConnectPresetSpec_To_settings_OpenIDConnectPresetSpec(&in.OpenIDConnectPresetSpec, &out.OpenIDConnectPresetSpec, s); err != nil { + return err + } + out.ProjectSelector = (*v1.LabelSelector)(unsafe.Pointer(in.ProjectSelector)) + return nil +} + +// Convert_v1alpha1_ClusterOpenIDConnectPresetSpec_To_settings_ClusterOpenIDConnectPresetSpec is an autogenerated conversion function. +func Convert_v1alpha1_ClusterOpenIDConnectPresetSpec_To_settings_ClusterOpenIDConnectPresetSpec(in *ClusterOpenIDConnectPresetSpec, out *settings.ClusterOpenIDConnectPresetSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_ClusterOpenIDConnectPresetSpec_To_settings_ClusterOpenIDConnectPresetSpec(in, out, s) +} + +func autoConvert_settings_ClusterOpenIDConnectPresetSpec_To_v1alpha1_ClusterOpenIDConnectPresetSpec(in *settings.ClusterOpenIDConnectPresetSpec, out *ClusterOpenIDConnectPresetSpec, s conversion.Scope) error { + if err := Convert_settings_OpenIDConnectPresetSpec_To_v1alpha1_OpenIDConnectPresetSpec(&in.OpenIDConnectPresetSpec, &out.OpenIDConnectPresetSpec, s); err != nil { + return err + } + out.ProjectSelector = (*v1.LabelSelector)(unsafe.Pointer(in.ProjectSelector)) + return nil +} + +// Convert_settings_ClusterOpenIDConnectPresetSpec_To_v1alpha1_ClusterOpenIDConnectPresetSpec is an autogenerated conversion function. +func Convert_settings_ClusterOpenIDConnectPresetSpec_To_v1alpha1_ClusterOpenIDConnectPresetSpec(in *settings.ClusterOpenIDConnectPresetSpec, out *ClusterOpenIDConnectPresetSpec, s conversion.Scope) error { + return autoConvert_settings_ClusterOpenIDConnectPresetSpec_To_v1alpha1_ClusterOpenIDConnectPresetSpec(in, out, s) +} + +func autoConvert_v1alpha1_KubeAPIServerOpenIDConnect_To_settings_KubeAPIServerOpenIDConnect(in *KubeAPIServerOpenIDConnect, out *settings.KubeAPIServerOpenIDConnect, s conversion.Scope) error { + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + out.ClientID = in.ClientID + out.GroupsClaim = (*string)(unsafe.Pointer(in.GroupsClaim)) + out.GroupsPrefix = (*string)(unsafe.Pointer(in.GroupsPrefix)) + out.IssuerURL = in.IssuerURL + out.RequiredClaims = *(*map[string]string)(unsafe.Pointer(&in.RequiredClaims)) + out.SigningAlgs = *(*[]string)(unsafe.Pointer(&in.SigningAlgs)) + out.UsernameClaim = (*string)(unsafe.Pointer(in.UsernameClaim)) + out.UsernamePrefix = (*string)(unsafe.Pointer(in.UsernamePrefix)) + return nil +} + +// Convert_v1alpha1_KubeAPIServerOpenIDConnect_To_settings_KubeAPIServerOpenIDConnect is an autogenerated conversion function. +func Convert_v1alpha1_KubeAPIServerOpenIDConnect_To_settings_KubeAPIServerOpenIDConnect(in *KubeAPIServerOpenIDConnect, out *settings.KubeAPIServerOpenIDConnect, s conversion.Scope) error { + return autoConvert_v1alpha1_KubeAPIServerOpenIDConnect_To_settings_KubeAPIServerOpenIDConnect(in, out, s) +} + +func autoConvert_settings_KubeAPIServerOpenIDConnect_To_v1alpha1_KubeAPIServerOpenIDConnect(in *settings.KubeAPIServerOpenIDConnect, out *KubeAPIServerOpenIDConnect, s conversion.Scope) error { + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + out.ClientID = in.ClientID + out.GroupsClaim = (*string)(unsafe.Pointer(in.GroupsClaim)) + out.GroupsPrefix = (*string)(unsafe.Pointer(in.GroupsPrefix)) + out.IssuerURL = in.IssuerURL + out.RequiredClaims = *(*map[string]string)(unsafe.Pointer(&in.RequiredClaims)) + out.SigningAlgs = *(*[]string)(unsafe.Pointer(&in.SigningAlgs)) + out.UsernameClaim = (*string)(unsafe.Pointer(in.UsernameClaim)) + out.UsernamePrefix = (*string)(unsafe.Pointer(in.UsernamePrefix)) + return nil +} + +// Convert_settings_KubeAPIServerOpenIDConnect_To_v1alpha1_KubeAPIServerOpenIDConnect is an autogenerated conversion function. +func Convert_settings_KubeAPIServerOpenIDConnect_To_v1alpha1_KubeAPIServerOpenIDConnect(in *settings.KubeAPIServerOpenIDConnect, out *KubeAPIServerOpenIDConnect, s conversion.Scope) error { + return autoConvert_settings_KubeAPIServerOpenIDConnect_To_v1alpha1_KubeAPIServerOpenIDConnect(in, out, s) +} + +func autoConvert_v1alpha1_OpenIDConnectClientAuthentication_To_settings_OpenIDConnectClientAuthentication(in *OpenIDConnectClientAuthentication, out *settings.OpenIDConnectClientAuthentication, s conversion.Scope) error { + out.Secret = (*string)(unsafe.Pointer(in.Secret)) + out.ExtraConfig = *(*map[string]string)(unsafe.Pointer(&in.ExtraConfig)) + return nil +} + +// Convert_v1alpha1_OpenIDConnectClientAuthentication_To_settings_OpenIDConnectClientAuthentication is an autogenerated conversion function. +func Convert_v1alpha1_OpenIDConnectClientAuthentication_To_settings_OpenIDConnectClientAuthentication(in *OpenIDConnectClientAuthentication, out *settings.OpenIDConnectClientAuthentication, s conversion.Scope) error { + return autoConvert_v1alpha1_OpenIDConnectClientAuthentication_To_settings_OpenIDConnectClientAuthentication(in, out, s) +} + +func autoConvert_settings_OpenIDConnectClientAuthentication_To_v1alpha1_OpenIDConnectClientAuthentication(in *settings.OpenIDConnectClientAuthentication, out *OpenIDConnectClientAuthentication, s conversion.Scope) error { + out.Secret = (*string)(unsafe.Pointer(in.Secret)) + out.ExtraConfig = *(*map[string]string)(unsafe.Pointer(&in.ExtraConfig)) + return nil +} + +// Convert_settings_OpenIDConnectClientAuthentication_To_v1alpha1_OpenIDConnectClientAuthentication is an autogenerated conversion function. +func Convert_settings_OpenIDConnectClientAuthentication_To_v1alpha1_OpenIDConnectClientAuthentication(in *settings.OpenIDConnectClientAuthentication, out *OpenIDConnectClientAuthentication, s conversion.Scope) error { + return autoConvert_settings_OpenIDConnectClientAuthentication_To_v1alpha1_OpenIDConnectClientAuthentication(in, out, s) +} + +func autoConvert_v1alpha1_OpenIDConnectPreset_To_settings_OpenIDConnectPreset(in *OpenIDConnectPreset, out *settings.OpenIDConnectPreset, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OpenIDConnectPresetSpec_To_settings_OpenIDConnectPresetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OpenIDConnectPreset_To_settings_OpenIDConnectPreset is an autogenerated conversion function. +func Convert_v1alpha1_OpenIDConnectPreset_To_settings_OpenIDConnectPreset(in *OpenIDConnectPreset, out *settings.OpenIDConnectPreset, s conversion.Scope) error { + return autoConvert_v1alpha1_OpenIDConnectPreset_To_settings_OpenIDConnectPreset(in, out, s) +} + +func autoConvert_settings_OpenIDConnectPreset_To_v1alpha1_OpenIDConnectPreset(in *settings.OpenIDConnectPreset, out *OpenIDConnectPreset, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_settings_OpenIDConnectPresetSpec_To_v1alpha1_OpenIDConnectPresetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_settings_OpenIDConnectPreset_To_v1alpha1_OpenIDConnectPreset is an autogenerated conversion function. +func Convert_settings_OpenIDConnectPreset_To_v1alpha1_OpenIDConnectPreset(in *settings.OpenIDConnectPreset, out *OpenIDConnectPreset, s conversion.Scope) error { + return autoConvert_settings_OpenIDConnectPreset_To_v1alpha1_OpenIDConnectPreset(in, out, s) +} + +func autoConvert_v1alpha1_OpenIDConnectPresetList_To_settings_OpenIDConnectPresetList(in *OpenIDConnectPresetList, out *settings.OpenIDConnectPresetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]settings.OpenIDConnectPreset)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_OpenIDConnectPresetList_To_settings_OpenIDConnectPresetList is an autogenerated conversion function. +func Convert_v1alpha1_OpenIDConnectPresetList_To_settings_OpenIDConnectPresetList(in *OpenIDConnectPresetList, out *settings.OpenIDConnectPresetList, s conversion.Scope) error { + return autoConvert_v1alpha1_OpenIDConnectPresetList_To_settings_OpenIDConnectPresetList(in, out, s) +} + +func autoConvert_settings_OpenIDConnectPresetList_To_v1alpha1_OpenIDConnectPresetList(in *settings.OpenIDConnectPresetList, out *OpenIDConnectPresetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]OpenIDConnectPreset)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_settings_OpenIDConnectPresetList_To_v1alpha1_OpenIDConnectPresetList is an autogenerated conversion function. +func Convert_settings_OpenIDConnectPresetList_To_v1alpha1_OpenIDConnectPresetList(in *settings.OpenIDConnectPresetList, out *OpenIDConnectPresetList, s conversion.Scope) error { + return autoConvert_settings_OpenIDConnectPresetList_To_v1alpha1_OpenIDConnectPresetList(in, out, s) +} + +func autoConvert_v1alpha1_OpenIDConnectPresetSpec_To_settings_OpenIDConnectPresetSpec(in *OpenIDConnectPresetSpec, out *settings.OpenIDConnectPresetSpec, s conversion.Scope) error { + if err := Convert_v1alpha1_KubeAPIServerOpenIDConnect_To_settings_KubeAPIServerOpenIDConnect(&in.Server, &out.Server, s); err != nil { + return err + } + out.Client = (*settings.OpenIDConnectClientAuthentication)(unsafe.Pointer(in.Client)) + out.ShootSelector = (*v1.LabelSelector)(unsafe.Pointer(in.ShootSelector)) + out.Weight = in.Weight + return nil +} + +// Convert_v1alpha1_OpenIDConnectPresetSpec_To_settings_OpenIDConnectPresetSpec is an autogenerated conversion function. +func Convert_v1alpha1_OpenIDConnectPresetSpec_To_settings_OpenIDConnectPresetSpec(in *OpenIDConnectPresetSpec, out *settings.OpenIDConnectPresetSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OpenIDConnectPresetSpec_To_settings_OpenIDConnectPresetSpec(in, out, s) +} + +func autoConvert_settings_OpenIDConnectPresetSpec_To_v1alpha1_OpenIDConnectPresetSpec(in *settings.OpenIDConnectPresetSpec, out *OpenIDConnectPresetSpec, s conversion.Scope) error { + if err := Convert_settings_KubeAPIServerOpenIDConnect_To_v1alpha1_KubeAPIServerOpenIDConnect(&in.Server, &out.Server, s); err != nil { + return err + } + out.Client = (*OpenIDConnectClientAuthentication)(unsafe.Pointer(in.Client)) + out.ShootSelector = (*v1.LabelSelector)(unsafe.Pointer(in.ShootSelector)) + out.Weight = in.Weight + return nil +} + +// Convert_settings_OpenIDConnectPresetSpec_To_v1alpha1_OpenIDConnectPresetSpec is an autogenerated conversion function. +func Convert_settings_OpenIDConnectPresetSpec_To_v1alpha1_OpenIDConnectPresetSpec(in *settings.OpenIDConnectPresetSpec, out *OpenIDConnectPresetSpec, s conversion.Scope) error { + return autoConvert_settings_OpenIDConnectPresetSpec_To_v1alpha1_OpenIDConnectPresetSpec(in, out, s) +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000..39a9acb6 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,276 @@ +// +build !ignore_autogenerated + +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterOpenIDConnectPreset) DeepCopyInto(out *ClusterOpenIDConnectPreset) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterOpenIDConnectPreset. +func (in *ClusterOpenIDConnectPreset) DeepCopy() *ClusterOpenIDConnectPreset { + if in == nil { + return nil + } + out := new(ClusterOpenIDConnectPreset) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterOpenIDConnectPreset) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterOpenIDConnectPresetList) DeepCopyInto(out *ClusterOpenIDConnectPresetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterOpenIDConnectPreset, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterOpenIDConnectPresetList. +func (in *ClusterOpenIDConnectPresetList) DeepCopy() *ClusterOpenIDConnectPresetList { + if in == nil { + return nil + } + out := new(ClusterOpenIDConnectPresetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterOpenIDConnectPresetList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterOpenIDConnectPresetSpec) DeepCopyInto(out *ClusterOpenIDConnectPresetSpec) { + *out = *in + in.OpenIDConnectPresetSpec.DeepCopyInto(&out.OpenIDConnectPresetSpec) + if in.ProjectSelector != nil { + in, out := &in.ProjectSelector, &out.ProjectSelector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterOpenIDConnectPresetSpec. +func (in *ClusterOpenIDConnectPresetSpec) DeepCopy() *ClusterOpenIDConnectPresetSpec { + if in == nil { + return nil + } + out := new(ClusterOpenIDConnectPresetSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeAPIServerOpenIDConnect) DeepCopyInto(out *KubeAPIServerOpenIDConnect) { + *out = *in + if in.CABundle != nil { + in, out := &in.CABundle, &out.CABundle + *out = new(string) + **out = **in + } + if in.GroupsClaim != nil { + in, out := &in.GroupsClaim, &out.GroupsClaim + *out = new(string) + **out = **in + } + if in.GroupsPrefix != nil { + in, out := &in.GroupsPrefix, &out.GroupsPrefix + *out = new(string) + **out = **in + } + if in.RequiredClaims != nil { + in, out := &in.RequiredClaims, &out.RequiredClaims + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SigningAlgs != nil { + in, out := &in.SigningAlgs, &out.SigningAlgs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.UsernameClaim != nil { + in, out := &in.UsernameClaim, &out.UsernameClaim + *out = new(string) + **out = **in + } + if in.UsernamePrefix != nil { + in, out := &in.UsernamePrefix, &out.UsernamePrefix + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeAPIServerOpenIDConnect. +func (in *KubeAPIServerOpenIDConnect) DeepCopy() *KubeAPIServerOpenIDConnect { + if in == nil { + return nil + } + out := new(KubeAPIServerOpenIDConnect) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenIDConnectClientAuthentication) DeepCopyInto(out *OpenIDConnectClientAuthentication) { + *out = *in + if in.Secret != nil { + in, out := &in.Secret, &out.Secret + *out = new(string) + **out = **in + } + if in.ExtraConfig != nil { + in, out := &in.ExtraConfig, &out.ExtraConfig + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDConnectClientAuthentication. +func (in *OpenIDConnectClientAuthentication) DeepCopy() *OpenIDConnectClientAuthentication { + if in == nil { + return nil + } + out := new(OpenIDConnectClientAuthentication) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenIDConnectPreset) DeepCopyInto(out *OpenIDConnectPreset) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDConnectPreset. +func (in *OpenIDConnectPreset) DeepCopy() *OpenIDConnectPreset { + if in == nil { + return nil + } + out := new(OpenIDConnectPreset) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenIDConnectPreset) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenIDConnectPresetList) DeepCopyInto(out *OpenIDConnectPresetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OpenIDConnectPreset, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDConnectPresetList. +func (in *OpenIDConnectPresetList) DeepCopy() *OpenIDConnectPresetList { + if in == nil { + return nil + } + out := new(OpenIDConnectPresetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenIDConnectPresetList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenIDConnectPresetSpec) DeepCopyInto(out *OpenIDConnectPresetSpec) { + *out = *in + in.Server.DeepCopyInto(&out.Server) + if in.Client != nil { + in, out := &in.Client, &out.Client + *out = new(OpenIDConnectClientAuthentication) + (*in).DeepCopyInto(*out) + } + if in.ShootSelector != nil { + in, out := &in.ShootSelector, &out.ShootSelector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDConnectPresetSpec. +func (in *OpenIDConnectPresetSpec) DeepCopy() *OpenIDConnectPresetSpec { + if in == nil { + return nil + } + out := new(OpenIDConnectPresetSpec) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/zz_generated.defaults.go b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/zz_generated.defaults.go new file mode 100644 index 00000000..9711fbf9 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/settings/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,60 @@ +// +build !ignore_autogenerated + +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&ClusterOpenIDConnectPreset{}, func(obj interface{}) { SetObjectDefaults_ClusterOpenIDConnectPreset(obj.(*ClusterOpenIDConnectPreset)) }) + scheme.AddTypeDefaultingFunc(&ClusterOpenIDConnectPresetList{}, func(obj interface{}) { + SetObjectDefaults_ClusterOpenIDConnectPresetList(obj.(*ClusterOpenIDConnectPresetList)) + }) + scheme.AddTypeDefaultingFunc(&OpenIDConnectPreset{}, func(obj interface{}) { SetObjectDefaults_OpenIDConnectPreset(obj.(*OpenIDConnectPreset)) }) + scheme.AddTypeDefaultingFunc(&OpenIDConnectPresetList{}, func(obj interface{}) { SetObjectDefaults_OpenIDConnectPresetList(obj.(*OpenIDConnectPresetList)) }) + return nil +} + +func SetObjectDefaults_ClusterOpenIDConnectPreset(in *ClusterOpenIDConnectPreset) { + SetDefaults_ClusterOpenIDConnectPreset(in) +} + +func SetObjectDefaults_ClusterOpenIDConnectPresetList(in *ClusterOpenIDConnectPresetList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_ClusterOpenIDConnectPreset(a) + } +} + +func SetObjectDefaults_OpenIDConnectPreset(in *OpenIDConnectPreset) { + SetDefaults_OpenIDConnectPreset(in) +} + +func SetObjectDefaults_OpenIDConnectPresetList(in *OpenIDConnectPresetList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_OpenIDConnectPreset(a) + } +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/settings/zz_generated.deepcopy.go b/vendor/github.com/gardener/gardener/pkg/apis/settings/zz_generated.deepcopy.go new file mode 100644 index 00000000..f79064cc --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/settings/zz_generated.deepcopy.go @@ -0,0 +1,276 @@ +// +build !ignore_autogenerated + +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package settings + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterOpenIDConnectPreset) DeepCopyInto(out *ClusterOpenIDConnectPreset) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterOpenIDConnectPreset. +func (in *ClusterOpenIDConnectPreset) DeepCopy() *ClusterOpenIDConnectPreset { + if in == nil { + return nil + } + out := new(ClusterOpenIDConnectPreset) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterOpenIDConnectPreset) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterOpenIDConnectPresetList) DeepCopyInto(out *ClusterOpenIDConnectPresetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterOpenIDConnectPreset, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterOpenIDConnectPresetList. +func (in *ClusterOpenIDConnectPresetList) DeepCopy() *ClusterOpenIDConnectPresetList { + if in == nil { + return nil + } + out := new(ClusterOpenIDConnectPresetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterOpenIDConnectPresetList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterOpenIDConnectPresetSpec) DeepCopyInto(out *ClusterOpenIDConnectPresetSpec) { + *out = *in + in.OpenIDConnectPresetSpec.DeepCopyInto(&out.OpenIDConnectPresetSpec) + if in.ProjectSelector != nil { + in, out := &in.ProjectSelector, &out.ProjectSelector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterOpenIDConnectPresetSpec. +func (in *ClusterOpenIDConnectPresetSpec) DeepCopy() *ClusterOpenIDConnectPresetSpec { + if in == nil { + return nil + } + out := new(ClusterOpenIDConnectPresetSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeAPIServerOpenIDConnect) DeepCopyInto(out *KubeAPIServerOpenIDConnect) { + *out = *in + if in.CABundle != nil { + in, out := &in.CABundle, &out.CABundle + *out = new(string) + **out = **in + } + if in.GroupsClaim != nil { + in, out := &in.GroupsClaim, &out.GroupsClaim + *out = new(string) + **out = **in + } + if in.GroupsPrefix != nil { + in, out := &in.GroupsPrefix, &out.GroupsPrefix + *out = new(string) + **out = **in + } + if in.RequiredClaims != nil { + in, out := &in.RequiredClaims, &out.RequiredClaims + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SigningAlgs != nil { + in, out := &in.SigningAlgs, &out.SigningAlgs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.UsernameClaim != nil { + in, out := &in.UsernameClaim, &out.UsernameClaim + *out = new(string) + **out = **in + } + if in.UsernamePrefix != nil { + in, out := &in.UsernamePrefix, &out.UsernamePrefix + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeAPIServerOpenIDConnect. +func (in *KubeAPIServerOpenIDConnect) DeepCopy() *KubeAPIServerOpenIDConnect { + if in == nil { + return nil + } + out := new(KubeAPIServerOpenIDConnect) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenIDConnectClientAuthentication) DeepCopyInto(out *OpenIDConnectClientAuthentication) { + *out = *in + if in.Secret != nil { + in, out := &in.Secret, &out.Secret + *out = new(string) + **out = **in + } + if in.ExtraConfig != nil { + in, out := &in.ExtraConfig, &out.ExtraConfig + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDConnectClientAuthentication. +func (in *OpenIDConnectClientAuthentication) DeepCopy() *OpenIDConnectClientAuthentication { + if in == nil { + return nil + } + out := new(OpenIDConnectClientAuthentication) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenIDConnectPreset) DeepCopyInto(out *OpenIDConnectPreset) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDConnectPreset. +func (in *OpenIDConnectPreset) DeepCopy() *OpenIDConnectPreset { + if in == nil { + return nil + } + out := new(OpenIDConnectPreset) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenIDConnectPreset) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenIDConnectPresetList) DeepCopyInto(out *OpenIDConnectPresetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OpenIDConnectPreset, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDConnectPresetList. +func (in *OpenIDConnectPresetList) DeepCopy() *OpenIDConnectPresetList { + if in == nil { + return nil + } + out := new(OpenIDConnectPresetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenIDConnectPresetList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenIDConnectPresetSpec) DeepCopyInto(out *OpenIDConnectPresetSpec) { + *out = *in + in.Server.DeepCopyInto(&out.Server) + if in.Client != nil { + in, out := &in.Client, &out.Client + *out = new(OpenIDConnectClientAuthentication) + (*in).DeepCopyInto(*out) + } + if in.ShootSelector != nil { + in, out := &in.ShootSelector, &out.ShootSelector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDConnectPresetSpec. +func (in *OpenIDConnectPresetSpec) DeepCopy() *OpenIDConnectPresetSpec { + if in == nil { + return nil + } + out := new(OpenIDConnectPresetSpec) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/backupbucket.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/backupbucket.go new file mode 100644 index 00000000..31ac02f2 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/backupbucket.go @@ -0,0 +1,68 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// BackupBucketLister helps list BackupBuckets. +// All objects returned here must be treated as read-only. +type BackupBucketLister interface { + // List lists all BackupBuckets in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.BackupBucket, err error) + // Get retrieves the BackupBucket from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.BackupBucket, error) + BackupBucketListerExpansion +} + +// backupBucketLister implements the BackupBucketLister interface. +type backupBucketLister struct { + indexer cache.Indexer +} + +// NewBackupBucketLister returns a new BackupBucketLister. +func NewBackupBucketLister(indexer cache.Indexer) BackupBucketLister { + return &backupBucketLister{indexer: indexer} +} + +// List lists all BackupBuckets in the indexer. +func (s *backupBucketLister) List(selector labels.Selector) (ret []*v1beta1.BackupBucket, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.BackupBucket)) + }) + return ret, err +} + +// Get retrieves the BackupBucket from the index for a given name. +func (s *backupBucketLister) Get(name string) (*v1beta1.BackupBucket, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("backupbucket"), name) + } + return obj.(*v1beta1.BackupBucket), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/backupentry.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/backupentry.go new file mode 100644 index 00000000..8ff29634 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/backupentry.go @@ -0,0 +1,99 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// BackupEntryLister helps list BackupEntries. +// All objects returned here must be treated as read-only. +type BackupEntryLister interface { + // List lists all BackupEntries in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.BackupEntry, err error) + // BackupEntries returns an object that can list and get BackupEntries. + BackupEntries(namespace string) BackupEntryNamespaceLister + BackupEntryListerExpansion +} + +// backupEntryLister implements the BackupEntryLister interface. +type backupEntryLister struct { + indexer cache.Indexer +} + +// NewBackupEntryLister returns a new BackupEntryLister. +func NewBackupEntryLister(indexer cache.Indexer) BackupEntryLister { + return &backupEntryLister{indexer: indexer} +} + +// List lists all BackupEntries in the indexer. +func (s *backupEntryLister) List(selector labels.Selector) (ret []*v1beta1.BackupEntry, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.BackupEntry)) + }) + return ret, err +} + +// BackupEntries returns an object that can list and get BackupEntries. +func (s *backupEntryLister) BackupEntries(namespace string) BackupEntryNamespaceLister { + return backupEntryNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// BackupEntryNamespaceLister helps list and get BackupEntries. +// All objects returned here must be treated as read-only. +type BackupEntryNamespaceLister interface { + // List lists all BackupEntries in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.BackupEntry, err error) + // Get retrieves the BackupEntry from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.BackupEntry, error) + BackupEntryNamespaceListerExpansion +} + +// backupEntryNamespaceLister implements the BackupEntryNamespaceLister +// interface. +type backupEntryNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all BackupEntries in the indexer for a given namespace. +func (s backupEntryNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.BackupEntry, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.BackupEntry)) + }) + return ret, err +} + +// Get retrieves the BackupEntry from the indexer for a given namespace and name. +func (s backupEntryNamespaceLister) Get(name string) (*v1beta1.BackupEntry, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("backupentry"), name) + } + return obj.(*v1beta1.BackupEntry), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/cloudprofile.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/cloudprofile.go new file mode 100644 index 00000000..27695657 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/cloudprofile.go @@ -0,0 +1,68 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// CloudProfileLister helps list CloudProfiles. +// All objects returned here must be treated as read-only. +type CloudProfileLister interface { + // List lists all CloudProfiles in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.CloudProfile, err error) + // Get retrieves the CloudProfile from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.CloudProfile, error) + CloudProfileListerExpansion +} + +// cloudProfileLister implements the CloudProfileLister interface. +type cloudProfileLister struct { + indexer cache.Indexer +} + +// NewCloudProfileLister returns a new CloudProfileLister. +func NewCloudProfileLister(indexer cache.Indexer) CloudProfileLister { + return &cloudProfileLister{indexer: indexer} +} + +// List lists all CloudProfiles in the indexer. +func (s *cloudProfileLister) List(selector labels.Selector) (ret []*v1beta1.CloudProfile, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.CloudProfile)) + }) + return ret, err +} + +// Get retrieves the CloudProfile from the index for a given name. +func (s *cloudProfileLister) Get(name string) (*v1beta1.CloudProfile, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("cloudprofile"), name) + } + return obj.(*v1beta1.CloudProfile), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/controllerinstallation.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/controllerinstallation.go new file mode 100644 index 00000000..c1659012 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/controllerinstallation.go @@ -0,0 +1,68 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ControllerInstallationLister helps list ControllerInstallations. +// All objects returned here must be treated as read-only. +type ControllerInstallationLister interface { + // List lists all ControllerInstallations in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.ControllerInstallation, err error) + // Get retrieves the ControllerInstallation from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.ControllerInstallation, error) + ControllerInstallationListerExpansion +} + +// controllerInstallationLister implements the ControllerInstallationLister interface. +type controllerInstallationLister struct { + indexer cache.Indexer +} + +// NewControllerInstallationLister returns a new ControllerInstallationLister. +func NewControllerInstallationLister(indexer cache.Indexer) ControllerInstallationLister { + return &controllerInstallationLister{indexer: indexer} +} + +// List lists all ControllerInstallations in the indexer. +func (s *controllerInstallationLister) List(selector labels.Selector) (ret []*v1beta1.ControllerInstallation, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.ControllerInstallation)) + }) + return ret, err +} + +// Get retrieves the ControllerInstallation from the index for a given name. +func (s *controllerInstallationLister) Get(name string) (*v1beta1.ControllerInstallation, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("controllerinstallation"), name) + } + return obj.(*v1beta1.ControllerInstallation), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/controllerregistration.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/controllerregistration.go new file mode 100644 index 00000000..3462b34e --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/controllerregistration.go @@ -0,0 +1,68 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ControllerRegistrationLister helps list ControllerRegistrations. +// All objects returned here must be treated as read-only. +type ControllerRegistrationLister interface { + // List lists all ControllerRegistrations in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.ControllerRegistration, err error) + // Get retrieves the ControllerRegistration from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.ControllerRegistration, error) + ControllerRegistrationListerExpansion +} + +// controllerRegistrationLister implements the ControllerRegistrationLister interface. +type controllerRegistrationLister struct { + indexer cache.Indexer +} + +// NewControllerRegistrationLister returns a new ControllerRegistrationLister. +func NewControllerRegistrationLister(indexer cache.Indexer) ControllerRegistrationLister { + return &controllerRegistrationLister{indexer: indexer} +} + +// List lists all ControllerRegistrations in the indexer. +func (s *controllerRegistrationLister) List(selector labels.Selector) (ret []*v1beta1.ControllerRegistration, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.ControllerRegistration)) + }) + return ret, err +} + +// Get retrieves the ControllerRegistration from the index for a given name. +func (s *controllerRegistrationLister) Get(name string) (*v1beta1.ControllerRegistration, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("controllerregistration"), name) + } + return obj.(*v1beta1.ControllerRegistration), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/expansion_generated.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/expansion_generated.go new file mode 100644 index 00000000..102799a5 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/expansion_generated.go @@ -0,0 +1,83 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +// BackupBucketListerExpansion allows custom methods to be added to +// BackupBucketLister. +type BackupBucketListerExpansion interface{} + +// BackupEntryListerExpansion allows custom methods to be added to +// BackupEntryLister. +type BackupEntryListerExpansion interface{} + +// BackupEntryNamespaceListerExpansion allows custom methods to be added to +// BackupEntryNamespaceLister. +type BackupEntryNamespaceListerExpansion interface{} + +// CloudProfileListerExpansion allows custom methods to be added to +// CloudProfileLister. +type CloudProfileListerExpansion interface{} + +// ControllerInstallationListerExpansion allows custom methods to be added to +// ControllerInstallationLister. +type ControllerInstallationListerExpansion interface{} + +// ControllerRegistrationListerExpansion allows custom methods to be added to +// ControllerRegistrationLister. +type ControllerRegistrationListerExpansion interface{} + +// PlantListerExpansion allows custom methods to be added to +// PlantLister. +type PlantListerExpansion interface{} + +// PlantNamespaceListerExpansion allows custom methods to be added to +// PlantNamespaceLister. +type PlantNamespaceListerExpansion interface{} + +// ProjectListerExpansion allows custom methods to be added to +// ProjectLister. +type ProjectListerExpansion interface{} + +// QuotaListerExpansion allows custom methods to be added to +// QuotaLister. +type QuotaListerExpansion interface{} + +// QuotaNamespaceListerExpansion allows custom methods to be added to +// QuotaNamespaceLister. +type QuotaNamespaceListerExpansion interface{} + +// SecretBindingListerExpansion allows custom methods to be added to +// SecretBindingLister. +type SecretBindingListerExpansion interface{} + +// SecretBindingNamespaceListerExpansion allows custom methods to be added to +// SecretBindingNamespaceLister. +type SecretBindingNamespaceListerExpansion interface{} + +// SeedListerExpansion allows custom methods to be added to +// SeedLister. +type SeedListerExpansion interface{} + +// ShootListerExpansion allows custom methods to be added to +// ShootLister. +type ShootListerExpansion interface{} + +// ShootNamespaceListerExpansion allows custom methods to be added to +// ShootNamespaceLister. +type ShootNamespaceListerExpansion interface{} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/plant.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/plant.go new file mode 100644 index 00000000..f0b959f9 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/plant.go @@ -0,0 +1,99 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// PlantLister helps list Plants. +// All objects returned here must be treated as read-only. +type PlantLister interface { + // List lists all Plants in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.Plant, err error) + // Plants returns an object that can list and get Plants. + Plants(namespace string) PlantNamespaceLister + PlantListerExpansion +} + +// plantLister implements the PlantLister interface. +type plantLister struct { + indexer cache.Indexer +} + +// NewPlantLister returns a new PlantLister. +func NewPlantLister(indexer cache.Indexer) PlantLister { + return &plantLister{indexer: indexer} +} + +// List lists all Plants in the indexer. +func (s *plantLister) List(selector labels.Selector) (ret []*v1beta1.Plant, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Plant)) + }) + return ret, err +} + +// Plants returns an object that can list and get Plants. +func (s *plantLister) Plants(namespace string) PlantNamespaceLister { + return plantNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// PlantNamespaceLister helps list and get Plants. +// All objects returned here must be treated as read-only. +type PlantNamespaceLister interface { + // List lists all Plants in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.Plant, err error) + // Get retrieves the Plant from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.Plant, error) + PlantNamespaceListerExpansion +} + +// plantNamespaceLister implements the PlantNamespaceLister +// interface. +type plantNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Plants in the indexer for a given namespace. +func (s plantNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Plant, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Plant)) + }) + return ret, err +} + +// Get retrieves the Plant from the indexer for a given namespace and name. +func (s plantNamespaceLister) Get(name string) (*v1beta1.Plant, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("plant"), name) + } + return obj.(*v1beta1.Plant), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/project.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/project.go new file mode 100644 index 00000000..df4c2f3c --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/project.go @@ -0,0 +1,68 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ProjectLister helps list Projects. +// All objects returned here must be treated as read-only. +type ProjectLister interface { + // List lists all Projects in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.Project, err error) + // Get retrieves the Project from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.Project, error) + ProjectListerExpansion +} + +// projectLister implements the ProjectLister interface. +type projectLister struct { + indexer cache.Indexer +} + +// NewProjectLister returns a new ProjectLister. +func NewProjectLister(indexer cache.Indexer) ProjectLister { + return &projectLister{indexer: indexer} +} + +// List lists all Projects in the indexer. +func (s *projectLister) List(selector labels.Selector) (ret []*v1beta1.Project, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Project)) + }) + return ret, err +} + +// Get retrieves the Project from the index for a given name. +func (s *projectLister) Get(name string) (*v1beta1.Project, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("project"), name) + } + return obj.(*v1beta1.Project), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/quota.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/quota.go new file mode 100644 index 00000000..14590528 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/quota.go @@ -0,0 +1,99 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// QuotaLister helps list Quotas. +// All objects returned here must be treated as read-only. +type QuotaLister interface { + // List lists all Quotas in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.Quota, err error) + // Quotas returns an object that can list and get Quotas. + Quotas(namespace string) QuotaNamespaceLister + QuotaListerExpansion +} + +// quotaLister implements the QuotaLister interface. +type quotaLister struct { + indexer cache.Indexer +} + +// NewQuotaLister returns a new QuotaLister. +func NewQuotaLister(indexer cache.Indexer) QuotaLister { + return "aLister{indexer: indexer} +} + +// List lists all Quotas in the indexer. +func (s *quotaLister) List(selector labels.Selector) (ret []*v1beta1.Quota, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Quota)) + }) + return ret, err +} + +// Quotas returns an object that can list and get Quotas. +func (s *quotaLister) Quotas(namespace string) QuotaNamespaceLister { + return quotaNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// QuotaNamespaceLister helps list and get Quotas. +// All objects returned here must be treated as read-only. +type QuotaNamespaceLister interface { + // List lists all Quotas in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.Quota, err error) + // Get retrieves the Quota from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.Quota, error) + QuotaNamespaceListerExpansion +} + +// quotaNamespaceLister implements the QuotaNamespaceLister +// interface. +type quotaNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Quotas in the indexer for a given namespace. +func (s quotaNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Quota, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Quota)) + }) + return ret, err +} + +// Get retrieves the Quota from the indexer for a given namespace and name. +func (s quotaNamespaceLister) Get(name string) (*v1beta1.Quota, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("quota"), name) + } + return obj.(*v1beta1.Quota), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/secretbinding.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/secretbinding.go new file mode 100644 index 00000000..d9c19222 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/secretbinding.go @@ -0,0 +1,99 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// SecretBindingLister helps list SecretBindings. +// All objects returned here must be treated as read-only. +type SecretBindingLister interface { + // List lists all SecretBindings in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.SecretBinding, err error) + // SecretBindings returns an object that can list and get SecretBindings. + SecretBindings(namespace string) SecretBindingNamespaceLister + SecretBindingListerExpansion +} + +// secretBindingLister implements the SecretBindingLister interface. +type secretBindingLister struct { + indexer cache.Indexer +} + +// NewSecretBindingLister returns a new SecretBindingLister. +func NewSecretBindingLister(indexer cache.Indexer) SecretBindingLister { + return &secretBindingLister{indexer: indexer} +} + +// List lists all SecretBindings in the indexer. +func (s *secretBindingLister) List(selector labels.Selector) (ret []*v1beta1.SecretBinding, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.SecretBinding)) + }) + return ret, err +} + +// SecretBindings returns an object that can list and get SecretBindings. +func (s *secretBindingLister) SecretBindings(namespace string) SecretBindingNamespaceLister { + return secretBindingNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// SecretBindingNamespaceLister helps list and get SecretBindings. +// All objects returned here must be treated as read-only. +type SecretBindingNamespaceLister interface { + // List lists all SecretBindings in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.SecretBinding, err error) + // Get retrieves the SecretBinding from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.SecretBinding, error) + SecretBindingNamespaceListerExpansion +} + +// secretBindingNamespaceLister implements the SecretBindingNamespaceLister +// interface. +type secretBindingNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all SecretBindings in the indexer for a given namespace. +func (s secretBindingNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.SecretBinding, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.SecretBinding)) + }) + return ret, err +} + +// Get retrieves the SecretBinding from the indexer for a given namespace and name. +func (s secretBindingNamespaceLister) Get(name string) (*v1beta1.SecretBinding, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("secretbinding"), name) + } + return obj.(*v1beta1.SecretBinding), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/seed.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/seed.go new file mode 100644 index 00000000..a0108360 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/seed.go @@ -0,0 +1,68 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// SeedLister helps list Seeds. +// All objects returned here must be treated as read-only. +type SeedLister interface { + // List lists all Seeds in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.Seed, err error) + // Get retrieves the Seed from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.Seed, error) + SeedListerExpansion +} + +// seedLister implements the SeedLister interface. +type seedLister struct { + indexer cache.Indexer +} + +// NewSeedLister returns a new SeedLister. +func NewSeedLister(indexer cache.Indexer) SeedLister { + return &seedLister{indexer: indexer} +} + +// List lists all Seeds in the indexer. +func (s *seedLister) List(selector labels.Selector) (ret []*v1beta1.Seed, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Seed)) + }) + return ret, err +} + +// Get retrieves the Seed from the index for a given name. +func (s *seedLister) Get(name string) (*v1beta1.Seed, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("seed"), name) + } + return obj.(*v1beta1.Seed), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/shoot.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/shoot.go new file mode 100644 index 00000000..9d42c6dc --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/shoot.go @@ -0,0 +1,99 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ShootLister helps list Shoots. +// All objects returned here must be treated as read-only. +type ShootLister interface { + // List lists all Shoots in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.Shoot, err error) + // Shoots returns an object that can list and get Shoots. + Shoots(namespace string) ShootNamespaceLister + ShootListerExpansion +} + +// shootLister implements the ShootLister interface. +type shootLister struct { + indexer cache.Indexer +} + +// NewShootLister returns a new ShootLister. +func NewShootLister(indexer cache.Indexer) ShootLister { + return &shootLister{indexer: indexer} +} + +// List lists all Shoots in the indexer. +func (s *shootLister) List(selector labels.Selector) (ret []*v1beta1.Shoot, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Shoot)) + }) + return ret, err +} + +// Shoots returns an object that can list and get Shoots. +func (s *shootLister) Shoots(namespace string) ShootNamespaceLister { + return shootNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ShootNamespaceLister helps list and get Shoots. +// All objects returned here must be treated as read-only. +type ShootNamespaceLister interface { + // List lists all Shoots in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.Shoot, err error) + // Get retrieves the Shoot from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.Shoot, error) + ShootNamespaceListerExpansion +} + +// shootNamespaceLister implements the ShootNamespaceLister +// interface. +type shootNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Shoots in the indexer for a given namespace. +func (s shootNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Shoot, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Shoot)) + }) + return ret, err +} + +// Get retrieves the Shoot from the indexer for a given namespace and name. +func (s shootNamespaceLister) Get(name string) (*v1beta1.Shoot, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("shoot"), name) + } + return obj.(*v1beta1.Shoot), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/applier.go b/vendor/github.com/gardener/gardener/pkg/client/kubernetes/applier.go index 0df139e6..1718e854 100644 --- a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/applier.go +++ b/vendor/github.com/gardener/gardener/pkg/client/kubernetes/applier.go @@ -85,11 +85,7 @@ func (a *defaultApplier) applyObject(ctx context.Context, desired *unstructured. } } - key, err := client.ObjectKeyFromObject(desired) - if err != nil { - return err - } - + key := client.ObjectKeyFromObject(desired) if len(key.Name) == 0 { return fmt.Errorf("missing 'metadata.name' in: %+v", desired) } diff --git a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/client.go b/vendor/github.com/gardener/gardener/pkg/client/kubernetes/client.go index 275eaead..e9cc4e54 100644 --- a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/client.go +++ b/vendor/github.com/gardener/gardener/pkg/client/kubernetes/client.go @@ -19,12 +19,10 @@ import ( "errors" "fmt" - gardencoreclientset "github.com/gardener/gardener/pkg/client/core/clientset/versioned" - "github.com/gardener/gardener/pkg/client/kubernetes/utils" - versionutils "github.com/gardener/gardener/pkg/utils/version" - corev1 "k8s.io/api/core/v1" apiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" + "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" kubernetesclientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" @@ -33,6 +31,14 @@ import ( apiserviceclientset "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset" "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/client/apiutil" + + gardencoreclientset "github.com/gardener/gardener/pkg/client/core/clientset/versioned" + gardenercorescheme "github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme" + gardenseedmanagementclientset "github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned" + seedmanagementscheme "github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/scheme" + settingsscheme "github.com/gardener/gardener/pkg/client/settings/clientset/versioned/scheme" + versionutils "github.com/gardener/gardener/pkg/utils/version" ) var ( @@ -45,6 +51,17 @@ var ( // KubeConfig is the key to the kubeconfig const KubeConfig = "kubeconfig" +func init() { + // enable protobuf for Gardener API for controller-runtime clients + protobufSchemeBuilder := runtime.NewSchemeBuilder( + gardenercorescheme.AddToScheme, + seedmanagementscheme.AddToScheme, + settingsscheme.AddToScheme, + ) + + utilruntime.Must(apiutil.AddToProtobufScheme(protobufSchemeBuilder.AddToScheme)) +} + // NewClientFromFile creates a new Client struct for a given kubeconfig. The kubeconfig will be // read from the filesystem at location . If given, overrides the // master URL in the kubeconfig. @@ -262,45 +279,50 @@ func newClientSet(conf *Config) (Interface, error) { } var runtimeClient client.Client - if UseCachedRuntimeClients && !conf.disableCachedClient { - if cacheOpts := conf.cacheReaderOptions; cacheOpts != nil { - runtimeClient, err = utils.NewClientWithSpecificallyCachedReader(runtimeCache, conf.restConfig, conf.clientOptions, cacheOpts.readSpecifiedFromCache, cacheOpts.specificallyCachedObjects...) - if err != nil { - return nil, err - } - } else { - runtimeClient, err = newRuntimeClientWithCache(conf.restConfig, conf.clientOptions, runtimeCache) - if err != nil { - return nil, err - } + if UseCachedRuntimeClients && !conf.disableCache { + runtimeClient, err = client.NewDelegatingClient(client.NewDelegatingClientInput{ + CacheReader: runtimeCache, + Client: directClient, + UncachedObjects: conf.uncachedObjects, + }) + if err != nil { + return nil, err } } else { runtimeClient = directClient } - kubernetes, err := kubernetesclientset.NewForConfig(conf.restConfig) + // prepare rest config with contentType defaulted to protobuf for client-go style clients that either talk to + // kubernetes or aggregated APIs that support protobuf. + cfg := defaultContentTypeProtobuf(conf.restConfig) + + kubernetes, err := kubernetesclientset.NewForConfig(cfg) + if err != nil { + return nil, err + } + + gardenCore, err := gardencoreclientset.NewForConfig(cfg) if err != nil { return nil, err } - gardenCore, err := gardencoreclientset.NewForConfig(conf.restConfig) + gardenSeedManagement, err := gardenseedmanagementclientset.NewForConfig(cfg) if err != nil { return nil, err } - apiRegistration, err := apiserviceclientset.NewForConfig(conf.restConfig) + apiRegistration, err := apiserviceclientset.NewForConfig(cfg) if err != nil { return nil, err } - apiExtension, err := apiextensionsclientset.NewForConfig(conf.restConfig) + apiExtension, err := apiextensionsclientset.NewForConfig(cfg) if err != nil { return nil, err } cs := &clientSet{ config: conf.restConfig, - restMapper: conf.clientOptions.Mapper, restClient: kubernetes.Discovery().RESTClient(), applier: NewApplier(runtimeClient, conf.clientOptions.Mapper), @@ -309,10 +331,11 @@ func newClientSet(conf *Config) (Interface, error) { directClient: directClient, cache: runtimeCache, - kubernetes: kubernetes, - gardenCore: gardenCore, - apiregistration: apiRegistration, - apiextension: apiExtension, + kubernetes: kubernetes, + gardenCore: gardenCore, + gardenSeedManagement: gardenSeedManagement, + apiregistration: apiRegistration, + apiextension: apiExtension, } if _, err := cs.DiscoverVersion(); err != nil { @@ -323,5 +346,16 @@ func newClientSet(conf *Config) (Interface, error) { } func setConfigDefaults(conf *Config) error { + // we can't default to protobuf ContentType here, otherwise controller-runtime clients will also try to talk to + // CRD resources (e.g. extension CRs in the Seed) using protobuf, but CRDs don't support protobuf + // see https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#advanced-features-and-flexibility return setClientOptionsDefaults(conf.restConfig, &conf.clientOptions) } + +func defaultContentTypeProtobuf(c *rest.Config) *rest.Config { + config := *c + if config.ContentType == "" { + config.ContentType = runtime.ContentTypeProtobuf + } + return &config +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/clientset.go b/vendor/github.com/gardener/gardener/pkg/client/kubernetes/clientset.go index b601962f..5fe61f46 100644 --- a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/clientset.go +++ b/vendor/github.com/gardener/gardener/pkg/client/kubernetes/clientset.go @@ -15,14 +15,15 @@ package kubernetes import ( + "context" "sync" "github.com/gardener/gardener/pkg/chartrenderer" gardencoreclientset "github.com/gardener/gardener/pkg/client/core/clientset/versioned" + gardenseedmanagementclientset "github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned" "github.com/gardener/gardener/pkg/logger" apiextensionclientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" - "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" @@ -40,7 +41,6 @@ import ( // The version string contains only the major/minor part in the form .. type clientSet struct { config *rest.Config - restMapper meta.RESTMapper restClient rest.Interface applier Applier @@ -58,10 +58,11 @@ type clientSet struct { // startOnce guards starting the cache only once startOnce sync.Once - kubernetes kubernetes.Interface - gardenCore gardencoreclientset.Interface - apiextension apiextensionclientset.Interface - apiregistration apiregistrationclientset.Interface + kubernetes kubernetes.Interface + gardenCore gardencoreclientset.Interface + gardenSeedManagement gardenseedmanagementclientset.Interface + apiextension apiextensionclientset.Interface + apiregistration apiregistrationclientset.Interface version string } @@ -91,8 +92,14 @@ func (c *clientSet) Client() client.Client { return c.client } +// APIReader returns a client.Reader that directly reads from the API server. +func (c *clientSet) APIReader() client.Reader { + return c.directClient +} + // DirectClient returns a controller-runtime client, which can be used to talk to the API server directly // (without using a cache). +// Deprecated: used APIReader instead, if the controller can't tolerate stale reads. func (c *clientSet) DirectClient() client.Client { return c.directClient } @@ -102,11 +109,6 @@ func (c *clientSet) Cache() cache.Cache { return c.cache } -// RESTMapper returns the restMapper of this ClientSet. -func (c *clientSet) RESTMapper() meta.RESTMapper { - return c.restMapper -} - // Kubernetes will return the kubernetes attribute of the Client object. func (c *clientSet) Kubernetes() kubernetes.Interface { return c.kubernetes @@ -117,6 +119,11 @@ func (c *clientSet) GardenCore() gardencoreclientset.Interface { return c.gardenCore } +// GardenSeedManagement will return the gardenSeedManagement attribute of the Client object. +func (c *clientSet) GardenSeedManagement() gardenseedmanagementclientset.Interface { + return c.gardenSeedManagement +} + // APIExtension will return the apiextensions attribute of the Client object. func (c *clientSet) APIExtension() apiextensionclientset.Interface { return c.apiextension @@ -159,10 +166,10 @@ func (c *clientSet) DiscoverVersion() (*version.Info, error) { // Start starts the cache of the ClientSet's controller-runtime client and returns immediately. // It must be called first before using the client to retrieve objects from the API server. -func (c *clientSet) Start(stopCh <-chan struct{}) { +func (c *clientSet) Start(ctx context.Context) { c.startOnce.Do(func() { go func() { - if err := c.cache.Start(stopCh); err != nil { + if err := c.cache.Start(ctx); err != nil { logger.Logger.Errorf("cache.Start returned error, which should never happen, ignoring.") } }() @@ -170,6 +177,6 @@ func (c *clientSet) Start(stopCh <-chan struct{}) { } // WaitForCacheSync waits for the cache of the ClientSet's controller-runtime client to be synced. -func (c *clientSet) WaitForCacheSync(stopCh <-chan struct{}) bool { - return c.cache.WaitForCacheSync(stopCh) +func (c *clientSet) WaitForCacheSync(ctx context.Context) bool { + return c.cache.WaitForCacheSync(ctx) } diff --git a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/options.go b/vendor/github.com/gardener/gardener/pkg/client/kubernetes/options.go index 429fea88..842aacb3 100644 --- a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/options.go +++ b/vendor/github.com/gardener/gardener/pkg/client/kubernetes/options.go @@ -18,7 +18,6 @@ import ( "errors" "time" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" baseconfig "k8s.io/component-base/config" "sigs.k8s.io/controller-runtime/pkg/client" @@ -26,17 +25,11 @@ import ( // Config carries options for new ClientSets. type Config struct { - clientOptions client.Options - restConfig *rest.Config - cacheResync *time.Duration - disableCachedClient bool - cacheReaderOptions *cacheReaderOptions -} - -// cacheReaderOptions configures the specificallyCachedReader -type cacheReaderOptions struct { - readSpecifiedFromCache bool - specificallyCachedObjects []runtime.Object + clientOptions client.Options + restConfig *rest.Config + cacheResync *time.Duration + disableCache bool + uncachedObjects []client.Object } // NewConfig returns a new Config with an empty REST config to allow testing ConfigFuncs without exporting @@ -94,29 +87,15 @@ func WithCacheResyncPeriod(resync time.Duration) ConfigFunc { // DirectClient(). func WithDisabledCachedClient() ConfigFunc { return func(config *Config) error { - config.disableCachedClient = true + config.disableCache = true return nil } } -// WithDisabledCacheFor disables the cached client for the specified objects' GroupKinds. -func WithDisabledCacheFor(objects ...runtime.Object) ConfigFunc { +// WithUncached disables the cached client for the specified objects' GroupKinds. +func WithUncached(objs ...client.Object) ConfigFunc { return func(config *Config) error { - config.cacheReaderOptions = &cacheReaderOptions{ - readSpecifiedFromCache: false, - specificallyCachedObjects: objects, - } - return nil - } -} - -// WithEnabledCacheFor enables the cached client only for the specified objects' GroupKinds. -func WithEnabledCacheFor(objects ...runtime.Object) ConfigFunc { - return func(config *Config) error { - config.cacheReaderOptions = &cacheReaderOptions{ - readSpecifiedFromCache: true, - specificallyCachedObjects: objects, - } + config.uncachedObjects = append(config.uncachedObjects, objs...) return nil } } diff --git a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/runtime_client.go b/vendor/github.com/gardener/gardener/pkg/client/kubernetes/runtime_client.go index 834816b1..255961df 100644 --- a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/runtime_client.go +++ b/vendor/github.com/gardener/gardener/pkg/client/kubernetes/runtime_client.go @@ -15,6 +15,7 @@ package kubernetes import ( + "context" "errors" "fmt" "time" @@ -29,6 +30,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/apiutil" + "sigs.k8s.io/controller-runtime/pkg/manager" ) const ( @@ -45,8 +47,8 @@ func NewDirectClient(config *rest.Config, options client.Options) (client.Client } // NewRuntimeClientWithCache creates a new client.client with the given config and options. -// The client uses a new cache, which will be started immediately using the given stop channel. -func NewRuntimeClientWithCache(config *rest.Config, options client.Options, stopCh <-chan struct{}) (client.Client, error) { +// The client uses a new cache, which will be started immediately using the given context. +func NewRuntimeClientWithCache(ctx context.Context, config *rest.Config, options client.Options, uncachedObjects ...client.Object) (client.Client, error) { if err := setClientOptionsDefaults(config, &options); err != nil { return nil, err } @@ -59,36 +61,24 @@ func NewRuntimeClientWithCache(config *rest.Config, options client.Options, stop return nil, fmt.Errorf("could not create new client cache: %w", err) } - runtimeClient, err := newRuntimeClientWithCache(config, options, clientCache) + runtimeClient, err := newRuntimeClientWithCache(config, options, clientCache, uncachedObjects...) if err != nil { return nil, err } go func() { - if err := clientCache.Start(stopCh); err != nil { + if err := clientCache.Start(ctx); err != nil { logger.NewLogger(fmt.Sprint(logrus.ErrorLevel)).Errorf("cache.Start returned error, which should never happen, ignoring.") } }() - clientCache.WaitForCacheSync(stopCh) + clientCache.WaitForCacheSync(ctx) return runtimeClient, nil } -func newRuntimeClientWithCache(config *rest.Config, options client.Options, cache cache.Cache) (client.Client, error) { - c, err := client.New(config, options) - if err != nil { - return nil, err - } - - return &client.DelegatingClient{ - Reader: &client.DelegatingReader{ - CacheReader: cache, - ClientReader: c, - }, - Writer: c, - StatusClient: c, - }, nil +func newRuntimeClientWithCache(config *rest.Config, options client.Options, cache cache.Cache, uncachedObjects ...client.Object) (client.Client, error) { + return manager.NewClientBuilder().WithUncached(uncachedObjects...).Build(cache, config, options) } func setClientOptionsDefaults(config *rest.Config, options *client.Options) error { diff --git a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/scaling.go b/vendor/github.com/gardener/gardener/pkg/client/kubernetes/scaling.go index 19af00a3..2bd15992 100644 --- a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/scaling.go +++ b/vendor/github.com/gardener/gardener/pkg/client/kubernetes/scaling.go @@ -17,12 +17,13 @@ package kubernetes import ( "context" "fmt" + "time" druidv1alpha1 "github.com/gardener/etcd-druid/api/v1alpha1" + "github.com/gardener/gardener/pkg/utils/retry" appsv1 "k8s.io/api/apps/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -64,10 +65,35 @@ func ScaleDeployment(ctx context.Context, c client.Client, key client.ObjectKey, } // scaleResource scales resource's 'spec.replicas' to replicas count -func scaleResource(ctx context.Context, c client.Client, obj runtime.Object, replicas int32) error { +func scaleResource(ctx context.Context, c client.Client, obj client.Object, replicas int32) error { patch := []byte(fmt.Sprintf(`{"spec":{"replicas":%d}}`, replicas)) // TODO: replace this with call to scale subresource once controller-runtime supports it // see: https://github.com/kubernetes-sigs/controller-runtime/issues/172 return c.Patch(ctx, obj, client.RawPatch(types.MergePatchType, patch)) } + +// WaitUntilDeploymentScaledToDesiredReplicas waits for the number of available replicas to be equal to the deployment's desired replicas count. +func WaitUntilDeploymentScaledToDesiredReplicas(ctx context.Context, client client.Client, key types.NamespacedName, desiredReplicas int32) error { + return retry.UntilTimeout(ctx, 5*time.Second, 300*time.Second, func(ctx context.Context) (done bool, err error) { + deployment := &appsv1.Deployment{} + if err := client.Get(ctx, key, deployment); err != nil { + return retry.SevereError(err) + } + + if deployment.Generation != deployment.Status.ObservedGeneration { + return retry.MinorError(fmt.Errorf("%q not observed at latest generation (%d/%d)", key.Name, + deployment.Status.ObservedGeneration, deployment.Generation)) + } + + if deployment.Spec.Replicas == nil || *deployment.Spec.Replicas != desiredReplicas { + return retry.SevereError(fmt.Errorf("waiting for deployment %q to scale failed. spec.replicas does not match the desired replicas", key.Name)) + } + + if deployment.Status.Replicas == desiredReplicas && deployment.Status.AvailableReplicas == desiredReplicas { + return retry.Ok() + } + + return retry.MinorError(fmt.Errorf("deployment %q currently has '%d' replicas. Desired: %d", key.Name, deployment.Status.AvailableReplicas, desiredReplicas)) + }) +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/types.go b/vendor/github.com/gardener/gardener/pkg/client/kubernetes/types.go index 596994ac..2f07cf6a 100644 --- a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/types.go +++ b/vendor/github.com/gardener/gardener/pkg/client/kubernetes/types.go @@ -21,14 +21,16 @@ import ( gardencoreclientset "github.com/gardener/gardener/pkg/client/core/clientset/versioned" gardencorescheme "github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme" gardenextensionsscheme "github.com/gardener/gardener/pkg/client/extensions/clientset/versioned/scheme" + gardenseedmanagementclientset "github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned" + gardenseedmanagementscheme "github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/scheme" druidv1alpha1 "github.com/gardener/etcd-druid/api/v1alpha1" dnsv1alpha1 "github.com/gardener/external-dns-management/pkg/apis/dns/v1alpha1" resourcesscheme "github.com/gardener/gardener-resource-manager/pkg/apis/resources/v1alpha1" hvpav1alpha1 "github.com/gardener/hvpa-controller/api/v1alpha1" + istionetworkingv1beta1 "istio.io/client-go/pkg/apis/networking/v1beta1" apiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" apiextensionsscheme "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme" - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" @@ -91,6 +93,7 @@ func init() { gardenSchemeBuilder := runtime.NewSchemeBuilder( corescheme.AddToScheme, gardencorescheme.AddToScheme, + gardenseedmanagementscheme.AddToScheme, ) utilruntime.Must(gardenSchemeBuilder.AddToScheme(GardenScheme)) @@ -103,6 +106,7 @@ func init() { hvpav1alpha1.AddToScheme, druidv1alpha1.AddToScheme, apiextensionsscheme.AddToScheme, + istionetworkingv1beta1.AddToScheme, ) utilruntime.Must(seedSchemeBuilder.AddToScheme(SeedScheme)) @@ -136,14 +140,16 @@ type Applier interface { // of several Kubernetes versions. type Interface interface { RESTConfig() *rest.Config - RESTMapper() meta.RESTMapper RESTClient() rest.Interface // Client returns the ClientSet's controller-runtime client. This client should be used by default, as it carries // a cache, which uses SharedIndexInformers to keep up-to-date. Client() client.Client + // APIReader returns a client.Reader that directly reads from the API server. + APIReader() client.Reader // DirectClient returns a controller-runtime client, which can be used to talk to the API server directly // (without using a cache). + // Deprecated: used APIReader instead, if the controller can't tolerate stale reads. DirectClient() client.Client // Cache returns the ClientSet's controller-runtime cache. It can be used to get Informers for arbitrary objects. Cache() cache.Cache @@ -157,6 +163,7 @@ type Interface interface { Kubernetes() kubernetesclientset.Interface GardenCore() gardencoreclientset.Interface + GardenSeedManagement() gardenseedmanagementclientset.Interface APIExtension() apiextensionsclientset.Interface APIRegistration() apiregistrationclientset.Interface @@ -173,7 +180,7 @@ type Interface interface { // Start starts the cache of the ClientSet's controller-runtime client and returns immediately. // It must be called first before using the client to retrieve objects from the API server. - Start(stopCh <-chan struct{}) + Start(ctx context.Context) // WaitForCacheSync waits for the cache of the ClientSet's controller-runtime client to be synced. - WaitForCacheSync(stopCh <-chan struct{}) bool + WaitForCacheSync(ctx context.Context) bool } diff --git a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/utils/client.go b/vendor/github.com/gardener/gardener/pkg/client/kubernetes/utils/client.go deleted file mode 100644 index 400ff5d4..00000000 --- a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/utils/client.go +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package utils - -import ( - "context" - "strings" - - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - kubernetesscheme "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" - "sigs.k8s.io/controller-runtime/pkg/cache" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/client/apiutil" - "sigs.k8s.io/controller-runtime/pkg/manager" -) - -// NewClientFuncWithSpecificallyCachedReader returns a manager.NewClientFunc that creates a new client.Client that either -// - reads directly from the API server by default but reads the specified objects from the cache (readSpecifiedFromCache=true) -// - or reads from the cache by default but reads the specified objects directly from the API server (readSpecifiedFromCache=true). -func NewClientFuncWithSpecificallyCachedReader(readSpecifiedFromCache bool, specifiedObjects ...runtime.Object) manager.NewClientFunc { - return func(cache cache.Cache, config *rest.Config, options client.Options) (client.Client, error) { - return NewClientWithSpecificallyCachedReader(cache, config, options, readSpecifiedFromCache, specifiedObjects...) - } -} - -// NewClientFuncWithDisabledCacheFor returns a manager.NewClientFunc that creates a new client.Client that reads from -// the cache by default but reads the specified objects directly from the API server. -func NewClientFuncWithDisabledCacheFor(directlyReadingObjects ...runtime.Object) manager.NewClientFunc { - return NewClientFuncWithSpecificallyCachedReader(false, directlyReadingObjects...) -} - -// NewClientFuncWithEnabledCacheFor returns a manager.NewClientFunc that creates a new client.Client that reads directly -// from the API server by default but reads the specified objects from the cache. -func NewClientFuncWithEnabledCacheFor(cachedObjects ...runtime.Object) manager.NewClientFunc { - return NewClientFuncWithSpecificallyCachedReader(true, cachedObjects...) -} - -// NewClientWithSpecificallyCachedReader creates a new client.Client that either -// - reads directly from the API server by default but reads the specified objects from the cache (readSpecifiedFromCache=true) -// - or reads from the cache by default but reads the specified objects directly from the API server (readSpecifiedFromCache=false). -func NewClientWithSpecificallyCachedReader(cache cache.Cache, config *rest.Config, options client.Options, readSpecifiedFromCache bool, specifiedObjects ...runtime.Object) (client.Client, error) { - // create the default Client - c, err := client.New(config, options) - if err != nil { - return nil, err - } - - // create cache Reader that decides which objects to read from the cache and which to read directly from the API server - cacheReader, err := NewSpecificallyCachedReaderFor( - cache, - c, - options.Scheme, - readSpecifiedFromCache, - specifiedObjects..., - ) - if err != nil { - return nil, err - } - - return &client.DelegatingClient{ - Reader: &client.DelegatingReader{ - CacheReader: cacheReader, - ClientReader: c, - }, - Writer: c, - StatusClient: c, - }, nil -} - -// NewSpecificallyCachedReaderFor creates a new client.Reader that either -// - reads directly from the API server by default but reads the specified objects from the cache (readSpecifiedFromCache=true) -// - or reads from the cache by default but reads the specified objects directly from the API server (readSpecifiedFromCache=false). -func NewSpecificallyCachedReaderFor(cacheReader, clientReader client.Reader, scheme *runtime.Scheme, readSpecifiedFromCache bool, objectKinds ...runtime.Object) (client.Reader, error) { - if scheme == nil { - scheme = kubernetesscheme.Scheme - } - - delegatingRule, err := newDelegationRule(scheme, readSpecifiedFromCache, objectKinds...) - if err != nil { - return nil, err - } - - return &specificallyCachedReader{ - shouldReadObjectFromCache: delegatingRule, - cacheReader: cacheReader, - clientReader: clientReader, - }, nil -} - -// NewReaderWithDisabledCacheFor creates a new client.Reader that reads from the cache by default but reads the -// specified objects directly from the API server. -func NewReaderWithDisabledCacheFor(cacheReader, clientReader client.Reader, scheme *runtime.Scheme, directlyReadingObjects ...runtime.Object) (client.Reader, error) { - return NewSpecificallyCachedReaderFor(cacheReader, clientReader, scheme, false, directlyReadingObjects...) -} - -// NewReaderWithEnabledCacheFor creates a new client.Reader that reads directly from the API server by default but reads -// the specified objects from the cache. -func NewReaderWithEnabledCacheFor(cacheReader, clientReader client.Reader, scheme *runtime.Scheme, cachedObjects ...runtime.Object) (client.Reader, error) { - return NewSpecificallyCachedReaderFor(cacheReader, clientReader, scheme, true, cachedObjects...) -} - -// specificallyCachedReader implements client.Reader and delegates calls to the cache or direct client according to the -// given delegationRule. -type specificallyCachedReader struct { - shouldReadObjectFromCache delegationRule - - cacheReader client.Reader - clientReader client.Reader -} - -// delegationRule is a function that decides whether a given object should be read from the cache or directly from the -// API server. -type delegationRule func(obj runtime.Object) (readFromCache bool, err error) - -// newDelegationRule returns a delegationRule, that will either -// - only allow to read the specified object kinds from the cache (readSpecifiedFromCache=true) -// - or only read the specified object kinds directly from the API server (readSpecifiedFromCache=false) -func newDelegationRule(scheme *runtime.Scheme, readSpecifiedFromCache bool, objs ...runtime.Object) (delegationRule, error) { - specifiedGKs := make(map[schema.GroupKind]struct{}) - - for _, obj := range objs { - gvk, err := apiutil.GVKForObject(obj, scheme) - if err != nil { - return nil, err - } - specifiedGKs[gvk.GroupKind()] = struct{}{} - } - - return func(obj runtime.Object) (readFromCache bool, err error) { - gvk, err := apiutil.GVKForObject(obj, scheme) - if err != nil { - return false, err - } - - if strings.HasSuffix(gvk.Kind, "List") && meta.IsListType(obj) { - // if this is a list, treat it as a request for the item's resource - gvk.Kind = strings.TrimSuffix(gvk.Kind, "List") - } - - _, ok := specifiedGKs[gvk.GroupKind()] - // read from cache if GroupKind was specified and readSpecifiedFromCache=true - // or GroupKind was not specified and readSpecifiedFromCache=false - return ok == readSpecifiedFromCache, nil - }, nil -} - -// Get implements client.Reader by delegating calls either to the cache or the direct client based on the decision of -// the delegationRule. -func (s *specificallyCachedReader) Get(ctx context.Context, key client.ObjectKey, obj runtime.Object) error { - useCache, err := s.shouldReadObjectFromCache(obj) - if err != nil { - return err - } - if useCache { - return s.cacheReader.Get(ctx, key, obj) - } - return s.clientReader.Get(ctx, key, obj) -} - -// List implements client.Reader by delegating calls either to the cache or the direct client based on the decision of -// the delegationRule. -func (s *specificallyCachedReader) List(ctx context.Context, list runtime.Object, opts ...client.ListOption) error { - useCache, err := s.shouldReadObjectFromCache(list) - if err != nil { - return err - } - if useCache { - return s.cacheReader.List(ctx, list, opts...) - } - return s.clientReader.List(ctx, list, opts...) -} diff --git a/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/clientset.go b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/clientset.go new file mode 100644 index 00000000..dbfbaa5a --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/clientset.go @@ -0,0 +1,97 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + + seedmanagementv1alpha1 "github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/typed/seedmanagement/v1alpha1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + SeedmanagementV1alpha1() seedmanagementv1alpha1.SeedmanagementV1alpha1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + seedmanagementV1alpha1 *seedmanagementv1alpha1.SeedmanagementV1alpha1Client +} + +// SeedmanagementV1alpha1 retrieves the SeedmanagementV1alpha1Client +func (c *Clientset) SeedmanagementV1alpha1() seedmanagementv1alpha1.SeedmanagementV1alpha1Interface { + return c.seedmanagementV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.seedmanagementV1alpha1, err = seedmanagementv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.seedmanagementV1alpha1 = seedmanagementv1alpha1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.seedmanagementV1alpha1 = seedmanagementv1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/doc.go b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/doc.go new file mode 100644 index 00000000..32d85228 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/doc.go @@ -0,0 +1,20 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/scheme/doc.go b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/scheme/doc.go new file mode 100644 index 00000000..7d4fb776 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/scheme/doc.go @@ -0,0 +1,20 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/scheme/register.go b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/scheme/register.go new file mode 100644 index 00000000..cc1a9dd2 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/scheme/register.go @@ -0,0 +1,56 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + seedmanagementv1alpha1 "github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + seedmanagementv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/typed/seedmanagement/v1alpha1/doc.go b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/typed/seedmanagement/v1alpha1/doc.go new file mode 100644 index 00000000..828c8ebe --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/typed/seedmanagement/v1alpha1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/typed/seedmanagement/v1alpha1/generated_expansion.go b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/typed/seedmanagement/v1alpha1/generated_expansion.go new file mode 100644 index 00000000..3c36750c --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/typed/seedmanagement/v1alpha1/generated_expansion.go @@ -0,0 +1,23 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type ManagedSeedExpansion interface{} + +type ManagedSeedSetExpansion interface{} diff --git a/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/typed/seedmanagement/v1alpha1/managedseed.go b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/typed/seedmanagement/v1alpha1/managedseed.go new file mode 100644 index 00000000..0c803989 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/typed/seedmanagement/v1alpha1/managedseed.go @@ -0,0 +1,195 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1" + scheme "github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ManagedSeedsGetter has a method to return a ManagedSeedInterface. +// A group's client should implement this interface. +type ManagedSeedsGetter interface { + ManagedSeeds(namespace string) ManagedSeedInterface +} + +// ManagedSeedInterface has methods to work with ManagedSeed resources. +type ManagedSeedInterface interface { + Create(ctx context.Context, managedSeed *v1alpha1.ManagedSeed, opts v1.CreateOptions) (*v1alpha1.ManagedSeed, error) + Update(ctx context.Context, managedSeed *v1alpha1.ManagedSeed, opts v1.UpdateOptions) (*v1alpha1.ManagedSeed, error) + UpdateStatus(ctx context.Context, managedSeed *v1alpha1.ManagedSeed, opts v1.UpdateOptions) (*v1alpha1.ManagedSeed, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ManagedSeed, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ManagedSeedList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ManagedSeed, err error) + ManagedSeedExpansion +} + +// managedSeeds implements ManagedSeedInterface +type managedSeeds struct { + client rest.Interface + ns string +} + +// newManagedSeeds returns a ManagedSeeds +func newManagedSeeds(c *SeedmanagementV1alpha1Client, namespace string) *managedSeeds { + return &managedSeeds{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the managedSeed, and returns the corresponding managedSeed object, and an error if there is any. +func (c *managedSeeds) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ManagedSeed, err error) { + result = &v1alpha1.ManagedSeed{} + err = c.client.Get(). + Namespace(c.ns). + Resource("managedseeds"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ManagedSeeds that match those selectors. +func (c *managedSeeds) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ManagedSeedList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.ManagedSeedList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("managedseeds"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested managedSeeds. +func (c *managedSeeds) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("managedseeds"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a managedSeed and creates it. Returns the server's representation of the managedSeed, and an error, if there is any. +func (c *managedSeeds) Create(ctx context.Context, managedSeed *v1alpha1.ManagedSeed, opts v1.CreateOptions) (result *v1alpha1.ManagedSeed, err error) { + result = &v1alpha1.ManagedSeed{} + err = c.client.Post(). + Namespace(c.ns). + Resource("managedseeds"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(managedSeed). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a managedSeed and updates it. Returns the server's representation of the managedSeed, and an error, if there is any. +func (c *managedSeeds) Update(ctx context.Context, managedSeed *v1alpha1.ManagedSeed, opts v1.UpdateOptions) (result *v1alpha1.ManagedSeed, err error) { + result = &v1alpha1.ManagedSeed{} + err = c.client.Put(). + Namespace(c.ns). + Resource("managedseeds"). + Name(managedSeed.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(managedSeed). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *managedSeeds) UpdateStatus(ctx context.Context, managedSeed *v1alpha1.ManagedSeed, opts v1.UpdateOptions) (result *v1alpha1.ManagedSeed, err error) { + result = &v1alpha1.ManagedSeed{} + err = c.client.Put(). + Namespace(c.ns). + Resource("managedseeds"). + Name(managedSeed.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(managedSeed). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the managedSeed and deletes it. Returns an error if one occurs. +func (c *managedSeeds) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("managedseeds"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *managedSeeds) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("managedseeds"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched managedSeed. +func (c *managedSeeds) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ManagedSeed, err error) { + result = &v1alpha1.ManagedSeed{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("managedseeds"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/typed/seedmanagement/v1alpha1/managedseedset.go b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/typed/seedmanagement/v1alpha1/managedseedset.go new file mode 100644 index 00000000..fc42c4b1 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/typed/seedmanagement/v1alpha1/managedseedset.go @@ -0,0 +1,195 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1" + scheme "github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ManagedSeedSetsGetter has a method to return a ManagedSeedSetInterface. +// A group's client should implement this interface. +type ManagedSeedSetsGetter interface { + ManagedSeedSets(namespace string) ManagedSeedSetInterface +} + +// ManagedSeedSetInterface has methods to work with ManagedSeedSet resources. +type ManagedSeedSetInterface interface { + Create(ctx context.Context, managedSeedSet *v1alpha1.ManagedSeedSet, opts v1.CreateOptions) (*v1alpha1.ManagedSeedSet, error) + Update(ctx context.Context, managedSeedSet *v1alpha1.ManagedSeedSet, opts v1.UpdateOptions) (*v1alpha1.ManagedSeedSet, error) + UpdateStatus(ctx context.Context, managedSeedSet *v1alpha1.ManagedSeedSet, opts v1.UpdateOptions) (*v1alpha1.ManagedSeedSet, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ManagedSeedSet, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ManagedSeedSetList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ManagedSeedSet, err error) + ManagedSeedSetExpansion +} + +// managedSeedSets implements ManagedSeedSetInterface +type managedSeedSets struct { + client rest.Interface + ns string +} + +// newManagedSeedSets returns a ManagedSeedSets +func newManagedSeedSets(c *SeedmanagementV1alpha1Client, namespace string) *managedSeedSets { + return &managedSeedSets{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the managedSeedSet, and returns the corresponding managedSeedSet object, and an error if there is any. +func (c *managedSeedSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ManagedSeedSet, err error) { + result = &v1alpha1.ManagedSeedSet{} + err = c.client.Get(). + Namespace(c.ns). + Resource("managedseedsets"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ManagedSeedSets that match those selectors. +func (c *managedSeedSets) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ManagedSeedSetList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.ManagedSeedSetList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("managedseedsets"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested managedSeedSets. +func (c *managedSeedSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("managedseedsets"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a managedSeedSet and creates it. Returns the server's representation of the managedSeedSet, and an error, if there is any. +func (c *managedSeedSets) Create(ctx context.Context, managedSeedSet *v1alpha1.ManagedSeedSet, opts v1.CreateOptions) (result *v1alpha1.ManagedSeedSet, err error) { + result = &v1alpha1.ManagedSeedSet{} + err = c.client.Post(). + Namespace(c.ns). + Resource("managedseedsets"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(managedSeedSet). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a managedSeedSet and updates it. Returns the server's representation of the managedSeedSet, and an error, if there is any. +func (c *managedSeedSets) Update(ctx context.Context, managedSeedSet *v1alpha1.ManagedSeedSet, opts v1.UpdateOptions) (result *v1alpha1.ManagedSeedSet, err error) { + result = &v1alpha1.ManagedSeedSet{} + err = c.client.Put(). + Namespace(c.ns). + Resource("managedseedsets"). + Name(managedSeedSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(managedSeedSet). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *managedSeedSets) UpdateStatus(ctx context.Context, managedSeedSet *v1alpha1.ManagedSeedSet, opts v1.UpdateOptions) (result *v1alpha1.ManagedSeedSet, err error) { + result = &v1alpha1.ManagedSeedSet{} + err = c.client.Put(). + Namespace(c.ns). + Resource("managedseedsets"). + Name(managedSeedSet.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(managedSeedSet). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the managedSeedSet and deletes it. Returns an error if one occurs. +func (c *managedSeedSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("managedseedsets"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *managedSeedSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("managedseedsets"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched managedSeedSet. +func (c *managedSeedSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ManagedSeedSet, err error) { + result = &v1alpha1.ManagedSeedSet{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("managedseedsets"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/typed/seedmanagement/v1alpha1/seedmanagement_client.go b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/typed/seedmanagement/v1alpha1/seedmanagement_client.go new file mode 100644 index 00000000..bed5ce44 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/typed/seedmanagement/v1alpha1/seedmanagement_client.go @@ -0,0 +1,94 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1" + "github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type SeedmanagementV1alpha1Interface interface { + RESTClient() rest.Interface + ManagedSeedsGetter + ManagedSeedSetsGetter +} + +// SeedmanagementV1alpha1Client is used to interact with features provided by the seedmanagement.gardener.cloud group. +type SeedmanagementV1alpha1Client struct { + restClient rest.Interface +} + +func (c *SeedmanagementV1alpha1Client) ManagedSeeds(namespace string) ManagedSeedInterface { + return newManagedSeeds(c, namespace) +} + +func (c *SeedmanagementV1alpha1Client) ManagedSeedSets(namespace string) ManagedSeedSetInterface { + return newManagedSeedSets(c, namespace) +} + +// NewForConfig creates a new SeedmanagementV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*SeedmanagementV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &SeedmanagementV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new SeedmanagementV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *SeedmanagementV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new SeedmanagementV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *SeedmanagementV1alpha1Client { + return &SeedmanagementV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *SeedmanagementV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/settings/clientset/versioned/scheme/doc.go b/vendor/github.com/gardener/gardener/pkg/client/settings/clientset/versioned/scheme/doc.go new file mode 100644 index 00000000..7d4fb776 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/settings/clientset/versioned/scheme/doc.go @@ -0,0 +1,20 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/github.com/gardener/gardener/pkg/client/settings/clientset/versioned/scheme/register.go b/vendor/github.com/gardener/gardener/pkg/client/settings/clientset/versioned/scheme/register.go new file mode 100644 index 00000000..89313a4d --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/settings/clientset/versioned/scheme/register.go @@ -0,0 +1,56 @@ +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + settingsv1alpha1 "github.com/gardener/gardener/pkg/apis/settings/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + settingsv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/vendor/github.com/gardener/gardener/pkg/controllerutils/associations.go b/vendor/github.com/gardener/gardener/pkg/controllerutils/associations.go new file mode 100644 index 00000000..29cadc60 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/controllerutils/associations.go @@ -0,0 +1,163 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package controllerutils + +import ( + "context" + "fmt" + + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + gardencorelisters "github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1" + "github.com/gardener/gardener/pkg/logger" + + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +// DetermineShootsAssociatedTo gets a to determine the Shoots resources which are associated +// to given (either a CloudProfile a or a Seed object). +func DetermineShootsAssociatedTo(obj interface{}, shootLister gardencorelisters.ShootLister) ([]string, error) { + var associatedShoots []string + shoots, err := shootLister.List(labels.Everything()) + if err != nil { + logger.Logger.Info(err.Error()) + return nil, err + } + + for _, shoot := range shoots { + switch t := obj.(type) { + case *gardencorev1beta1.CloudProfile: + cloudProfile := obj.(*gardencorev1beta1.CloudProfile) + if shoot.Spec.CloudProfileName == cloudProfile.Name { + associatedShoots = append(associatedShoots, fmt.Sprintf("%s/%s", shoot.Namespace, shoot.Name)) + } + case *gardencorev1beta1.Seed: + seed := obj.(*gardencorev1beta1.Seed) + if shoot.Spec.SeedName != nil && *shoot.Spec.SeedName == seed.Name { + associatedShoots = append(associatedShoots, fmt.Sprintf("%s/%s", shoot.Namespace, shoot.Name)) + } + case *gardencorev1beta1.SecretBinding: + binding := obj.(*gardencorev1beta1.SecretBinding) + if shoot.Spec.SecretBindingName == binding.Name && shoot.Namespace == binding.Namespace { + associatedShoots = append(associatedShoots, fmt.Sprintf("%s/%s", shoot.Namespace, shoot.Name)) + } + default: + return nil, fmt.Errorf("unable to determine Shoot associations, due to unknown type %t", t) + } + } + return associatedShoots, nil +} + +// DetermineSecretBindingAssociations gets a to determine the SecretBinding +// resources which are associated to given Quota . +func DetermineSecretBindingAssociations(quota *gardencorev1beta1.Quota, bindingLister gardencorelisters.SecretBindingLister) ([]string, error) { + var associatedBindings []string + bindings, err := bindingLister.List(labels.Everything()) + if err != nil { + return nil, err + } + + for _, binding := range bindings { + for _, quotaRef := range binding.Quotas { + if quotaRef.Name == quota.Name && quotaRef.Namespace == quota.Namespace { + associatedBindings = append(associatedBindings, fmt.Sprintf("%s/%s", binding.Namespace, binding.Name)) + } + } + } + return associatedBindings, nil +} + +// DetermineBackupBucketAssociations determine the BackupBucket resources which are associated +// to seed with name +func DetermineBackupBucketAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error) { + return determineAssociations(ctx, c, seedName, &gardencorev1beta1.BackupBucketList{}, func(o runtime.Object) (string, error) { + backupBucket, ok := o.(*gardencorev1beta1.BackupBucket) + if !ok { + return "", fmt.Errorf("got unexpected object when expecting BackupBucket") + } + if backupBucket.Spec.SeedName == nil { + return "", nil + } + return *backupBucket.Spec.SeedName, nil + }) +} + +// DetermineBackupEntryAssociations determine the BackupEntry resources which are associated +// to seed with name +func DetermineBackupEntryAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error) { + return determineAssociations(ctx, c, seedName, &gardencorev1beta1.BackupEntryList{}, func(o runtime.Object) (string, error) { + backupEntry, ok := o.(*gardencorev1beta1.BackupEntry) + if !ok { + return "", fmt.Errorf("got unexpected object when expecting BackupEntry") + } + if backupEntry.Spec.SeedName == nil { + return "", nil + } + return *backupEntry.Spec.SeedName, nil + }) +} + +// DetermineControllerInstallationAssociations determine the ControllerInstallation resources which are associated +// to seed with name +func DetermineControllerInstallationAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error) { + return determineAssociations(ctx, c, seedName, &gardencorev1beta1.ControllerInstallationList{}, func(o runtime.Object) (string, error) { + controllerInstallation, ok := o.(*gardencorev1beta1.ControllerInstallation) + if !ok { + return "", fmt.Errorf("got unexpected object when expecting ControllerInstallation") + } + return controllerInstallation.Spec.SeedRef.Name, nil + }) +} + +// DetermineShootAssociations determine the Shoot resources which are associated +// to seed with name +func DetermineShootAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error) { + return determineAssociations(ctx, c, seedName, &gardencorev1beta1.ShootList{}, func(o runtime.Object) (string, error) { + shoot, ok := o.(*gardencorev1beta1.Shoot) + if !ok { + return "", fmt.Errorf("got unexpected object when expecting Shoot") + } + if shoot.Spec.SeedName == nil { + return "", nil + } + return *shoot.Spec.SeedName, nil + }) +} + +func determineAssociations(ctx context.Context, c client.Client, seedName string, listObj client.ObjectList, seedNameFunc func(runtime.Object) (string, error)) ([]string, error) { + if err := c.List(ctx, listObj); err != nil { + return nil, err + } + + var associations []string + err := meta.EachListItem(listObj, func(obj runtime.Object) error { + name, err := seedNameFunc(obj) + if err != nil { + return err + } + + if name == seedName { + accessor, err := meta.Accessor(obj) + if err != nil { + return err + } + associations = append(associations, accessor.GetName()) + } + return nil + }) + return associations, err +} diff --git a/vendor/github.com/gardener/gardener/pkg/controllerutils/finalizers.go b/vendor/github.com/gardener/gardener/pkg/controllerutils/finalizers.go new file mode 100644 index 00000000..54cbad4b --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/controllerutils/finalizers.go @@ -0,0 +1,72 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package controllerutils + +import ( + "context" + + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + + "k8s.io/client-go/util/retry" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +// PatchAddFinalizers adds the given finalizers to the object via a patch request. +func PatchAddFinalizers(ctx context.Context, writer client.Writer, obj client.Object, finalizers ...string) error { + return patchFinalizers(ctx, writer, obj, controllerutil.AddFinalizer, finalizers...) +} + +// PatchRemoveFinalizers removes the given finalizers from the object via a patch request. +func PatchRemoveFinalizers(ctx context.Context, writer client.Writer, obj client.Object, finalizers ...string) error { + return patchFinalizers(ctx, writer, obj, controllerutil.RemoveFinalizer, finalizers...) +} + +func patchFinalizers(ctx context.Context, writer client.Writer, obj client.Object, mutate func(client.Object, string), finalizers ...string) error { + beforePatch := obj.DeepCopyObject().(client.Object) + for _, finalizer := range finalizers { + mutate(obj, finalizer) + } + + return writer.Patch(ctx, obj, client.MergeFromWithOptions(beforePatch, client.MergeFromWithOptimisticLock{})) +} + +// EnsureFinalizer ensures that a finalizer of the given name is set on the given object with exponential backoff. +// If the finalizer is not set, it adds it to the list of finalizers and patches the remote object. +// Use PatchAddFinalizers instead, if the controller is able to tolerate conflict errors caused by stale reads. +func EnsureFinalizer(ctx context.Context, reader client.Reader, writer client.Writer, obj client.Object, finalizer string) error { + return tryPatchFinalizers(ctx, reader, writer, obj, controllerutil.AddFinalizer, finalizer) +} + +// RemoveFinalizer ensures that the given finalizer is not present anymore in the given object with exponential backoff. +// If it is set, it removes it and issues a patch. +// Use PatchRemoveFinalizers instead, if the controller is able to tolerate conflict errors caused by stale reads. +func RemoveFinalizer(ctx context.Context, reader client.Reader, writer client.Writer, obj client.Object, finalizer string) error { + return tryPatchFinalizers(ctx, reader, writer, obj, controllerutil.RemoveFinalizer, finalizer) +} + +func tryPatchFinalizers(ctx context.Context, reader client.Reader, writer client.Writer, obj client.Object, mutate func(client.Object, string), finalizer string) error { + return retry.RetryOnConflict(retry.DefaultBackoff, func() error { + // Unset finalizers array manually here, because finalizers array won't be unset in decoder, if it's empty on + // the API server. This can lead to an empty patch, although we want to ensure, that the finalizer is present. + // The patch itself will go through and it won't be noticed that the finalizer wasn't added at all + obj.SetFinalizers(nil) + + if err := reader.Get(ctx, client.ObjectKeyFromObject(obj), obj); err != nil { + return err + } + + return patchFinalizers(ctx, writer, obj, mutate, finalizer) + }) +} diff --git a/vendor/github.com/gardener/gardener/pkg/controllerutils/miscellaneous.go b/vendor/github.com/gardener/gardener/pkg/controllerutils/miscellaneous.go new file mode 100644 index 00000000..486bcc07 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/controllerutils/miscellaneous.go @@ -0,0 +1,122 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package controllerutils + +import ( + "strings" + "time" + + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "github.com/gardener/gardener/pkg/operation/common" + "github.com/gardener/gardener/pkg/utils" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const separator = "," + +// GetTasks returns the list of tasks in the ShootTasks annotation. +func GetTasks(annotations map[string]string) []string { + var tasks []string + if val := annotations[common.ShootTasks]; len(val) > 0 { + tasks = strings.Split(val, separator) + } + return tasks +} + +// HasTask checks if the passed task is part of the ShootTasks annotation. +func HasTask(annotations map[string]string, task string) bool { + tasks := GetTasks(annotations) + if len(tasks) == 0 { + return false + } + return utils.ValueExists(task, tasks) +} + +// AddTasks adds tasks to the ShootTasks annotation of the passed map. +func AddTasks(annotations map[string]string, tasksToAdd ...string) { + tasks := GetTasks(annotations) + + for _, taskToAdd := range tasksToAdd { + if !utils.ValueExists(taskToAdd, tasks) { + tasks = append(tasks, taskToAdd) + } + } + + setTaskAnnotations(annotations, tasks) +} + +// RemoveTasks removes tasks from the ShootTasks annotation of the passed map. +func RemoveTasks(annotations map[string]string, tasksToRemove ...string) { + tasks := GetTasks(annotations) + + for i := len(tasks) - 1; i >= 0; i-- { + if utils.ValueExists(tasks[i], tasksToRemove) { + tasks = append((tasks)[:i], (tasks)[i+1:]...) + } + } + + setTaskAnnotations(annotations, tasks) +} + +// RemoveAllTasks removes the ShootTasks annotation from the passed map. +func RemoveAllTasks(annotations map[string]string) { + delete(annotations, common.ShootTasks) +} + +func setTaskAnnotations(annotations map[string]string, tasks []string) { + if len(tasks) == 0 { + RemoveAllTasks(annotations) + return + } + + annotations[common.ShootTasks] = strings.Join(tasks, separator) +} + +var ( + // Now is a function for returning the current time. + Now = time.Now + // RandomDuration is a function for returning a random duration. + RandomDuration = utils.RandomDuration +) + +// ReconcileOncePer24hDuration returns the duration until the next reconciliation should happen while respecting that +// only one reconciliation should happen per 24h. If the deletion timestamp is set or the generation has changed or the +// last operation does not indicate success or indicates that the last reconciliation happened more than 24h ago then 0 +// will be returned. +func ReconcileOncePer24hDuration(objectMeta metav1.ObjectMeta, observedGeneration int64, lastOperation *gardencorev1beta1.LastOperation) time.Duration { + if objectMeta.DeletionTimestamp != nil { + return 0 + } + + if objectMeta.Generation != observedGeneration { + return 0 + } + + if lastOperation == nil || + lastOperation.State != gardencorev1beta1.LastOperationStateSucceeded || + (lastOperation.Type != gardencorev1beta1.LastOperationTypeCreate && lastOperation.Type != gardencorev1beta1.LastOperationTypeReconcile) { + return 0 + } + + // If last reconciliation happened more than 24h ago then we want to reconcile immediately, so let's only compute + // a delay if the last reconciliation was within the last 24h. + if lastReconciliation := lastOperation.LastUpdateTime.Time; Now().UTC().Before(lastReconciliation.UTC().Add(24 * time.Hour)) { + durationUntilLastReconciliationWas24hAgo := lastReconciliation.UTC().Add(24 * time.Hour).Sub(Now().UTC()) + return RandomDuration(durationUntilLastReconciliationWas24hAgo) + } + + return 0 +} diff --git a/vendor/github.com/gardener/gardener/pkg/controllerutils/operations.go b/vendor/github.com/gardener/gardener/pkg/controllerutils/operations.go new file mode 100644 index 00000000..941b0fb6 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/controllerutils/operations.go @@ -0,0 +1,33 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package controllerutils + +import ( + "context" + + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" + kutil "github.com/gardener/gardener/pkg/utils/kubernetes" + + "k8s.io/apimachinery/pkg/util/wait" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +// RemoveGardenerOperationAnnotation removes a gardener operation annotation and retries the operation with the given . +func RemoveGardenerOperationAnnotation(ctx context.Context, backoff wait.Backoff, cli client.Client, obj client.Object) error { + return kutil.TryUpdate(ctx, backoff, cli, obj, func() error { + delete(obj.GetAnnotations(), v1beta1constants.GardenerOperation) + return nil + }) +} diff --git a/vendor/github.com/gardener/gardener/pkg/controllerutils/seedfilter.go b/vendor/github.com/gardener/gardener/pkg/controllerutils/seedfilter.go new file mode 100644 index 00000000..dd1c34ee --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/controllerutils/seedfilter.go @@ -0,0 +1,186 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package controllerutils + +import ( + "context" + + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + seedmanagementv1alpha1 "github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1" + gardencorelisters "github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1" + "github.com/gardener/gardener/pkg/gardenlet/apis/config" + confighelper "github.com/gardener/gardener/pkg/gardenlet/apis/config/helper" + kutil "github.com/gardener/gardener/pkg/utils/kubernetes" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +// LabelsMatchFor checks whether the given label selector matches for the given set of labels. +func LabelsMatchFor(l map[string]string, labelSelector *metav1.LabelSelector) bool { + selector, err := metav1.LabelSelectorAsSelector(labelSelector) + if err != nil { + return false + } + return selector.Matches(labels.Set(l)) +} + +// SeedFilterFunc returns a filtering func for the seeds and the given label selector. +func SeedFilterFunc(seedName string, labelSelector *metav1.LabelSelector) func(obj interface{}) bool { + return func(obj interface{}) bool { + seed, ok := obj.(*gardencorev1beta1.Seed) + if !ok { + return false + } + if len(seedName) > 0 { + return seed.Name == seedName + } + return LabelsMatchFor(seed.Labels, labelSelector) + } +} + +// ShootFilterFunc returns a filtering func for the seeds and the given label selector. +func ShootFilterFunc(seedName string, seedLister gardencorelisters.SeedLister, labelSelector *metav1.LabelSelector) func(obj interface{}) bool { + return func(obj interface{}) bool { + shoot, ok := obj.(*gardencorev1beta1.Shoot) + if !ok { + return false + } + if shoot.Spec.SeedName == nil { + return false + } + if len(seedName) > 0 { + if shoot.Status.SeedName == nil || *shoot.Spec.SeedName == *shoot.Status.SeedName { + return *shoot.Spec.SeedName == seedName + } + return *shoot.Status.SeedName == seedName + } + if shoot.Status.SeedName == nil || *shoot.Spec.SeedName == *shoot.Status.SeedName { + return SeedLabelsMatch(seedLister, *shoot.Spec.SeedName, labelSelector) + } + return SeedLabelsMatch(seedLister, *shoot.Status.SeedName, labelSelector) + } +} + +// ShootIsManagedByThisGardenlet checks if the given shoot is managed by this gardenlet by comparing it with the seed name from the GardenletConfiguration +// or by checking whether the seed labels mathes the seed seoector from the GardenletConfiguration. +func ShootIsManagedByThisGardenlet(shoot *gardencorev1beta1.Shoot, gc *config.GardenletConfiguration, seedLister gardencorelisters.SeedLister) bool { + seedName := confighelper.SeedNameFromSeedConfig(gc.SeedConfig) + if len(seedName) > 0 { + return *shoot.Spec.SeedName == seedName + } + return SeedLabelsMatch(seedLister, *shoot.Spec.SeedName, gc.SeedSelector) +} + +// SeedLabelsMatch fetches the given seed via a lister by its name and then checks whether the given label selector matches +// the seed labels. +func SeedLabelsMatch(seedLister gardencorelisters.SeedLister, seedName string, labelSelector *metav1.LabelSelector) bool { + seed, err := seedLister.Get(seedName) + if err != nil { + return false + } + + return LabelsMatchFor(seed.Labels, labelSelector) +} + +// seedLabelsMatchWithClient fetches the given seed by its name from the client and then checks whether the given +// label selector matches the seed labels. +func seedLabelsMatchWithClient(ctx context.Context, c client.Client, seedName string, labelSelector *metav1.LabelSelector) bool { + seed := &gardencorev1beta1.Seed{} + if err := c.Get(ctx, client.ObjectKey{Name: seedName}, seed); err != nil { + return false + } + + return LabelsMatchFor(seed.Labels, labelSelector) +} + +// ControllerInstallationFilterFunc returns a filtering func for the seeds and the given label selector. +func ControllerInstallationFilterFunc(seedName string, seedLister gardencorelisters.SeedLister, labelSelector *metav1.LabelSelector) func(obj interface{}) bool { + return func(obj interface{}) bool { + controllerInstallation, ok := obj.(*gardencorev1beta1.ControllerInstallation) + if !ok { + return false + } + if len(seedName) > 0 { + return controllerInstallation.Spec.SeedRef.Name == seedName + } + return SeedLabelsMatch(seedLister, controllerInstallation.Spec.SeedRef.Name, labelSelector) + } +} + +// BackupBucketFilterFunc returns a filtering func for the seeds and the given label selector. +func BackupBucketFilterFunc(ctx context.Context, c client.Client, seedName string, labelSelector *metav1.LabelSelector) func(obj interface{}) bool { + return func(obj interface{}) bool { + backupBucket, ok := obj.(*gardencorev1beta1.BackupBucket) + if !ok { + return false + } + if backupBucket.Spec.SeedName == nil { + return false + } + if len(seedName) > 0 { + return *backupBucket.Spec.SeedName == seedName + } + return seedLabelsMatchWithClient(ctx, c, *backupBucket.Spec.SeedName, labelSelector) + } +} + +// BackupEntryFilterFunc returns a filtering func for the seeds and the given label selector. +func BackupEntryFilterFunc(ctx context.Context, c client.Client, seedName string, labelSelector *metav1.LabelSelector) func(obj interface{}) bool { + return func(obj interface{}) bool { + backupEntry, ok := obj.(*gardencorev1beta1.BackupEntry) + if !ok { + return false + } + if backupEntry.Spec.SeedName == nil { + return false + } + if len(seedName) > 0 { + return *backupEntry.Spec.SeedName == seedName + } + return seedLabelsMatchWithClient(ctx, c, *backupEntry.Spec.SeedName, labelSelector) + } +} + +// ManagedSeedFilterFunc returns a filtering func for ManagedSeeds that checks if the ManagedSeed references a Shoot scheduled on a Seed, for which the gardenlet is responsible.. +func ManagedSeedFilterFunc(ctx context.Context, c client.Client, seedName string, labelSelector *metav1.LabelSelector) func(obj interface{}) bool { + return func(obj interface{}) bool { + managedSeed, ok := obj.(*seedmanagementv1alpha1.ManagedSeed) + if !ok { + return false + } + if managedSeed.Spec.Shoot == nil || managedSeed.Spec.Shoot.Name == "" { + return false + } + shoot := &gardencorev1beta1.Shoot{} + if err := c.Get(ctx, kutil.Key(managedSeed.Namespace, managedSeed.Spec.Shoot.Name), shoot); err != nil { + return false + } + if shoot.Spec.SeedName == nil { + return false + } + if len(seedName) > 0 { + if shoot.Status.SeedName == nil || *shoot.Spec.SeedName == *shoot.Status.SeedName { + return *shoot.Spec.SeedName == seedName + } + return *shoot.Status.SeedName == seedName + } + if shoot.Status.SeedName == nil || *shoot.Spec.SeedName == *shoot.Status.SeedName { + return seedLabelsMatchWithClient(ctx, c, *shoot.Spec.SeedName, labelSelector) + } + return seedLabelsMatchWithClient(ctx, c, *shoot.Status.SeedName, labelSelector) + } +} diff --git a/vendor/github.com/gardener/gardener/pkg/controllerutils/worker.go b/vendor/github.com/gardener/gardener/pkg/controllerutils/worker.go new file mode 100644 index 00000000..735b5e5d --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/controllerutils/worker.go @@ -0,0 +1,133 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package controllerutils + +import ( + "context" + "fmt" + "sync" + "time" + + "github.com/gardener/gardener/pkg/logger" + kutil "github.com/gardener/gardener/pkg/utils/kubernetes" + + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/util/workqueue" + "sigs.k8s.io/controller-runtime/pkg/reconcile" + "sigs.k8s.io/controller-runtime/pkg/runtime/inject" +) + +// DeprecatedCreateWorker creates and runs a worker thread that just processes items in the +// specified queue. The worker will run until stopCh is closed. The worker will be +// added to the wait group when started and marked done when finished. +// Deprecated: Use CreateWorker instead. +func DeprecatedCreateWorker(ctx context.Context, queue workqueue.RateLimitingInterface, resourceType string, reconciler func(key string) error, waitGroup *sync.WaitGroup, workerCh chan int) { + CreateWorker(ctx, queue, resourceType, reconcile.Func(func(_ context.Context, req reconcile.Request) (reconcile.Result, error) { + meta := kutil.ObjectMeta(req.Namespace, req.Name) + key, err := cache.MetaNamespaceKeyFunc(&meta) + if err != nil { + logger.Logger.WithError(err).Error("Could not create key from meta") + return reconcile.Result{}, nil + } + + return reconcile.Result{}, reconciler(key) + }), waitGroup, workerCh) +} + +// CreateWorker creates and runs a worker thread that just processes items in the +// specified queue. The worker will run until stopCh is closed. The worker will be +// added to the wait group when started and marked done when finished. +// The given context is injected into the `reconciler` if it implements `inject.Stoppable`. +// Optionally passed inject functions are called with the `reconciler` but potentially returned errors are disregarded. +func CreateWorker(ctx context.Context, queue workqueue.RateLimitingInterface, resourceType string, reconciler reconcile.Reconciler, waitGroup *sync.WaitGroup, workerCh chan int, injectFn ...inject.Func) { + fns := append(injectFn, func(i interface{}) error { + _, err := inject.StopChannelInto(ctx.Done(), i) + return err + }) + + for _, f := range fns { + if err := f(reconciler); err != nil { + logger.Logger.Errorf("An error occurred while reconciler injection: %v", err) + } + } + + waitGroup.Add(1) + workerCh <- 1 + go func() { + wait.UntilWithContext(ctx, func(ctx context.Context) { + worker(ctx, queue, resourceType, reconciler) + }, time.Second) + workerCh <- -1 + waitGroup.Done() + }() +} + +func requestFromKey(key interface{}) (reconcile.Request, error) { + switch v := key.(type) { + case string: + namespace, name, err := cache.SplitMetaNamespaceKey(key.(string)) + if err != nil { + return reconcile.Request{}, err + } + + return reconcile.Request{NamespacedName: types.NamespacedName{Namespace: namespace, Name: name}}, nil + case reconcile.Request: + return v, nil + default: + return reconcile.Request{}, fmt.Errorf("unknown key type %T", key) + } +} + +// worker runs a worker thread that just dequeues items, processes them, and marks them done. +// It enforces that the reconciler is never invoked concurrently with the same key. +func worker(ctx context.Context, queue workqueue.RateLimitingInterface, resourceType string, reconciler reconcile.Reconciler) { + exit := false + for !exit { + exit = func() bool { + key, quit := queue.Get() + if quit { + return true + } + defer queue.Done(key) + + req, err := requestFromKey(key) + if err != nil { + logger.Logger.WithError(err).Error("Cannot obtain request from key") + queue.Forget(key) + return false + } + + res, err := reconciler.Reconcile(ctx, req) + if err != nil { + logger.Logger.Infof("Error syncing %s %v: %v", resourceType, key, err) + queue.AddRateLimited(key) + return false + } + + if res.RequeueAfter > 0 { + queue.AddAfter(key, res.RequeueAfter) + return false + } + if res.Requeue { + queue.AddRateLimited(key) + return false + } + queue.Forget(key) + return false + }() + } +} diff --git a/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/doc.go b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/doc.go new file mode 100644 index 00000000..3e61bbf7 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/doc.go @@ -0,0 +1,18 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// 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. + +// +k8s:deepcopy-gen=package +// +groupName=gardenlet.config.gardener.cloud + +package config // import "github.com/gardener/gardener/pkg/gardenlet/apis/config" diff --git a/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/helper/helpers.go b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/helper/helpers.go new file mode 100644 index 00000000..e872e6cf --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/helper/helpers.go @@ -0,0 +1,84 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package helper + +import ( + "fmt" + + gardencore "github.com/gardener/gardener/pkg/apis/core" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "github.com/gardener/gardener/pkg/gardenlet/apis/config" + configv1alpha1 "github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +// SeedNameFromSeedConfig returns an empty string if the given seed config is nil, or the +// name inside the seed config. +func SeedNameFromSeedConfig(seedConfig *config.SeedConfig) string { + if seedConfig == nil { + return "" + } + return seedConfig.SeedTemplate.Name +} + +// StaleExtensionHealthChecksThreshold returns nil if the given config is nil or the check +// for stale health checks is not enabled. Otherwise it returns the threshold from the given config. +func StaleExtensionHealthChecksThreshold(c *config.StaleExtensionHealthChecks) *metav1.Duration { + if c != nil && c.Enabled { + return c.Threshold + } + + return nil +} + +var scheme *runtime.Scheme + +func init() { + scheme = runtime.NewScheme() + // core schemes are needed here to properly convert the embedded SeedTemplate objects + utilruntime.Must(gardencore.AddToScheme(scheme)) + utilruntime.Must(gardencorev1beta1.AddToScheme(scheme)) + utilruntime.Must(config.AddToScheme(scheme)) + utilruntime.Must(configv1alpha1.AddToScheme(scheme)) +} + +// ConvertGardenletConfiguration converts the given object to an internal GardenletConfiguration version. +func ConvertGardenletConfiguration(obj runtime.Object) (*config.GardenletConfiguration, error) { + obj, err := scheme.ConvertToVersion(obj, config.SchemeGroupVersion) + if err != nil { + return nil, err + } + result, ok := obj.(*config.GardenletConfiguration) + if !ok { + return nil, fmt.Errorf("could not convert GardenletConfiguration to internal version") + } + return result, nil +} + +// ConvertGardenletConfigurationExternal converts the given object to an external GardenletConfiguration version. +func ConvertGardenletConfigurationExternal(obj runtime.Object) (*configv1alpha1.GardenletConfiguration, error) { + obj, err := scheme.ConvertToVersion(obj, configv1alpha1.SchemeGroupVersion) + if err != nil { + return nil, err + } + result, ok := obj.(*configv1alpha1.GardenletConfiguration) + if !ok { + return nil, fmt.Errorf("could not convert GardenletConfiguration to version %s", configv1alpha1.SchemeGroupVersion.String()) + } + return result, nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/register.go b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/register.go new file mode 100644 index 00000000..cc2edebe --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/register.go @@ -0,0 +1,51 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "gardenlet.config.gardener.cloud" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + // SchemeBuilder used to register the Shoot resource. + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + // AddToScheme is a pointer to SchemeBuilder.AddToScheme. + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &GardenletConfiguration{}, + ) + return nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/types.go b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/types.go new file mode 100644 index 00000000..028808cd --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/types.go @@ -0,0 +1,367 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config + +import ( + gardencore "github.com/gardener/gardener/pkg/apis/core" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + componentbaseconfig "k8s.io/component-base/config" + "k8s.io/klog" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// GardenletConfiguration defines the configuration for the Gardenlet. +type GardenletConfiguration struct { + metav1.TypeMeta + // GardenClientConnection specifies the kubeconfig file and the client connection settings + // for the proxy server to use when communicating with the garden apiserver. + GardenClientConnection *GardenClientConnection + // SeedClientConnection specifies the client connection settings for the proxy server + // to use when communicating with the seed apiserver. + SeedClientConnection *SeedClientConnection + // ShootClientConnection specifies the client connection settings for the proxy server + // to use when communicating with the shoot apiserver. + ShootClientConnection *ShootClientConnection + // Controllers defines the configuration of the controllers. + Controllers *GardenletControllerConfiguration + // Resources defines the total capacity for seed resources and the amount reserved for use by Gardener. + Resources *ResourcesConfiguration + // LeaderElection defines the configuration of leader election client. + LeaderElection *LeaderElectionConfiguration + // LogLevel is the level/severity for the logs. Must be one of [info,debug,error]. + LogLevel *string + // KubernetesLogLevel is the log level used for Kubernetes' k8s.io/klog functions. + KubernetesLogLevel *klog.Level + // Server defines the configuration of the HTTP server. + Server *ServerConfiguration + // FeatureGates is a map of feature names to bools that enable or disable alpha/experimental + // features. This field modifies piecemeal the built-in default values from + // "github.com/gardener/gardener/pkg/gardenlet/features/features.go". + // Default: nil + FeatureGates map[string]bool + // SeedConfig contains configuration for the seed cluster. Must not be set if seed selector is set. + // In this case the gardenlet creates the `Seed` object itself based on the provided config. + SeedConfig *SeedConfig + // SeedSelector contains an optional list of labels on `Seed` resources that shall be managed by + // this gardenlet instance. In this case the `Seed` object is not managed by the Gardenlet and must + // be created by an operator/administrator. + SeedSelector *metav1.LabelSelector + // Logging contains an optional configurations for the logging stack deployed + // by the Gardenlet in the seed clusters. + Logging *Logging + // SNI contains an optional configuration for the APIServerSNI feature used + // by the Gardenlet in the seed clusters. + SNI *SNI +} + +// GardenClientConnection specifies the kubeconfig file and the client connection settings +// for the proxy server to use when communicating with the garden apiserver. +type GardenClientConnection struct { + componentbaseconfig.ClientConnectionConfiguration + // GardenClusterAddress is the external address that the gardenlets can use to remotely connect to the Garden + // cluster. It is needed in case the gardenlet deploys itself into shooted seeds. + GardenClusterAddress *string + // GardenClusterCACert is the external address that the gardenlets can use to remotely connect to the Garden + // cluster. It is needed in case the gardenlet deploys itself into shooted seeds. + GardenClusterCACert []byte + // BootstrapKubeconfig is a reference to a secret that contains a data key 'kubeconfig' whose value + // is a kubeconfig that can be used for bootstrapping. If `kubeconfig` is given then only this kubeconfig + // will be considered. + BootstrapKubeconfig *corev1.SecretReference + // KubeconfigSecret is the reference to a secret object that stores the gardenlet's kubeconfig that + // it uses to communicate with the garden cluster. If `kubeconfig` is given then only this kubeconfig + // will be considered. + KubeconfigSecret *corev1.SecretReference +} + +// SeedClientConnection specifies the client connection settings +// for the proxy server to use when communicating with the seed apiserver. +type SeedClientConnection struct { + componentbaseconfig.ClientConnectionConfiguration +} + +// ShootClientConnection specifies the client connection settings +// for the proxy server to use when communicating with the shoot apiserver. +type ShootClientConnection struct { + componentbaseconfig.ClientConnectionConfiguration +} + +// GardenletControllerConfiguration defines the configuration of the controllers. +type GardenletControllerConfiguration struct { + // BackupBucket defines the configuration of the BackupBucket controller. + BackupBucket *BackupBucketControllerConfiguration + // BackupEntry defines the configuration of the BackupEntry controller. + BackupEntry *BackupEntryControllerConfiguration + // ControllerInstallation defines the configuration of the ControllerInstallation controller. + ControllerInstallation *ControllerInstallationControllerConfiguration + // ControllerInstallationCare defines the configuration of the ControllerInstallationCare controller. + ControllerInstallationCare *ControllerInstallationCareControllerConfiguration + // ControllerInstallationRequired defines the configuration of the ControllerInstallationRequired controller. + ControllerInstallationRequired *ControllerInstallationRequiredControllerConfiguration + // Seed defines the configuration of the Seed controller. + Seed *SeedControllerConfiguration + // Shoot defines the configuration of the Shoot controller. + Shoot *ShootControllerConfiguration + // ShootCare defines the configuration of the ShootCare controller. + ShootCare *ShootCareControllerConfiguration + // ShootStateSync defines the configuration of the ShootState controller. + ShootStateSync *ShootStateSyncControllerConfiguration + // SeedAPIServerNetworkPolicy defines the configuration of the SeedAPIServerNetworkPolicy controller. + SeedAPIServerNetworkPolicy *SeedAPIServerNetworkPolicyControllerConfiguration + // ManagedSeedControllerConfiguration the configuration of the ManagedSeed controller. + ManagedSeed *ManagedSeedControllerConfiguration +} + +// BackupBucketControllerConfiguration defines the configuration of the BackupBucket +// controller. +type BackupBucketControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on events. + ConcurrentSyncs *int +} + +// BackupEntryControllerConfiguration defines the configuration of the BackupEntry +// controller. +type BackupEntryControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on events. + ConcurrentSyncs *int + // DeletionGracePeriodHours holds the period in number of hours to delete the BackupEntry after deletion timestamp is set. + // If value is set to 0 then the BackupEntryController will trigger deletion immediately. + DeletionGracePeriodHours *int + // DeletionGracePeriodShootPurposes is a list of shoot purposes for which the deletion grace period applies. All + // BackupEntries corresponding to Shoots with different purposes will be deleted immediately. + DeletionGracePeriodShootPurposes []gardencore.ShootPurpose +} + +// ControllerInstallationControllerConfiguration defines the configuration of the +// ControllerInstallation controller. +type ControllerInstallationControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on + // events. + ConcurrentSyncs *int +} + +// ControllerInstallationCareControllerConfiguration defines the configuration of the ControllerInstallationCare +// controller. +type ControllerInstallationCareControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on + // events. + ConcurrentSyncs *int + // SyncPeriod is the duration how often the existing resources are reconciled (how + // often the health check of ControllerInstallations is performed. + SyncPeriod *metav1.Duration +} + +// ControllerInstallationRequiredControllerConfiguration defines the configuration of the ControllerInstallationRequired +// controller. +type ControllerInstallationRequiredControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on + // events. + ConcurrentSyncs *int +} + +// SeedControllerConfiguration defines the configuration of the Seed controller. +type SeedControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on + // events. + ConcurrentSyncs *int + // SyncPeriod is the duration how often the existing resources are reconciled. + SyncPeriod *metav1.Duration +} + +// ShootControllerConfiguration defines the configuration of the Shoot +// controller. +type ShootControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on + // events. + ConcurrentSyncs *int + // ProgressReportPeriod is the period how often the progress of a shoot operation will be reported in the + // Shoot's `.status.lastOperation` field. By default, the progress will be reported immediately after a task of the + // respective flow has been completed. If you set this to a value > 0 (e.g., 5s) then it will be only reported every + // 5 seconds. Any tasks that were completed in the meantime will not be reported. + ProgressReportPeriod *metav1.Duration + // ReconcileInMaintenanceOnly determines whether Shoot reconciliations happen only + // during its maintenance time window. + ReconcileInMaintenanceOnly *bool + // RespectSyncPeriodOverwrite determines whether a sync period overwrite of a + // Shoot (via annotation) is respected or not. Defaults to false. + RespectSyncPeriodOverwrite *bool + // RetryDuration is the maximum duration how often a reconciliation will be retried + // in case of errors. + RetryDuration *metav1.Duration + // SyncPeriod is the duration how often the existing resources are reconciled. + SyncPeriod *metav1.Duration + // DNSEntryTTLSeconds is the TTL in seconds that is being used for DNS entries when reconciling shoots. + // Default: 120s + DNSEntryTTLSeconds *int64 +} + +// ShootCareControllerConfiguration defines the configuration of the ShootCare +// controller. +type ShootCareControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on + // events. + ConcurrentSyncs *int + // SyncPeriod is the duration how often the existing resources are reconciled (how + // often the health check of Shoot clusters is performed (only if no operation is + // already running on them). + SyncPeriod *metav1.Duration + // StaleExtensionHealthChecks defines the configuration of the check for stale extension health checks. + StaleExtensionHealthChecks *StaleExtensionHealthChecks + // ConditionThresholds defines the condition threshold per condition type. + ConditionThresholds []ConditionThreshold +} + +// StaleExtensionHealthChecks defines the configuration of the check for stale extension health checks. +type StaleExtensionHealthChecks struct { + // Enabled specifies whether the check for stale extensions health checks is enabled. + // Defaults to true. + Enabled bool + // Threshold configures the threshold when gardenlet considers a health check report of an extension CRD as outdated. + // The threshold should have some leeway in case a Gardener extension is temporarily unavailable. + // Defaults to 5m. + Threshold *metav1.Duration +} + +// ConditionThreshold defines the duration how long a flappy condition stays in progressing state. +type ConditionThreshold struct { + // Type is the type of the condition to define the threshold for. + Type string + // Duration is the duration how long the condition can stay in the progressing state. + Duration metav1.Duration +} + +// ShootStateSyncControllerConfiguration defines the configuration of the ShootState Sync controller. +type ShootStateSyncControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on + // events. + ConcurrentSyncs *int + // SyncPeriod is the duration how often the existing extension resources are synced to the ShootState resource + SyncPeriod *metav1.Duration +} + +// SeedAPIServerNetworkPolicyControllerConfiguration defines the configuration of the SeedAPIServerNetworkPolicy +// controller. +type SeedAPIServerNetworkPolicyControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on events. + ConcurrentSyncs *int +} + +// ManagedSeedControllerConfiguration defines the configuration of the ManagedSeed controller. +type ManagedSeedControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on + // events. + ConcurrentSyncs *int + // SyncJitterPeriod is a jitter duration for the reconciler sync that can be used to distribute the syncs randomly. + // If its value is greater than 0 then the managed seeds will not be enqueued immediately but only after a random + // duration between 0 and the configured value. It is defaulted to 5m. + SyncJitterPeriod *metav1.Duration +} + +// ResourcesConfiguration defines the total capacity for seed resources and the amount reserved for use by Gardener. +type ResourcesConfiguration struct { + // Capacity defines the total resources of a seed. + Capacity corev1.ResourceList + // Reserved defines the resources of a seed that are reserved for use by Gardener. + // Defaults to 0. + Reserved corev1.ResourceList +} + +// LeaderElectionConfiguration defines the configuration of leader election +// clients for components that can run with leader election enabled. +type LeaderElectionConfiguration struct { + componentbaseconfig.LeaderElectionConfiguration + // LockObjectNamespace defines the namespace of the lock object. + LockObjectNamespace *string + // LockObjectName defines the lock object name. + LockObjectName *string +} + +// SeedConfig contains configuration for the seed cluster. +type SeedConfig struct { + gardencore.SeedTemplate +} + +// FluentBit contains configuration for Fluent Bit. +type FluentBit struct { + // ServiceSection defines [SERVICE] configuration for the fluent-bit. + // If it is nil, fluent-bit uses default service configuration. + ServiceSection *string + // InputSection defines [INPUT] configuration for the fluent-bit. + // If it is nil, fluent-bit uses default input configuration. + InputSection *string + // OutputSection defines [OUTPUT] configuration for the fluent-bit. + // If it is nil, fluent-bit uses default output configuration. + OutputSection *string +} + +// Logging contains configuration for the logging stack. +type Logging struct { + // FluentBit contains configurations for the fluent-bit + FluentBit *FluentBit +} + +// ServerConfiguration contains details for the HTTP(S) servers. +type ServerConfiguration struct { + // HTTPS is the configuration for the HTTPS server. + HTTPS HTTPSServer +} + +// Server contains information for HTTP(S) server configuration. +type Server struct { + // BindAddress is the IP address on which to listen for the specified port. + BindAddress string + // Port is the port on which to serve unsecured, unauthenticated access. + Port int +} + +// HTTPSServer is the configuration for the HTTPSServer server. +type HTTPSServer struct { + // Server is the configuration for the bind address and the port. + Server + // TLSServer contains information about the TLS configuration for a HTTPS server. If empty then a proper server + // certificate will be self-generated during startup. + TLS *TLSServer +} + +// TLSServer contains information about the TLS configuration for a HTTPS server. +type TLSServer struct { + // ServerCertPath is the path to the server certificate file. + ServerCertPath string + // ServerKeyPath is the path to the private key file. + ServerKeyPath string +} + +// SNI contains an optional configuration for the APIServerSNI feature used +// by the Gardenlet in the seed clusters. +type SNI struct { + // Ingress is the ingressgateway configuration. + Ingress *SNIIngress +} + +// SNIIngress contains configuration of the ingressgateway. +type SNIIngress struct { + // ServiceName is the name of the ingressgateway Service. + // Defaults to "istio-ingressgateway". + ServiceName *string + // Namespace is the namespace in which the ingressgateway is deployed in. + // Defaults to "istio-ingress". + Namespace *string + // Labels of the ingressgateway + // Defaults to "istio: ingressgateway". + Labels map[string]string +} diff --git a/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/conversions.go b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/conversions.go new file mode 100644 index 00000000..a92b1dc1 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/conversions.go @@ -0,0 +1,30 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/conversion" + + gardencore "github.com/gardener/gardener/pkg/apis/core" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" +) + +func Convert_v1beta1_SeedTemplate_To_core_SeedTemplate(in *gardencorev1beta1.SeedTemplate, out *gardencore.SeedTemplate, s conversion.Scope) error { + return gardencorev1beta1.Convert_v1beta1_SeedTemplate_To_core_SeedTemplate(in, out, s) +} + +func Convert_core_SeedTemplate_To_v1beta1_SeedTemplate(in *gardencore.SeedTemplate, out *gardencorev1beta1.SeedTemplate, s conversion.Scope) error { + return gardencorev1beta1.Convert_core_SeedTemplate_To_v1beta1_SeedTemplate(in, out, s) +} diff --git a/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/defaults.go b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/defaults.go new file mode 100644 index 00000000..b7755ea7 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/defaults.go @@ -0,0 +1,324 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/tools/leaderelection/resourcelock" + componentbaseconfigv1alpha1 "k8s.io/component-base/config/v1alpha1" + "k8s.io/utils/pointer" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return RegisterDefaults(scheme) +} + +// SetDefaults_GardenletConfiguration sets defaults for the configuration of the Gardenlet. +func SetDefaults_GardenletConfiguration(obj *GardenletConfiguration) { + if obj.GardenClientConnection == nil { + obj.GardenClientConnection = &GardenClientConnection{} + } + + if obj.SeedClientConnection == nil { + obj.SeedClientConnection = &SeedClientConnection{} + } + + if obj.ShootClientConnection == nil { + obj.ShootClientConnection = &ShootClientConnection{} + } + + if obj.Controllers == nil { + obj.Controllers = &GardenletControllerConfiguration{} + } + if obj.Controllers.BackupBucket == nil { + obj.Controllers.BackupBucket = &BackupBucketControllerConfiguration{} + } + if obj.Controllers.BackupEntry == nil { + obj.Controllers.BackupEntry = &BackupEntryControllerConfiguration{} + } + if obj.Controllers.ControllerInstallation == nil { + obj.Controllers.ControllerInstallation = &ControllerInstallationControllerConfiguration{} + } + if obj.Controllers.ControllerInstallationCare == nil { + obj.Controllers.ControllerInstallationCare = &ControllerInstallationCareControllerConfiguration{} + } + if obj.Controllers.ControllerInstallationRequired == nil { + obj.Controllers.ControllerInstallationRequired = &ControllerInstallationRequiredControllerConfiguration{} + } + if obj.Controllers.Seed == nil { + obj.Controllers.Seed = &SeedControllerConfiguration{} + } + if obj.Controllers.Shoot == nil { + obj.Controllers.Shoot = &ShootControllerConfiguration{} + } + if obj.Controllers.ShootCare == nil { + obj.Controllers.ShootCare = &ShootCareControllerConfiguration{} + } + if obj.Controllers.ShootStateSync == nil { + obj.Controllers.ShootStateSync = &ShootStateSyncControllerConfiguration{} + } + if obj.Controllers.SeedAPIServerNetworkPolicy == nil { + obj.Controllers.SeedAPIServerNetworkPolicy = &SeedAPIServerNetworkPolicyControllerConfiguration{} + } + if obj.Controllers.ManagedSeed == nil { + obj.Controllers.ManagedSeed = &ManagedSeedControllerConfiguration{} + } + + if obj.LeaderElection == nil { + obj.LeaderElection = &LeaderElectionConfiguration{} + } + + if obj.LogLevel == nil { + v := DefaultLogLevel + obj.LogLevel = &v + } + + if obj.KubernetesLogLevel == nil { + v := DefaultKubernetesLogLevel + obj.KubernetesLogLevel = &v + } + + if obj.Server == nil { + obj.Server = &ServerConfiguration{} + } + if len(obj.Server.HTTPS.BindAddress) == 0 { + obj.Server.HTTPS.BindAddress = "0.0.0.0" + } + if obj.Server.HTTPS.Port == 0 { + obj.Server.HTTPS.Port = 2720 + } + + if obj.SNI == nil { + obj.SNI = &SNI{} + } +} + +// SetDefaults_ClientConnectionConfiguration sets defaults for the client connection objects. +func SetDefaults_ClientConnectionConfiguration(obj *componentbaseconfigv1alpha1.ClientConnectionConfiguration) { + if obj.QPS == 0.0 { + obj.QPS = 50.0 + } + if obj.Burst == 0 { + obj.Burst = 100 + } +} + +// SetDefaults_LeaderElectionConfiguration sets defaults for the leader election of the gardenlet. +func SetDefaults_LeaderElectionConfiguration(obj *LeaderElectionConfiguration) { + if obj.ResourceLock == "" { + obj.ResourceLock = resourcelock.LeasesResourceLock + } + + componentbaseconfigv1alpha1.RecommendedDefaultLeaderElectionConfiguration(&obj.LeaderElectionConfiguration) + + if obj.LockObjectNamespace == nil { + v := GardenletDefaultLockObjectNamespace + obj.LockObjectNamespace = &v + } + if obj.LockObjectName == nil { + v := GardenletDefaultLockObjectName + obj.LockObjectName = &v + } +} + +// SetDefaults_BackupBucketControllerConfiguration sets defaults for the backup bucket controller. +func SetDefaults_BackupBucketControllerConfiguration(obj *BackupBucketControllerConfiguration) { + if obj.ConcurrentSyncs == nil { + v := DefaultControllerConcurrentSyncs + obj.ConcurrentSyncs = &v + } +} + +// SetDefaults_BackupEntryControllerConfiguration sets defaults for the backup entry controller. +func SetDefaults_BackupEntryControllerConfiguration(obj *BackupEntryControllerConfiguration) { + if obj.ConcurrentSyncs == nil { + v := DefaultControllerConcurrentSyncs + obj.ConcurrentSyncs = &v + } + + if obj.DeletionGracePeriodHours == nil || *obj.DeletionGracePeriodHours < 0 { + v := DefaultBackupEntryDeletionGracePeriodHours + obj.DeletionGracePeriodHours = &v + } +} + +// SetDefaults_ControllerInstallationControllerConfiguration sets defaults for the controller installation controller. +func SetDefaults_ControllerInstallationControllerConfiguration(obj *ControllerInstallationControllerConfiguration) { + if obj.ConcurrentSyncs == nil { + v := DefaultControllerConcurrentSyncs + obj.ConcurrentSyncs = &v + } +} + +// SetDefaults_ControllerInstallationCareControllerConfiguration sets defaults for the controller installation care controller. +func SetDefaults_ControllerInstallationCareControllerConfiguration(obj *ControllerInstallationCareControllerConfiguration) { + if obj.ConcurrentSyncs == nil { + v := DefaultControllerConcurrentSyncs + obj.ConcurrentSyncs = &v + } + + if obj.SyncPeriod == nil { + v := metav1.Duration{Duration: 30 * time.Second} + obj.SyncPeriod = &v + } +} + +// SetDefaults_ControllerInstallationRequiredControllerConfiguration sets defaults for the ControllerInstallationRequired controller. +func SetDefaults_ControllerInstallationRequiredControllerConfiguration(obj *ControllerInstallationRequiredControllerConfiguration) { + if obj.ConcurrentSyncs == nil { + // The controller actually starts one controller per extension resource per Seed. + // For one seed that is already 1 * 10 extension resources = 10 workers. + v := 1 + obj.ConcurrentSyncs = &v + } +} + +// SetDefaults_SeedControllerConfiguration sets defaults for the seed controller. +func SetDefaults_SeedControllerConfiguration(obj *SeedControllerConfiguration) { + if obj.ConcurrentSyncs == nil { + v := DefaultControllerConcurrentSyncs + obj.ConcurrentSyncs = &v + } + + if obj.SyncPeriod == nil { + v := DefaultControllerSyncPeriod + obj.SyncPeriod = &v + } +} + +// SetDefaults_ShootControllerConfiguration sets defaults for the shoot controller. +func SetDefaults_ShootControllerConfiguration(obj *ShootControllerConfiguration) { + if obj.ConcurrentSyncs == nil { + v := DefaultControllerConcurrentSyncs + obj.ConcurrentSyncs = &v + } + + if obj.SyncPeriod == nil { + v := metav1.Duration{Duration: time.Hour} + obj.SyncPeriod = &v + } + + if obj.RespectSyncPeriodOverwrite == nil { + falseVar := false + obj.RespectSyncPeriodOverwrite = &falseVar + } + + if obj.ReconcileInMaintenanceOnly == nil { + falseVar := false + obj.ReconcileInMaintenanceOnly = &falseVar + } + + if obj.RetryDuration == nil { + v := metav1.Duration{Duration: 12 * time.Hour} + obj.RetryDuration = &v + } + + if obj.DNSEntryTTLSeconds == nil { + obj.DNSEntryTTLSeconds = pointer.Int64Ptr(120) + } +} + +// SetDefaults_ShootCareControllerConfiguration sets defaults for the shoot care controller. +func SetDefaults_ShootCareControllerConfiguration(obj *ShootCareControllerConfiguration) { + if obj.ConcurrentSyncs == nil { + v := DefaultControllerConcurrentSyncs + obj.ConcurrentSyncs = &v + } + + if obj.SyncPeriod == nil { + v := metav1.Duration{Duration: time.Minute} + obj.SyncPeriod = &v + } + + if obj.StaleExtensionHealthChecks == nil { + v := StaleExtensionHealthChecks{Enabled: true} + obj.StaleExtensionHealthChecks = &v + } +} + +// SetDefaults_StaleExtensionHealthChecks sets defaults for the stale extension health checks. +func SetDefaults_StaleExtensionHealthChecks(obj *StaleExtensionHealthChecks) { + if obj.Threshold == nil { + v := metav1.Duration{Duration: 5 * time.Minute} + obj.Threshold = &v + } +} + +// SetDefaults_ShootStateSyncControllerConfiguration sets defaults for the shoot state controller. +func SetDefaults_ShootStateSyncControllerConfiguration(obj *ShootStateSyncControllerConfiguration) { + if obj.ConcurrentSyncs == nil { + // The controller actually starts one controller per extension resource per Seed. + // For one seed that is already 1 * 10 extension resources = 10 workers. + v := 1 + obj.ConcurrentSyncs = &v + } + + if obj.SyncPeriod == nil { + v := metav1.Duration{Duration: time.Minute} + obj.SyncPeriod = &v + } +} + +// SetDefaults_SeedAPIServerNetworkPolicyControllerConfiguration sets defaults for the seed apiserver endpoints controller. +func SetDefaults_SeedAPIServerNetworkPolicyControllerConfiguration(obj *SeedAPIServerNetworkPolicyControllerConfiguration) { + if obj.ConcurrentSyncs == nil { + // only use few workers for each seed, as the API server endpoints should stay the same most of the time. + v := 3 + obj.ConcurrentSyncs = &v + } +} + +// SetDefaults_ManagedSeedControllerConfiguration sets defaults for the managed seed controller. +func SetDefaults_ManagedSeedControllerConfiguration(obj *ManagedSeedControllerConfiguration) { + if obj.ConcurrentSyncs == nil { + v := DefaultControllerConcurrentSyncs + obj.ConcurrentSyncs = &v + } + + if obj.SyncJitterPeriod == nil { + v := metav1.Duration{Duration: 5 * time.Minute} + obj.SyncJitterPeriod = &v + } +} + +// SetDefaults_SNI sets defaults for SNI. +func SetDefaults_SNI(obj *SNI) { + if obj.Ingress == nil { + obj.Ingress = &SNIIngress{} + } +} + +// SetDefaults_SNIIngress sets defaults for SNI ingressgateway. +func SetDefaults_SNIIngress(obj *SNIIngress) { + var ( + defaultNS = DefaultSNIIngresNamespace + defaultSVCName = DefaultSNIIngresServiceName + ) + + if obj.Namespace == nil { + obj.Namespace = &defaultNS + } + + if obj.ServiceName == nil { + obj.ServiceName = &defaultSVCName + } + + if obj.Labels == nil { + obj.Labels = map[string]string{"istio": "ingressgateway"} + } +} diff --git a/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/doc.go b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/doc.go new file mode 100644 index 00000000..fa831411 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/doc.go @@ -0,0 +1,20 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// 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. + +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=github.com/gardener/gardener/pkg/gardenlet/apis/config +// +k8s:openapi-gen=true +// +k8s:defaulter-gen=TypeMeta + +package v1alpha1 // import "github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1" diff --git a/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/register.go b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/register.go new file mode 100644 index 00000000..e526ecf1 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/register.go @@ -0,0 +1,54 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "gardenlet.config.gardener.cloud" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + // SchemeBuilder used to register the Shoot resource. + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + // AddToScheme is a pointer to SchemeBuilder.AddToScheme. + AddToScheme = localSchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addDefaultingFuncs, addKnownTypes) +} + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &GardenletConfiguration{}, + ) + return nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/types.go b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/types.go new file mode 100644 index 00000000..df61431f --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/types.go @@ -0,0 +1,480 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + "time" + + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + componentbaseconfigv1alpha1 "k8s.io/component-base/config/v1alpha1" + "k8s.io/klog" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// GardenletConfiguration defines the configuration for the Gardenlet. +type GardenletConfiguration struct { + metav1.TypeMeta `json:",inline"` + // GardenClientConnection specifies the kubeconfig file and the client connection settings + // for the proxy server to use when communicating with the garden apiserver. + // +optional + GardenClientConnection *GardenClientConnection `json:"gardenClientConnection,omitempty"` + // SeedClientConnection specifies the client connection settings for the proxy server + // to use when communicating with the seed apiserver. + // +optional + SeedClientConnection *SeedClientConnection `json:"seedClientConnection,omitempty"` + // ShootClientConnection specifies the client connection settings for the proxy server + // to use when communicating with the shoot apiserver. + // +optional + ShootClientConnection *ShootClientConnection `json:"shootClientConnection,omitempty"` + // Controllers defines the configuration of the controllers. + // +optional + Controllers *GardenletControllerConfiguration `json:"controllers,omitempty"` + // Resources defines the total capacity for seed resources and the amount reserved for use by Gardener. + // +optional + Resources *ResourcesConfiguration `json:"resources,omitempty"` + // LeaderElection defines the configuration of leader election client. + // +optional + LeaderElection *LeaderElectionConfiguration `json:"leaderElection,omitempty"` + // LogLevel is the level/severity for the logs. Must be one of [info,debug,error]. + // +optional + LogLevel *string `json:"logLevel,omitempty"` + // KubernetesLogLevel is the log level used for Kubernetes' k8s.io/klog functions. + // +optional + KubernetesLogLevel *klog.Level `json:"kubernetesLogLevel,omitempty"` + // Server defines the configuration of the HTTP server. + // +optional + Server *ServerConfiguration `json:"server,omitempty"` + // FeatureGates is a map of feature names to bools that enable or disable alpha/experimental + // features. This field modifies piecemeal the built-in default values from + // "github.com/gardener/gardener/pkg/gardenlet/features/features.go". + // Default: nil + // +optional + FeatureGates map[string]bool `json:"featureGates,omitempty"` + // SeedConfig contains configuration for the seed cluster. Must not be set if seed selector is set. + // In this case the gardenlet creates the `Seed` object itself based on the provided config. + // +optional + SeedConfig *SeedConfig `json:"seedConfig,omitempty"` + // SeedSelector contains an optional list of labels on `Seed` resources that shall be managed by + // this gardenlet instance. In this case the `Seed` object is not managed by the Gardenlet and must + // be created by an operator/administrator. + // +optional + SeedSelector *metav1.LabelSelector `json:"seedSelector,omitempty"` + // Logging contains an optional configurations for the logging stack deployed + // by the Gardenlet in the seed clusters. + // +optional + Logging *Logging `json:"logging,omitempty"` + // SNI contains an optional configuration for the APIServerSNI feature used + // by the Gardenlet in the seed clusters. + // +optional + SNI *SNI `json:"sni,omitempty"` +} + +// GardenClientConnection specifies the kubeconfig file and the client connection settings +// for the proxy server to use when communicating with the garden apiserver. +type GardenClientConnection struct { + componentbaseconfigv1alpha1.ClientConnectionConfiguration `json:",inline"` + // GardenClusterAddress is the external address that the gardenlets can use to remotely connect to the Garden + // cluster. It is needed in case the gardenlet deploys itself into shooted seeds. + // +optional + GardenClusterAddress *string `json:"gardenClusterAddress,omitempty"` + // GardenClusterCACert is the external address that the gardenlets can use to remotely connect to the Garden + // cluster. It is needed in case the gardenlet deploys itself into shooted seeds. + // +optional + GardenClusterCACert []byte `json:"gardenClusterCACert,omitempty"` + // BootstrapKubeconfig is a reference to a secret that contains a data key 'kubeconfig' whose value + // is a kubeconfig that can be used for bootstrapping. If `kubeconfig` is given then only this kubeconfig + // will be considered. + // +optional + BootstrapKubeconfig *corev1.SecretReference `json:"bootstrapKubeconfig,omitempty"` + // KubeconfigSecret is the reference to a secret object that stores the gardenlet's kubeconfig that + // it uses to communicate with the garden cluster. If `kubeconfig` is given then only this kubeconfig + // will be considered. + // +optional + KubeconfigSecret *corev1.SecretReference `json:"kubeconfigSecret,omitempty"` +} + +// SeedClientConnection specifies the client connection settings +// for the proxy server to use when communicating with the seed apiserver. +type SeedClientConnection struct { + componentbaseconfigv1alpha1.ClientConnectionConfiguration `json:",inline"` +} + +// ShootClientConnection specifies the client connection settings +// for the proxy server to use when communicating with the shoot apiserver. +type ShootClientConnection struct { + componentbaseconfigv1alpha1.ClientConnectionConfiguration `json:",inline"` +} + +// GardenletControllerConfiguration defines the configuration of the controllers. +type GardenletControllerConfiguration struct { + // BackupBucket defines the configuration of the BackupBucket controller. + // +optional + BackupBucket *BackupBucketControllerConfiguration `json:"backupBucket"` + // BackupEntry defines the configuration of the BackupEntry controller. + // +optional + BackupEntry *BackupEntryControllerConfiguration `json:"backupEntry"` + // ControllerInstallation defines the configuration of the ControllerInstallation controller. + // +optional + ControllerInstallation *ControllerInstallationControllerConfiguration `json:"controllerInstallation,omitempty"` + // ControllerInstallationCare defines the configuration of the ControllerInstallationCare controller. + // +optional + ControllerInstallationCare *ControllerInstallationCareControllerConfiguration `json:"controllerInstallationCare,omitempty"` + // ControllerInstallationRequired defines the configuration of the ControllerInstallationRequired controller. + // +optional + ControllerInstallationRequired *ControllerInstallationRequiredControllerConfiguration `json:"controllerInstallationRequired,omitempty"` + // Seed defines the configuration of the Seed controller. + // +optional + Seed *SeedControllerConfiguration `json:"seed,omitempty"` + // Shoot defines the configuration of the Shoot controller. + // +optional + Shoot *ShootControllerConfiguration `json:"shoot,omitempty"` + // ShootCare defines the configuration of the ShootCare controller. + // +optional + ShootCare *ShootCareControllerConfiguration `json:"shootCare,omitempty"` + // ShootStateSync defines the configuration of the ShootState controller + // +optional + ShootStateSync *ShootStateSyncControllerConfiguration `json:"shootStateSync,omitempty"` + // SeedAPIServerNetworkPolicy defines the configuration of the SeedAPIServerNetworkPolicy controller + // +optional + SeedAPIServerNetworkPolicy *SeedAPIServerNetworkPolicyControllerConfiguration `json:"seedAPIServerNetworkPolicy,omitempty"` + // ManagedSeedControllerConfiguration the configuration of the ManagedSeed controller. + // +optional + ManagedSeed *ManagedSeedControllerConfiguration `json:"managedSeed,omitempty"` +} + +// BackupBucketControllerConfiguration defines the configuration of the BackupBucket +// controller. +type BackupBucketControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on events. + // +optional + ConcurrentSyncs *int `json:"concurrentSyncs,omitempty"` +} + +// BackupEntryControllerConfiguration defines the configuration of the BackupEntry +// controller. +type BackupEntryControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on events. + // +optional + ConcurrentSyncs *int `json:"concurrentSyncs,omitempty"` + // DeletionGracePeriodHours holds the period in number of hours to delete the BackupEntry after deletion timestamp is set. + // If value is set to 0 then the BackupEntryController will trigger deletion immediately. + // +optional + DeletionGracePeriodHours *int `json:"deletionGracePeriodHours,omitempty"` + // DeletionGracePeriodShootPurposes is a list of shoot purposes for which the deletion grace period applies. All + // BackupEntries corresponding to Shoots with different purposes will be deleted immediately. + // +optional + DeletionGracePeriodShootPurposes []gardencorev1beta1.ShootPurpose `json:"deletionGracePeriodShootPurposes,omitempty"` +} + +// ControllerInstallationControllerConfiguration defines the configuration of the +// ControllerInstallation controller. +type ControllerInstallationControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on + // events. + // +optional + ConcurrentSyncs *int `json:"concurrentSyncs,omitempty"` +} + +// ControllerInstallationCareControllerConfiguration defines the configuration of the ControllerInstallationCare +// controller. +type ControllerInstallationCareControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on + // events. + // +optional + ConcurrentSyncs *int `json:"concurrentSyncs,omitempty"` + // SyncPeriod is the duration how often the existing resources are reconciled (how + // often the health check of ControllerInstallations is performed. + // +optional + SyncPeriod *metav1.Duration `json:"syncPeriod,omitempty"` +} + +// ControllerInstallationRequiredControllerConfiguration defines the configuration of the ControllerInstallationRequired +// controller. +type ControllerInstallationRequiredControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on + // events. + // +optional + ConcurrentSyncs *int `json:"concurrentSyncs,omitempty"` +} + +// SeedControllerConfiguration defines the configuration of the Seed controller. +type SeedControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on + // events. + // +optional + ConcurrentSyncs *int `json:"concurrentSyncs,omitempty"` + // SyncPeriod is the duration how often the existing resources are reconciled. + // +optional + SyncPeriod *metav1.Duration `json:"syncPeriod,omitempty"` +} + +// ShootControllerConfiguration defines the configuration of the Shoot +// controller. +type ShootControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on + // events. + // +optional + ConcurrentSyncs *int `json:"concurrentSyncs,omitempty"` + // ProgressReportPeriod is the period how often the progress of a shoot operation will be reported in the + // Shoot's `.status.lastOperation` field. By default, the progress will be reported immediately after a task of the + // respective flow has been completed. If you set this to a value > 0 (e.g., 5s) then it will be only reported every + // 5 seconds. Any tasks that were completed in the meantime will not be reported. + // +optional + ProgressReportPeriod *metav1.Duration `json:"progressReportPeriod,omitempty"` + // ReconcileInMaintenanceOnly determines whether Shoot reconciliations happen only + // during its maintenance time window. + // +optional + ReconcileInMaintenanceOnly *bool `json:"reconcileInMaintenanceOnly,omitempty"` + // RespectSyncPeriodOverwrite determines whether a sync period overwrite of a + // Shoot (via annotation) is respected or not. Defaults to false. + // +optional + RespectSyncPeriodOverwrite *bool `json:"respectSyncPeriodOverwrite,omitempty"` + // RetryDuration is the maximum duration how often a reconciliation will be retried + // in case of errors. + // +optional + RetryDuration *metav1.Duration `json:"retryDuration,omitempty"` + // SyncPeriod is the duration how often the existing resources are reconciled. + // +optional + SyncPeriod *metav1.Duration `json:"syncPeriod,omitempty"` + // DNSEntryTTLSeconds is the TTL in seconds that is being used for DNS entries when reconciling shoots. + // Default: 120s + // +optional + DNSEntryTTLSeconds *int64 `json:"dnsEntryTTLSeconds,omitempty"` +} + +// ShootCareControllerConfiguration defines the configuration of the ShootCare +// controller. +type ShootCareControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on + // events. + // +optional + ConcurrentSyncs *int `json:"concurrentSyncs,omitempty"` + // SyncPeriod is the duration how often the existing resources are reconciled (how + // often the health check of Shoot clusters is performed (only if no operation is + // already running on them). + // +optional + SyncPeriod *metav1.Duration `json:"syncPeriod,omitempty"` + // StaleExtensionHealthChecks defines the configuration of the check for stale extension health checks. + // +optional + StaleExtensionHealthChecks *StaleExtensionHealthChecks `json:"staleExtensionHealthChecks,omitempty"` + // ConditionThresholds defines the condition threshold per condition type. + // +optional + ConditionThresholds []ConditionThreshold `json:"conditionThresholds,omitempty"` +} + +// StaleExtensionHealthChecks defines the configuration of the check for stale extension health checks. +type StaleExtensionHealthChecks struct { + // Enabled specifies whether the check for stale extensions health checks is enabled. + // Defaults to true. + Enabled bool `json:"enabled"` + // Threshold configures the threshold when gardenlet considers a health check report of an extension CRD as outdated. + // The threshold should have some leeway in case a Gardener extension is temporarily unavailable. + // Defaults to 5m. + // +optional + Threshold *metav1.Duration `json:"threshold,omitempty"` +} + +// ConditionThreshold defines the duration how long a flappy condition stays in progressing state. +type ConditionThreshold struct { + // Type is the type of the condition to define the threshold for. + Type string `json:"type"` + // Duration is the duration how long the condition can stay in the progressing state. + Duration metav1.Duration `json:"duration"` +} + +// ShootStateSyncControllerConfiguration defines the configuration of the ShootState Sync controller. +type ShootStateSyncControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on + // events. + // +optional + ConcurrentSyncs *int `json:"concurrentSyncs,omitempty"` + // SyncPeriod is the duration how often the existing extension resources are synced to the ShootState resource + // +optional + SyncPeriod *metav1.Duration `json:"syncPeriod,omitempty"` +} + +// SeedAPIServerNetworkPolicyControllerConfiguration defines the configuration of the SeedAPIServerNetworkPolicy +// controller. +type SeedAPIServerNetworkPolicyControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on events. + // +optional + ConcurrentSyncs *int `json:"concurrentSyncs,omitempty"` +} + +// ManagedSeedControllerConfiguration defines the configuration of the ManagedSeed controller. +type ManagedSeedControllerConfiguration struct { + // ConcurrentSyncs is the number of workers used for the controller to work on + // events. + // +optional + ConcurrentSyncs *int `json:"concurrentSyncs,omitempty"` + // SyncJitterPeriod is a jitter duration for the reconciler sync that can be used to distribute the syncs randomly. + // If its value is greater than 0 then the managed seeds will not be enqueued immediately but only after a random + // duration between 0 and the configured value. It is defaulted to 5m. + // +optional + SyncJitterPeriod *metav1.Duration `json:"syncJitterPeriod,omitempty"` +} + +// ResourcesConfiguration defines the total capacity for seed resources and the amount reserved for use by Gardener. +type ResourcesConfiguration struct { + // Capacity defines the total resources of a seed. + // +optional + Capacity corev1.ResourceList `json:"capacity,omitempty"` + // Reserved defines the resources of a seed that are reserved for use by Gardener. + // Defaults to 0. + // +optional + Reserved corev1.ResourceList `json:"reserved,omitempty"` +} + +// LeaderElectionConfiguration defines the configuration of leader election +// clients for components that can run with leader election enabled. +type LeaderElectionConfiguration struct { + componentbaseconfigv1alpha1.LeaderElectionConfiguration `json:",inline"` + // LockObjectNamespace defines the namespace of the lock object. + // +optional + LockObjectNamespace *string `json:"lockObjectNamespace,omitempty"` + // LockObjectName defines the lock object name. + // +optional + LockObjectName *string `json:"lockObjectName,omitempty"` +} + +// SeedConfig contains configuration for the seed cluster. +type SeedConfig struct { + gardencorev1beta1.SeedTemplate `json:",inline"` +} + +// FluentBit contains configuration for Fluent Bit. +type FluentBit struct { + // ServiceSection defines [SERVICE] configuration for the fluent-bit. + // If it is nil, fluent-bit uses default service configuration. + // +optional + ServiceSection *string `json:"service,omitempty" yaml:"service,omitempty"` + // InputSection defines [INPUT] configuration for the fluent-bit. + // If it is nil, fluent-bit uses default input configuration. + // +optional + InputSection *string `json:"input,omitempty" yaml:"input,omitempty"` + // OutputSection defines [OUTPUT] configuration for the fluent-bit. + // If it is nil, fluent-bit uses default output configuration. + // +optional + OutputSection *string `json:"output,omitempty" yaml:"output,omitempty"` +} + +// Logging contains configuration for the logging stack. +type Logging struct { + // FluentBit contains configurations for the fluent-bit + // +optional + FluentBit *FluentBit `json:"fluentBit,omitempty" yaml:"fluentBit,omitempty"` +} + +// ServerConfiguration contains details for the HTTP(S) servers. +type ServerConfiguration struct { + // HTTPS is the configuration for the HTTPS server. + HTTPS HTTPSServer `json:"https"` +} + +// Server contains information for HTTP(S) server configuration. +type Server struct { + // BindAddress is the IP address on which to listen for the specified port. + BindAddress string `json:"bindAddress"` + // Port is the port on which to serve unsecured, unauthenticated access. + Port int `json:"port"` +} + +// HTTPSServer is the configuration for the HTTPSServer server. +type HTTPSServer struct { + // Server is the configuration for the bind address and the port. + Server `json:",inline"` + // TLSServer contains information about the TLS configuration for a HTTPS server. If empty then a proper server + // certificate will be self-generated during startup. + // +optional + TLS *TLSServer `json:"tls,omitempty"` +} + +// TLSServer contains information about the TLS configuration for a HTTPS server. +type TLSServer struct { + // ServerCertPath is the path to the server certificate file. + ServerCertPath string `json:"serverCertPath"` + // ServerKeyPath is the path to the private key file. + ServerKeyPath string `json:"serverKeyPath"` +} + +// SNI contains an optional configuration for the APIServerSNI feature used +// by the Gardenlet in the seed clusters. +type SNI struct { + // Ingress is the ingressgateway configuration. + // +optional + Ingress *SNIIngress `json:"ingress,omitempty"` +} + +// SNIIngress contains configuration of the ingressgateway. +type SNIIngress struct { + // ServiceName is the name of the ingressgateway Service. + // Defaults to "istio-ingressgateway". + // +optional + ServiceName *string `json:"serviceName,omitempty"` + // Namespace is the namespace in which the ingressgateway is deployed in. + // Defaults to "istio-ingress". + // +optional + Namespace *string `json:"namespace,omitempty"` + // Labels of the ingressgateway + // Defaults to "istio: ingressgateway". + // +optional + Labels map[string]string `json:"labels,omitempty"` +} + +const ( + // GardenletDefaultLockObjectNamespace is the default lock namespace for leader election. + GardenletDefaultLockObjectNamespace = "garden" + + // GardenletDefaultLockObjectName is the default lock name for leader election. + GardenletDefaultLockObjectName = "gardenlet-leader-election" + + // DefaultBackupEntryDeletionGracePeriodHours is a constant for the default number of hours the Backup Entry should be kept after shoot is deleted. + // By default we set this to 0 so that then BackupEntryController will trigger deletion immediately. + DefaultBackupEntryDeletionGracePeriodHours = 0 + + // DefaultDiscoveryDirName is the name of the default directory used for discovering Kubernetes APIs. + DefaultDiscoveryDirName = "gardenlet-discovery" + + // DefaultDiscoveryCacheDirName is the name of the default directory used for the discovery cache. + DefaultDiscoveryCacheDirName = "cache" + + // DefaultDiscoveryHTTPCacheDirName is the name of the default directory used for the discovery HTTP cache. + DefaultDiscoveryHTTPCacheDirName = "http-cache" + + // DefaultDiscoveryTTL is the default ttl for the cached discovery client. + DefaultDiscoveryTTL = 10 * time.Second + + // DefaultLogLevel is the default log level. + DefaultLogLevel = "info" + + // DefaultKubernetesLogLevel is the default Kubernetes log level. + DefaultKubernetesLogLevel klog.Level = 0 + + // DefaultControllerConcurrentSyncs is a default value for concurrent syncs for controllers. + DefaultControllerConcurrentSyncs = 20 + + // DefaultSNIIngresNamespace is the default sni ingress namespace. + DefaultSNIIngresNamespace = "istio-ingress" + + // DefaultSNIIngresServiceName is the default sni ingress service name. + DefaultSNIIngresServiceName = "istio-ingressgateway" +) + +// DefaultControllerSyncPeriod is a default value for sync period for controllers. +var DefaultControllerSyncPeriod = metav1.Duration{Duration: time.Minute} diff --git a/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/zz_generated.conversion.go b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..4273d90e --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,1141 @@ +// +build !ignore_autogenerated + +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + unsafe "unsafe" + + core "github.com/gardener/gardener/pkg/apis/core" + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + config "github.com/gardener/gardener/pkg/gardenlet/apis/config" + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + configv1alpha1 "k8s.io/component-base/config/v1alpha1" + klog "k8s.io/klog" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*BackupBucketControllerConfiguration)(nil), (*config.BackupBucketControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_BackupBucketControllerConfiguration_To_config_BackupBucketControllerConfiguration(a.(*BackupBucketControllerConfiguration), b.(*config.BackupBucketControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.BackupBucketControllerConfiguration)(nil), (*BackupBucketControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_BackupBucketControllerConfiguration_To_v1alpha1_BackupBucketControllerConfiguration(a.(*config.BackupBucketControllerConfiguration), b.(*BackupBucketControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupEntryControllerConfiguration)(nil), (*config.BackupEntryControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_BackupEntryControllerConfiguration_To_config_BackupEntryControllerConfiguration(a.(*BackupEntryControllerConfiguration), b.(*config.BackupEntryControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.BackupEntryControllerConfiguration)(nil), (*BackupEntryControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_BackupEntryControllerConfiguration_To_v1alpha1_BackupEntryControllerConfiguration(a.(*config.BackupEntryControllerConfiguration), b.(*BackupEntryControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ConditionThreshold)(nil), (*config.ConditionThreshold)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ConditionThreshold_To_config_ConditionThreshold(a.(*ConditionThreshold), b.(*config.ConditionThreshold), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.ConditionThreshold)(nil), (*ConditionThreshold)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_ConditionThreshold_To_v1alpha1_ConditionThreshold(a.(*config.ConditionThreshold), b.(*ConditionThreshold), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerInstallationCareControllerConfiguration)(nil), (*config.ControllerInstallationCareControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ControllerInstallationCareControllerConfiguration_To_config_ControllerInstallationCareControllerConfiguration(a.(*ControllerInstallationCareControllerConfiguration), b.(*config.ControllerInstallationCareControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.ControllerInstallationCareControllerConfiguration)(nil), (*ControllerInstallationCareControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_ControllerInstallationCareControllerConfiguration_To_v1alpha1_ControllerInstallationCareControllerConfiguration(a.(*config.ControllerInstallationCareControllerConfiguration), b.(*ControllerInstallationCareControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerInstallationControllerConfiguration)(nil), (*config.ControllerInstallationControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ControllerInstallationControllerConfiguration_To_config_ControllerInstallationControllerConfiguration(a.(*ControllerInstallationControllerConfiguration), b.(*config.ControllerInstallationControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.ControllerInstallationControllerConfiguration)(nil), (*ControllerInstallationControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_ControllerInstallationControllerConfiguration_To_v1alpha1_ControllerInstallationControllerConfiguration(a.(*config.ControllerInstallationControllerConfiguration), b.(*ControllerInstallationControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerInstallationRequiredControllerConfiguration)(nil), (*config.ControllerInstallationRequiredControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ControllerInstallationRequiredControllerConfiguration_To_config_ControllerInstallationRequiredControllerConfiguration(a.(*ControllerInstallationRequiredControllerConfiguration), b.(*config.ControllerInstallationRequiredControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.ControllerInstallationRequiredControllerConfiguration)(nil), (*ControllerInstallationRequiredControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_ControllerInstallationRequiredControllerConfiguration_To_v1alpha1_ControllerInstallationRequiredControllerConfiguration(a.(*config.ControllerInstallationRequiredControllerConfiguration), b.(*ControllerInstallationRequiredControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*FluentBit)(nil), (*config.FluentBit)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_FluentBit_To_config_FluentBit(a.(*FluentBit), b.(*config.FluentBit), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.FluentBit)(nil), (*FluentBit)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_FluentBit_To_v1alpha1_FluentBit(a.(*config.FluentBit), b.(*FluentBit), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*GardenClientConnection)(nil), (*config.GardenClientConnection)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_GardenClientConnection_To_config_GardenClientConnection(a.(*GardenClientConnection), b.(*config.GardenClientConnection), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.GardenClientConnection)(nil), (*GardenClientConnection)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_GardenClientConnection_To_v1alpha1_GardenClientConnection(a.(*config.GardenClientConnection), b.(*GardenClientConnection), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*GardenletConfiguration)(nil), (*config.GardenletConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_GardenletConfiguration_To_config_GardenletConfiguration(a.(*GardenletConfiguration), b.(*config.GardenletConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.GardenletConfiguration)(nil), (*GardenletConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_GardenletConfiguration_To_v1alpha1_GardenletConfiguration(a.(*config.GardenletConfiguration), b.(*GardenletConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*GardenletControllerConfiguration)(nil), (*config.GardenletControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_GardenletControllerConfiguration_To_config_GardenletControllerConfiguration(a.(*GardenletControllerConfiguration), b.(*config.GardenletControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.GardenletControllerConfiguration)(nil), (*GardenletControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_GardenletControllerConfiguration_To_v1alpha1_GardenletControllerConfiguration(a.(*config.GardenletControllerConfiguration), b.(*GardenletControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HTTPSServer)(nil), (*config.HTTPSServer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_HTTPSServer_To_config_HTTPSServer(a.(*HTTPSServer), b.(*config.HTTPSServer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.HTTPSServer)(nil), (*HTTPSServer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_HTTPSServer_To_v1alpha1_HTTPSServer(a.(*config.HTTPSServer), b.(*HTTPSServer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LeaderElectionConfiguration)(nil), (*config.LeaderElectionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_LeaderElectionConfiguration_To_config_LeaderElectionConfiguration(a.(*LeaderElectionConfiguration), b.(*config.LeaderElectionConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.LeaderElectionConfiguration)(nil), (*LeaderElectionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(a.(*config.LeaderElectionConfiguration), b.(*LeaderElectionConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Logging)(nil), (*config.Logging)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Logging_To_config_Logging(a.(*Logging), b.(*config.Logging), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.Logging)(nil), (*Logging)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_Logging_To_v1alpha1_Logging(a.(*config.Logging), b.(*Logging), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ManagedSeedControllerConfiguration)(nil), (*config.ManagedSeedControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ManagedSeedControllerConfiguration_To_config_ManagedSeedControllerConfiguration(a.(*ManagedSeedControllerConfiguration), b.(*config.ManagedSeedControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.ManagedSeedControllerConfiguration)(nil), (*ManagedSeedControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_ManagedSeedControllerConfiguration_To_v1alpha1_ManagedSeedControllerConfiguration(a.(*config.ManagedSeedControllerConfiguration), b.(*ManagedSeedControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ResourcesConfiguration)(nil), (*config.ResourcesConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ResourcesConfiguration_To_config_ResourcesConfiguration(a.(*ResourcesConfiguration), b.(*config.ResourcesConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.ResourcesConfiguration)(nil), (*ResourcesConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_ResourcesConfiguration_To_v1alpha1_ResourcesConfiguration(a.(*config.ResourcesConfiguration), b.(*ResourcesConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SNI)(nil), (*config.SNI)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SNI_To_config_SNI(a.(*SNI), b.(*config.SNI), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.SNI)(nil), (*SNI)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_SNI_To_v1alpha1_SNI(a.(*config.SNI), b.(*SNI), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SNIIngress)(nil), (*config.SNIIngress)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SNIIngress_To_config_SNIIngress(a.(*SNIIngress), b.(*config.SNIIngress), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.SNIIngress)(nil), (*SNIIngress)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_SNIIngress_To_v1alpha1_SNIIngress(a.(*config.SNIIngress), b.(*SNIIngress), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedAPIServerNetworkPolicyControllerConfiguration)(nil), (*config.SeedAPIServerNetworkPolicyControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SeedAPIServerNetworkPolicyControllerConfiguration_To_config_SeedAPIServerNetworkPolicyControllerConfiguration(a.(*SeedAPIServerNetworkPolicyControllerConfiguration), b.(*config.SeedAPIServerNetworkPolicyControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.SeedAPIServerNetworkPolicyControllerConfiguration)(nil), (*SeedAPIServerNetworkPolicyControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_SeedAPIServerNetworkPolicyControllerConfiguration_To_v1alpha1_SeedAPIServerNetworkPolicyControllerConfiguration(a.(*config.SeedAPIServerNetworkPolicyControllerConfiguration), b.(*SeedAPIServerNetworkPolicyControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedClientConnection)(nil), (*config.SeedClientConnection)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SeedClientConnection_To_config_SeedClientConnection(a.(*SeedClientConnection), b.(*config.SeedClientConnection), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.SeedClientConnection)(nil), (*SeedClientConnection)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_SeedClientConnection_To_v1alpha1_SeedClientConnection(a.(*config.SeedClientConnection), b.(*SeedClientConnection), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedConfig)(nil), (*config.SeedConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SeedConfig_To_config_SeedConfig(a.(*SeedConfig), b.(*config.SeedConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.SeedConfig)(nil), (*SeedConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_SeedConfig_To_v1alpha1_SeedConfig(a.(*config.SeedConfig), b.(*SeedConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedControllerConfiguration)(nil), (*config.SeedControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SeedControllerConfiguration_To_config_SeedControllerConfiguration(a.(*SeedControllerConfiguration), b.(*config.SeedControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.SeedControllerConfiguration)(nil), (*SeedControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_SeedControllerConfiguration_To_v1alpha1_SeedControllerConfiguration(a.(*config.SeedControllerConfiguration), b.(*SeedControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Server)(nil), (*config.Server)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Server_To_config_Server(a.(*Server), b.(*config.Server), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.Server)(nil), (*Server)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_Server_To_v1alpha1_Server(a.(*config.Server), b.(*Server), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ServerConfiguration)(nil), (*config.ServerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ServerConfiguration_To_config_ServerConfiguration(a.(*ServerConfiguration), b.(*config.ServerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.ServerConfiguration)(nil), (*ServerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_ServerConfiguration_To_v1alpha1_ServerConfiguration(a.(*config.ServerConfiguration), b.(*ServerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootCareControllerConfiguration)(nil), (*config.ShootCareControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ShootCareControllerConfiguration_To_config_ShootCareControllerConfiguration(a.(*ShootCareControllerConfiguration), b.(*config.ShootCareControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.ShootCareControllerConfiguration)(nil), (*ShootCareControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_ShootCareControllerConfiguration_To_v1alpha1_ShootCareControllerConfiguration(a.(*config.ShootCareControllerConfiguration), b.(*ShootCareControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootClientConnection)(nil), (*config.ShootClientConnection)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ShootClientConnection_To_config_ShootClientConnection(a.(*ShootClientConnection), b.(*config.ShootClientConnection), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.ShootClientConnection)(nil), (*ShootClientConnection)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_ShootClientConnection_To_v1alpha1_ShootClientConnection(a.(*config.ShootClientConnection), b.(*ShootClientConnection), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootControllerConfiguration)(nil), (*config.ShootControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ShootControllerConfiguration_To_config_ShootControllerConfiguration(a.(*ShootControllerConfiguration), b.(*config.ShootControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.ShootControllerConfiguration)(nil), (*ShootControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_ShootControllerConfiguration_To_v1alpha1_ShootControllerConfiguration(a.(*config.ShootControllerConfiguration), b.(*ShootControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootStateSyncControllerConfiguration)(nil), (*config.ShootStateSyncControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ShootStateSyncControllerConfiguration_To_config_ShootStateSyncControllerConfiguration(a.(*ShootStateSyncControllerConfiguration), b.(*config.ShootStateSyncControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.ShootStateSyncControllerConfiguration)(nil), (*ShootStateSyncControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_ShootStateSyncControllerConfiguration_To_v1alpha1_ShootStateSyncControllerConfiguration(a.(*config.ShootStateSyncControllerConfiguration), b.(*ShootStateSyncControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*StaleExtensionHealthChecks)(nil), (*config.StaleExtensionHealthChecks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_StaleExtensionHealthChecks_To_config_StaleExtensionHealthChecks(a.(*StaleExtensionHealthChecks), b.(*config.StaleExtensionHealthChecks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.StaleExtensionHealthChecks)(nil), (*StaleExtensionHealthChecks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_StaleExtensionHealthChecks_To_v1alpha1_StaleExtensionHealthChecks(a.(*config.StaleExtensionHealthChecks), b.(*StaleExtensionHealthChecks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TLSServer)(nil), (*config.TLSServer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_TLSServer_To_config_TLSServer(a.(*TLSServer), b.(*config.TLSServer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.TLSServer)(nil), (*TLSServer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_TLSServer_To_v1alpha1_TLSServer(a.(*config.TLSServer), b.(*TLSServer), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*core.SeedTemplate)(nil), (*v1beta1.SeedTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_SeedTemplate_To_v1beta1_SeedTemplate(a.(*core.SeedTemplate), b.(*v1beta1.SeedTemplate), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1beta1.SeedTemplate)(nil), (*core.SeedTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedTemplate_To_core_SeedTemplate(a.(*v1beta1.SeedTemplate), b.(*core.SeedTemplate), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_BackupBucketControllerConfiguration_To_config_BackupBucketControllerConfiguration(in *BackupBucketControllerConfiguration, out *config.BackupBucketControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + return nil +} + +// Convert_v1alpha1_BackupBucketControllerConfiguration_To_config_BackupBucketControllerConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_BackupBucketControllerConfiguration_To_config_BackupBucketControllerConfiguration(in *BackupBucketControllerConfiguration, out *config.BackupBucketControllerConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_BackupBucketControllerConfiguration_To_config_BackupBucketControllerConfiguration(in, out, s) +} + +func autoConvert_config_BackupBucketControllerConfiguration_To_v1alpha1_BackupBucketControllerConfiguration(in *config.BackupBucketControllerConfiguration, out *BackupBucketControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + return nil +} + +// Convert_config_BackupBucketControllerConfiguration_To_v1alpha1_BackupBucketControllerConfiguration is an autogenerated conversion function. +func Convert_config_BackupBucketControllerConfiguration_To_v1alpha1_BackupBucketControllerConfiguration(in *config.BackupBucketControllerConfiguration, out *BackupBucketControllerConfiguration, s conversion.Scope) error { + return autoConvert_config_BackupBucketControllerConfiguration_To_v1alpha1_BackupBucketControllerConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_BackupEntryControllerConfiguration_To_config_BackupEntryControllerConfiguration(in *BackupEntryControllerConfiguration, out *config.BackupEntryControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + out.DeletionGracePeriodHours = (*int)(unsafe.Pointer(in.DeletionGracePeriodHours)) + out.DeletionGracePeriodShootPurposes = *(*[]core.ShootPurpose)(unsafe.Pointer(&in.DeletionGracePeriodShootPurposes)) + return nil +} + +// Convert_v1alpha1_BackupEntryControllerConfiguration_To_config_BackupEntryControllerConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_BackupEntryControllerConfiguration_To_config_BackupEntryControllerConfiguration(in *BackupEntryControllerConfiguration, out *config.BackupEntryControllerConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_BackupEntryControllerConfiguration_To_config_BackupEntryControllerConfiguration(in, out, s) +} + +func autoConvert_config_BackupEntryControllerConfiguration_To_v1alpha1_BackupEntryControllerConfiguration(in *config.BackupEntryControllerConfiguration, out *BackupEntryControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + out.DeletionGracePeriodHours = (*int)(unsafe.Pointer(in.DeletionGracePeriodHours)) + out.DeletionGracePeriodShootPurposes = *(*[]v1beta1.ShootPurpose)(unsafe.Pointer(&in.DeletionGracePeriodShootPurposes)) + return nil +} + +// Convert_config_BackupEntryControllerConfiguration_To_v1alpha1_BackupEntryControllerConfiguration is an autogenerated conversion function. +func Convert_config_BackupEntryControllerConfiguration_To_v1alpha1_BackupEntryControllerConfiguration(in *config.BackupEntryControllerConfiguration, out *BackupEntryControllerConfiguration, s conversion.Scope) error { + return autoConvert_config_BackupEntryControllerConfiguration_To_v1alpha1_BackupEntryControllerConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_ConditionThreshold_To_config_ConditionThreshold(in *ConditionThreshold, out *config.ConditionThreshold, s conversion.Scope) error { + out.Type = in.Type + out.Duration = in.Duration + return nil +} + +// Convert_v1alpha1_ConditionThreshold_To_config_ConditionThreshold is an autogenerated conversion function. +func Convert_v1alpha1_ConditionThreshold_To_config_ConditionThreshold(in *ConditionThreshold, out *config.ConditionThreshold, s conversion.Scope) error { + return autoConvert_v1alpha1_ConditionThreshold_To_config_ConditionThreshold(in, out, s) +} + +func autoConvert_config_ConditionThreshold_To_v1alpha1_ConditionThreshold(in *config.ConditionThreshold, out *ConditionThreshold, s conversion.Scope) error { + out.Type = in.Type + out.Duration = in.Duration + return nil +} + +// Convert_config_ConditionThreshold_To_v1alpha1_ConditionThreshold is an autogenerated conversion function. +func Convert_config_ConditionThreshold_To_v1alpha1_ConditionThreshold(in *config.ConditionThreshold, out *ConditionThreshold, s conversion.Scope) error { + return autoConvert_config_ConditionThreshold_To_v1alpha1_ConditionThreshold(in, out, s) +} + +func autoConvert_v1alpha1_ControllerInstallationCareControllerConfiguration_To_config_ControllerInstallationCareControllerConfiguration(in *ControllerInstallationCareControllerConfiguration, out *config.ControllerInstallationCareControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + out.SyncPeriod = (*v1.Duration)(unsafe.Pointer(in.SyncPeriod)) + return nil +} + +// Convert_v1alpha1_ControllerInstallationCareControllerConfiguration_To_config_ControllerInstallationCareControllerConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_ControllerInstallationCareControllerConfiguration_To_config_ControllerInstallationCareControllerConfiguration(in *ControllerInstallationCareControllerConfiguration, out *config.ControllerInstallationCareControllerConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_ControllerInstallationCareControllerConfiguration_To_config_ControllerInstallationCareControllerConfiguration(in, out, s) +} + +func autoConvert_config_ControllerInstallationCareControllerConfiguration_To_v1alpha1_ControllerInstallationCareControllerConfiguration(in *config.ControllerInstallationCareControllerConfiguration, out *ControllerInstallationCareControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + out.SyncPeriod = (*v1.Duration)(unsafe.Pointer(in.SyncPeriod)) + return nil +} + +// Convert_config_ControllerInstallationCareControllerConfiguration_To_v1alpha1_ControllerInstallationCareControllerConfiguration is an autogenerated conversion function. +func Convert_config_ControllerInstallationCareControllerConfiguration_To_v1alpha1_ControllerInstallationCareControllerConfiguration(in *config.ControllerInstallationCareControllerConfiguration, out *ControllerInstallationCareControllerConfiguration, s conversion.Scope) error { + return autoConvert_config_ControllerInstallationCareControllerConfiguration_To_v1alpha1_ControllerInstallationCareControllerConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_ControllerInstallationControllerConfiguration_To_config_ControllerInstallationControllerConfiguration(in *ControllerInstallationControllerConfiguration, out *config.ControllerInstallationControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + return nil +} + +// Convert_v1alpha1_ControllerInstallationControllerConfiguration_To_config_ControllerInstallationControllerConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_ControllerInstallationControllerConfiguration_To_config_ControllerInstallationControllerConfiguration(in *ControllerInstallationControllerConfiguration, out *config.ControllerInstallationControllerConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_ControllerInstallationControllerConfiguration_To_config_ControllerInstallationControllerConfiguration(in, out, s) +} + +func autoConvert_config_ControllerInstallationControllerConfiguration_To_v1alpha1_ControllerInstallationControllerConfiguration(in *config.ControllerInstallationControllerConfiguration, out *ControllerInstallationControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + return nil +} + +// Convert_config_ControllerInstallationControllerConfiguration_To_v1alpha1_ControllerInstallationControllerConfiguration is an autogenerated conversion function. +func Convert_config_ControllerInstallationControllerConfiguration_To_v1alpha1_ControllerInstallationControllerConfiguration(in *config.ControllerInstallationControllerConfiguration, out *ControllerInstallationControllerConfiguration, s conversion.Scope) error { + return autoConvert_config_ControllerInstallationControllerConfiguration_To_v1alpha1_ControllerInstallationControllerConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_ControllerInstallationRequiredControllerConfiguration_To_config_ControllerInstallationRequiredControllerConfiguration(in *ControllerInstallationRequiredControllerConfiguration, out *config.ControllerInstallationRequiredControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + return nil +} + +// Convert_v1alpha1_ControllerInstallationRequiredControllerConfiguration_To_config_ControllerInstallationRequiredControllerConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_ControllerInstallationRequiredControllerConfiguration_To_config_ControllerInstallationRequiredControllerConfiguration(in *ControllerInstallationRequiredControllerConfiguration, out *config.ControllerInstallationRequiredControllerConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_ControllerInstallationRequiredControllerConfiguration_To_config_ControllerInstallationRequiredControllerConfiguration(in, out, s) +} + +func autoConvert_config_ControllerInstallationRequiredControllerConfiguration_To_v1alpha1_ControllerInstallationRequiredControllerConfiguration(in *config.ControllerInstallationRequiredControllerConfiguration, out *ControllerInstallationRequiredControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + return nil +} + +// Convert_config_ControllerInstallationRequiredControllerConfiguration_To_v1alpha1_ControllerInstallationRequiredControllerConfiguration is an autogenerated conversion function. +func Convert_config_ControllerInstallationRequiredControllerConfiguration_To_v1alpha1_ControllerInstallationRequiredControllerConfiguration(in *config.ControllerInstallationRequiredControllerConfiguration, out *ControllerInstallationRequiredControllerConfiguration, s conversion.Scope) error { + return autoConvert_config_ControllerInstallationRequiredControllerConfiguration_To_v1alpha1_ControllerInstallationRequiredControllerConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_FluentBit_To_config_FluentBit(in *FluentBit, out *config.FluentBit, s conversion.Scope) error { + out.ServiceSection = (*string)(unsafe.Pointer(in.ServiceSection)) + out.InputSection = (*string)(unsafe.Pointer(in.InputSection)) + out.OutputSection = (*string)(unsafe.Pointer(in.OutputSection)) + return nil +} + +// Convert_v1alpha1_FluentBit_To_config_FluentBit is an autogenerated conversion function. +func Convert_v1alpha1_FluentBit_To_config_FluentBit(in *FluentBit, out *config.FluentBit, s conversion.Scope) error { + return autoConvert_v1alpha1_FluentBit_To_config_FluentBit(in, out, s) +} + +func autoConvert_config_FluentBit_To_v1alpha1_FluentBit(in *config.FluentBit, out *FluentBit, s conversion.Scope) error { + out.ServiceSection = (*string)(unsafe.Pointer(in.ServiceSection)) + out.InputSection = (*string)(unsafe.Pointer(in.InputSection)) + out.OutputSection = (*string)(unsafe.Pointer(in.OutputSection)) + return nil +} + +// Convert_config_FluentBit_To_v1alpha1_FluentBit is an autogenerated conversion function. +func Convert_config_FluentBit_To_v1alpha1_FluentBit(in *config.FluentBit, out *FluentBit, s conversion.Scope) error { + return autoConvert_config_FluentBit_To_v1alpha1_FluentBit(in, out, s) +} + +func autoConvert_v1alpha1_GardenClientConnection_To_config_GardenClientConnection(in *GardenClientConnection, out *config.GardenClientConnection, s conversion.Scope) error { + if err := configv1alpha1.Convert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(&in.ClientConnectionConfiguration, &out.ClientConnectionConfiguration, s); err != nil { + return err + } + out.GardenClusterAddress = (*string)(unsafe.Pointer(in.GardenClusterAddress)) + out.GardenClusterCACert = *(*[]byte)(unsafe.Pointer(&in.GardenClusterCACert)) + out.BootstrapKubeconfig = (*corev1.SecretReference)(unsafe.Pointer(in.BootstrapKubeconfig)) + out.KubeconfigSecret = (*corev1.SecretReference)(unsafe.Pointer(in.KubeconfigSecret)) + return nil +} + +// Convert_v1alpha1_GardenClientConnection_To_config_GardenClientConnection is an autogenerated conversion function. +func Convert_v1alpha1_GardenClientConnection_To_config_GardenClientConnection(in *GardenClientConnection, out *config.GardenClientConnection, s conversion.Scope) error { + return autoConvert_v1alpha1_GardenClientConnection_To_config_GardenClientConnection(in, out, s) +} + +func autoConvert_config_GardenClientConnection_To_v1alpha1_GardenClientConnection(in *config.GardenClientConnection, out *GardenClientConnection, s conversion.Scope) error { + if err := configv1alpha1.Convert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(&in.ClientConnectionConfiguration, &out.ClientConnectionConfiguration, s); err != nil { + return err + } + out.GardenClusterAddress = (*string)(unsafe.Pointer(in.GardenClusterAddress)) + out.GardenClusterCACert = *(*[]byte)(unsafe.Pointer(&in.GardenClusterCACert)) + out.BootstrapKubeconfig = (*corev1.SecretReference)(unsafe.Pointer(in.BootstrapKubeconfig)) + out.KubeconfigSecret = (*corev1.SecretReference)(unsafe.Pointer(in.KubeconfigSecret)) + return nil +} + +// Convert_config_GardenClientConnection_To_v1alpha1_GardenClientConnection is an autogenerated conversion function. +func Convert_config_GardenClientConnection_To_v1alpha1_GardenClientConnection(in *config.GardenClientConnection, out *GardenClientConnection, s conversion.Scope) error { + return autoConvert_config_GardenClientConnection_To_v1alpha1_GardenClientConnection(in, out, s) +} + +func autoConvert_v1alpha1_GardenletConfiguration_To_config_GardenletConfiguration(in *GardenletConfiguration, out *config.GardenletConfiguration, s conversion.Scope) error { + if in.GardenClientConnection != nil { + in, out := &in.GardenClientConnection, &out.GardenClientConnection + *out = new(config.GardenClientConnection) + if err := Convert_v1alpha1_GardenClientConnection_To_config_GardenClientConnection(*in, *out, s); err != nil { + return err + } + } else { + out.GardenClientConnection = nil + } + if in.SeedClientConnection != nil { + in, out := &in.SeedClientConnection, &out.SeedClientConnection + *out = new(config.SeedClientConnection) + if err := Convert_v1alpha1_SeedClientConnection_To_config_SeedClientConnection(*in, *out, s); err != nil { + return err + } + } else { + out.SeedClientConnection = nil + } + if in.ShootClientConnection != nil { + in, out := &in.ShootClientConnection, &out.ShootClientConnection + *out = new(config.ShootClientConnection) + if err := Convert_v1alpha1_ShootClientConnection_To_config_ShootClientConnection(*in, *out, s); err != nil { + return err + } + } else { + out.ShootClientConnection = nil + } + out.Controllers = (*config.GardenletControllerConfiguration)(unsafe.Pointer(in.Controllers)) + out.Resources = (*config.ResourcesConfiguration)(unsafe.Pointer(in.Resources)) + if in.LeaderElection != nil { + in, out := &in.LeaderElection, &out.LeaderElection + *out = new(config.LeaderElectionConfiguration) + if err := Convert_v1alpha1_LeaderElectionConfiguration_To_config_LeaderElectionConfiguration(*in, *out, s); err != nil { + return err + } + } else { + out.LeaderElection = nil + } + out.LogLevel = (*string)(unsafe.Pointer(in.LogLevel)) + out.KubernetesLogLevel = (*klog.Level)(unsafe.Pointer(in.KubernetesLogLevel)) + out.Server = (*config.ServerConfiguration)(unsafe.Pointer(in.Server)) + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + if in.SeedConfig != nil { + in, out := &in.SeedConfig, &out.SeedConfig + *out = new(config.SeedConfig) + if err := Convert_v1alpha1_SeedConfig_To_config_SeedConfig(*in, *out, s); err != nil { + return err + } + } else { + out.SeedConfig = nil + } + out.SeedSelector = (*v1.LabelSelector)(unsafe.Pointer(in.SeedSelector)) + out.Logging = (*config.Logging)(unsafe.Pointer(in.Logging)) + out.SNI = (*config.SNI)(unsafe.Pointer(in.SNI)) + return nil +} + +// Convert_v1alpha1_GardenletConfiguration_To_config_GardenletConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_GardenletConfiguration_To_config_GardenletConfiguration(in *GardenletConfiguration, out *config.GardenletConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_GardenletConfiguration_To_config_GardenletConfiguration(in, out, s) +} + +func autoConvert_config_GardenletConfiguration_To_v1alpha1_GardenletConfiguration(in *config.GardenletConfiguration, out *GardenletConfiguration, s conversion.Scope) error { + if in.GardenClientConnection != nil { + in, out := &in.GardenClientConnection, &out.GardenClientConnection + *out = new(GardenClientConnection) + if err := Convert_config_GardenClientConnection_To_v1alpha1_GardenClientConnection(*in, *out, s); err != nil { + return err + } + } else { + out.GardenClientConnection = nil + } + if in.SeedClientConnection != nil { + in, out := &in.SeedClientConnection, &out.SeedClientConnection + *out = new(SeedClientConnection) + if err := Convert_config_SeedClientConnection_To_v1alpha1_SeedClientConnection(*in, *out, s); err != nil { + return err + } + } else { + out.SeedClientConnection = nil + } + if in.ShootClientConnection != nil { + in, out := &in.ShootClientConnection, &out.ShootClientConnection + *out = new(ShootClientConnection) + if err := Convert_config_ShootClientConnection_To_v1alpha1_ShootClientConnection(*in, *out, s); err != nil { + return err + } + } else { + out.ShootClientConnection = nil + } + out.Controllers = (*GardenletControllerConfiguration)(unsafe.Pointer(in.Controllers)) + out.Resources = (*ResourcesConfiguration)(unsafe.Pointer(in.Resources)) + if in.LeaderElection != nil { + in, out := &in.LeaderElection, &out.LeaderElection + *out = new(LeaderElectionConfiguration) + if err := Convert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(*in, *out, s); err != nil { + return err + } + } else { + out.LeaderElection = nil + } + out.LogLevel = (*string)(unsafe.Pointer(in.LogLevel)) + out.KubernetesLogLevel = (*klog.Level)(unsafe.Pointer(in.KubernetesLogLevel)) + out.Server = (*ServerConfiguration)(unsafe.Pointer(in.Server)) + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + if in.SeedConfig != nil { + in, out := &in.SeedConfig, &out.SeedConfig + *out = new(SeedConfig) + if err := Convert_config_SeedConfig_To_v1alpha1_SeedConfig(*in, *out, s); err != nil { + return err + } + } else { + out.SeedConfig = nil + } + out.SeedSelector = (*v1.LabelSelector)(unsafe.Pointer(in.SeedSelector)) + out.Logging = (*Logging)(unsafe.Pointer(in.Logging)) + out.SNI = (*SNI)(unsafe.Pointer(in.SNI)) + return nil +} + +// Convert_config_GardenletConfiguration_To_v1alpha1_GardenletConfiguration is an autogenerated conversion function. +func Convert_config_GardenletConfiguration_To_v1alpha1_GardenletConfiguration(in *config.GardenletConfiguration, out *GardenletConfiguration, s conversion.Scope) error { + return autoConvert_config_GardenletConfiguration_To_v1alpha1_GardenletConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_GardenletControllerConfiguration_To_config_GardenletControllerConfiguration(in *GardenletControllerConfiguration, out *config.GardenletControllerConfiguration, s conversion.Scope) error { + out.BackupBucket = (*config.BackupBucketControllerConfiguration)(unsafe.Pointer(in.BackupBucket)) + out.BackupEntry = (*config.BackupEntryControllerConfiguration)(unsafe.Pointer(in.BackupEntry)) + out.ControllerInstallation = (*config.ControllerInstallationControllerConfiguration)(unsafe.Pointer(in.ControllerInstallation)) + out.ControllerInstallationCare = (*config.ControllerInstallationCareControllerConfiguration)(unsafe.Pointer(in.ControllerInstallationCare)) + out.ControllerInstallationRequired = (*config.ControllerInstallationRequiredControllerConfiguration)(unsafe.Pointer(in.ControllerInstallationRequired)) + out.Seed = (*config.SeedControllerConfiguration)(unsafe.Pointer(in.Seed)) + out.Shoot = (*config.ShootControllerConfiguration)(unsafe.Pointer(in.Shoot)) + out.ShootCare = (*config.ShootCareControllerConfiguration)(unsafe.Pointer(in.ShootCare)) + out.ShootStateSync = (*config.ShootStateSyncControllerConfiguration)(unsafe.Pointer(in.ShootStateSync)) + out.SeedAPIServerNetworkPolicy = (*config.SeedAPIServerNetworkPolicyControllerConfiguration)(unsafe.Pointer(in.SeedAPIServerNetworkPolicy)) + out.ManagedSeed = (*config.ManagedSeedControllerConfiguration)(unsafe.Pointer(in.ManagedSeed)) + return nil +} + +// Convert_v1alpha1_GardenletControllerConfiguration_To_config_GardenletControllerConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_GardenletControllerConfiguration_To_config_GardenletControllerConfiguration(in *GardenletControllerConfiguration, out *config.GardenletControllerConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_GardenletControllerConfiguration_To_config_GardenletControllerConfiguration(in, out, s) +} + +func autoConvert_config_GardenletControllerConfiguration_To_v1alpha1_GardenletControllerConfiguration(in *config.GardenletControllerConfiguration, out *GardenletControllerConfiguration, s conversion.Scope) error { + out.BackupBucket = (*BackupBucketControllerConfiguration)(unsafe.Pointer(in.BackupBucket)) + out.BackupEntry = (*BackupEntryControllerConfiguration)(unsafe.Pointer(in.BackupEntry)) + out.ControllerInstallation = (*ControllerInstallationControllerConfiguration)(unsafe.Pointer(in.ControllerInstallation)) + out.ControllerInstallationCare = (*ControllerInstallationCareControllerConfiguration)(unsafe.Pointer(in.ControllerInstallationCare)) + out.ControllerInstallationRequired = (*ControllerInstallationRequiredControllerConfiguration)(unsafe.Pointer(in.ControllerInstallationRequired)) + out.Seed = (*SeedControllerConfiguration)(unsafe.Pointer(in.Seed)) + out.Shoot = (*ShootControllerConfiguration)(unsafe.Pointer(in.Shoot)) + out.ShootCare = (*ShootCareControllerConfiguration)(unsafe.Pointer(in.ShootCare)) + out.ShootStateSync = (*ShootStateSyncControllerConfiguration)(unsafe.Pointer(in.ShootStateSync)) + out.SeedAPIServerNetworkPolicy = (*SeedAPIServerNetworkPolicyControllerConfiguration)(unsafe.Pointer(in.SeedAPIServerNetworkPolicy)) + out.ManagedSeed = (*ManagedSeedControllerConfiguration)(unsafe.Pointer(in.ManagedSeed)) + return nil +} + +// Convert_config_GardenletControllerConfiguration_To_v1alpha1_GardenletControllerConfiguration is an autogenerated conversion function. +func Convert_config_GardenletControllerConfiguration_To_v1alpha1_GardenletControllerConfiguration(in *config.GardenletControllerConfiguration, out *GardenletControllerConfiguration, s conversion.Scope) error { + return autoConvert_config_GardenletControllerConfiguration_To_v1alpha1_GardenletControllerConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_HTTPSServer_To_config_HTTPSServer(in *HTTPSServer, out *config.HTTPSServer, s conversion.Scope) error { + if err := Convert_v1alpha1_Server_To_config_Server(&in.Server, &out.Server, s); err != nil { + return err + } + out.TLS = (*config.TLSServer)(unsafe.Pointer(in.TLS)) + return nil +} + +// Convert_v1alpha1_HTTPSServer_To_config_HTTPSServer is an autogenerated conversion function. +func Convert_v1alpha1_HTTPSServer_To_config_HTTPSServer(in *HTTPSServer, out *config.HTTPSServer, s conversion.Scope) error { + return autoConvert_v1alpha1_HTTPSServer_To_config_HTTPSServer(in, out, s) +} + +func autoConvert_config_HTTPSServer_To_v1alpha1_HTTPSServer(in *config.HTTPSServer, out *HTTPSServer, s conversion.Scope) error { + if err := Convert_config_Server_To_v1alpha1_Server(&in.Server, &out.Server, s); err != nil { + return err + } + out.TLS = (*TLSServer)(unsafe.Pointer(in.TLS)) + return nil +} + +// Convert_config_HTTPSServer_To_v1alpha1_HTTPSServer is an autogenerated conversion function. +func Convert_config_HTTPSServer_To_v1alpha1_HTTPSServer(in *config.HTTPSServer, out *HTTPSServer, s conversion.Scope) error { + return autoConvert_config_HTTPSServer_To_v1alpha1_HTTPSServer(in, out, s) +} + +func autoConvert_v1alpha1_LeaderElectionConfiguration_To_config_LeaderElectionConfiguration(in *LeaderElectionConfiguration, out *config.LeaderElectionConfiguration, s conversion.Scope) error { + if err := configv1alpha1.Convert_v1alpha1_LeaderElectionConfiguration_To_config_LeaderElectionConfiguration(&in.LeaderElectionConfiguration, &out.LeaderElectionConfiguration, s); err != nil { + return err + } + out.LockObjectNamespace = (*string)(unsafe.Pointer(in.LockObjectNamespace)) + out.LockObjectName = (*string)(unsafe.Pointer(in.LockObjectName)) + return nil +} + +// Convert_v1alpha1_LeaderElectionConfiguration_To_config_LeaderElectionConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_LeaderElectionConfiguration_To_config_LeaderElectionConfiguration(in *LeaderElectionConfiguration, out *config.LeaderElectionConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_LeaderElectionConfiguration_To_config_LeaderElectionConfiguration(in, out, s) +} + +func autoConvert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in *config.LeaderElectionConfiguration, out *LeaderElectionConfiguration, s conversion.Scope) error { + if err := configv1alpha1.Convert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(&in.LeaderElectionConfiguration, &out.LeaderElectionConfiguration, s); err != nil { + return err + } + out.LockObjectNamespace = (*string)(unsafe.Pointer(in.LockObjectNamespace)) + out.LockObjectName = (*string)(unsafe.Pointer(in.LockObjectName)) + return nil +} + +// Convert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration is an autogenerated conversion function. +func Convert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in *config.LeaderElectionConfiguration, out *LeaderElectionConfiguration, s conversion.Scope) error { + return autoConvert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_Logging_To_config_Logging(in *Logging, out *config.Logging, s conversion.Scope) error { + out.FluentBit = (*config.FluentBit)(unsafe.Pointer(in.FluentBit)) + return nil +} + +// Convert_v1alpha1_Logging_To_config_Logging is an autogenerated conversion function. +func Convert_v1alpha1_Logging_To_config_Logging(in *Logging, out *config.Logging, s conversion.Scope) error { + return autoConvert_v1alpha1_Logging_To_config_Logging(in, out, s) +} + +func autoConvert_config_Logging_To_v1alpha1_Logging(in *config.Logging, out *Logging, s conversion.Scope) error { + out.FluentBit = (*FluentBit)(unsafe.Pointer(in.FluentBit)) + return nil +} + +// Convert_config_Logging_To_v1alpha1_Logging is an autogenerated conversion function. +func Convert_config_Logging_To_v1alpha1_Logging(in *config.Logging, out *Logging, s conversion.Scope) error { + return autoConvert_config_Logging_To_v1alpha1_Logging(in, out, s) +} + +func autoConvert_v1alpha1_ManagedSeedControllerConfiguration_To_config_ManagedSeedControllerConfiguration(in *ManagedSeedControllerConfiguration, out *config.ManagedSeedControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + out.SyncJitterPeriod = (*v1.Duration)(unsafe.Pointer(in.SyncJitterPeriod)) + return nil +} + +// Convert_v1alpha1_ManagedSeedControllerConfiguration_To_config_ManagedSeedControllerConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_ManagedSeedControllerConfiguration_To_config_ManagedSeedControllerConfiguration(in *ManagedSeedControllerConfiguration, out *config.ManagedSeedControllerConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_ManagedSeedControllerConfiguration_To_config_ManagedSeedControllerConfiguration(in, out, s) +} + +func autoConvert_config_ManagedSeedControllerConfiguration_To_v1alpha1_ManagedSeedControllerConfiguration(in *config.ManagedSeedControllerConfiguration, out *ManagedSeedControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + out.SyncJitterPeriod = (*v1.Duration)(unsafe.Pointer(in.SyncJitterPeriod)) + return nil +} + +// Convert_config_ManagedSeedControllerConfiguration_To_v1alpha1_ManagedSeedControllerConfiguration is an autogenerated conversion function. +func Convert_config_ManagedSeedControllerConfiguration_To_v1alpha1_ManagedSeedControllerConfiguration(in *config.ManagedSeedControllerConfiguration, out *ManagedSeedControllerConfiguration, s conversion.Scope) error { + return autoConvert_config_ManagedSeedControllerConfiguration_To_v1alpha1_ManagedSeedControllerConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_ResourcesConfiguration_To_config_ResourcesConfiguration(in *ResourcesConfiguration, out *config.ResourcesConfiguration, s conversion.Scope) error { + out.Capacity = *(*corev1.ResourceList)(unsafe.Pointer(&in.Capacity)) + out.Reserved = *(*corev1.ResourceList)(unsafe.Pointer(&in.Reserved)) + return nil +} + +// Convert_v1alpha1_ResourcesConfiguration_To_config_ResourcesConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_ResourcesConfiguration_To_config_ResourcesConfiguration(in *ResourcesConfiguration, out *config.ResourcesConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_ResourcesConfiguration_To_config_ResourcesConfiguration(in, out, s) +} + +func autoConvert_config_ResourcesConfiguration_To_v1alpha1_ResourcesConfiguration(in *config.ResourcesConfiguration, out *ResourcesConfiguration, s conversion.Scope) error { + out.Capacity = *(*corev1.ResourceList)(unsafe.Pointer(&in.Capacity)) + out.Reserved = *(*corev1.ResourceList)(unsafe.Pointer(&in.Reserved)) + return nil +} + +// Convert_config_ResourcesConfiguration_To_v1alpha1_ResourcesConfiguration is an autogenerated conversion function. +func Convert_config_ResourcesConfiguration_To_v1alpha1_ResourcesConfiguration(in *config.ResourcesConfiguration, out *ResourcesConfiguration, s conversion.Scope) error { + return autoConvert_config_ResourcesConfiguration_To_v1alpha1_ResourcesConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_SNI_To_config_SNI(in *SNI, out *config.SNI, s conversion.Scope) error { + out.Ingress = (*config.SNIIngress)(unsafe.Pointer(in.Ingress)) + return nil +} + +// Convert_v1alpha1_SNI_To_config_SNI is an autogenerated conversion function. +func Convert_v1alpha1_SNI_To_config_SNI(in *SNI, out *config.SNI, s conversion.Scope) error { + return autoConvert_v1alpha1_SNI_To_config_SNI(in, out, s) +} + +func autoConvert_config_SNI_To_v1alpha1_SNI(in *config.SNI, out *SNI, s conversion.Scope) error { + out.Ingress = (*SNIIngress)(unsafe.Pointer(in.Ingress)) + return nil +} + +// Convert_config_SNI_To_v1alpha1_SNI is an autogenerated conversion function. +func Convert_config_SNI_To_v1alpha1_SNI(in *config.SNI, out *SNI, s conversion.Scope) error { + return autoConvert_config_SNI_To_v1alpha1_SNI(in, out, s) +} + +func autoConvert_v1alpha1_SNIIngress_To_config_SNIIngress(in *SNIIngress, out *config.SNIIngress, s conversion.Scope) error { + out.ServiceName = (*string)(unsafe.Pointer(in.ServiceName)) + out.Namespace = (*string)(unsafe.Pointer(in.Namespace)) + out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) + return nil +} + +// Convert_v1alpha1_SNIIngress_To_config_SNIIngress is an autogenerated conversion function. +func Convert_v1alpha1_SNIIngress_To_config_SNIIngress(in *SNIIngress, out *config.SNIIngress, s conversion.Scope) error { + return autoConvert_v1alpha1_SNIIngress_To_config_SNIIngress(in, out, s) +} + +func autoConvert_config_SNIIngress_To_v1alpha1_SNIIngress(in *config.SNIIngress, out *SNIIngress, s conversion.Scope) error { + out.ServiceName = (*string)(unsafe.Pointer(in.ServiceName)) + out.Namespace = (*string)(unsafe.Pointer(in.Namespace)) + out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) + return nil +} + +// Convert_config_SNIIngress_To_v1alpha1_SNIIngress is an autogenerated conversion function. +func Convert_config_SNIIngress_To_v1alpha1_SNIIngress(in *config.SNIIngress, out *SNIIngress, s conversion.Scope) error { + return autoConvert_config_SNIIngress_To_v1alpha1_SNIIngress(in, out, s) +} + +func autoConvert_v1alpha1_SeedAPIServerNetworkPolicyControllerConfiguration_To_config_SeedAPIServerNetworkPolicyControllerConfiguration(in *SeedAPIServerNetworkPolicyControllerConfiguration, out *config.SeedAPIServerNetworkPolicyControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + return nil +} + +// Convert_v1alpha1_SeedAPIServerNetworkPolicyControllerConfiguration_To_config_SeedAPIServerNetworkPolicyControllerConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_SeedAPIServerNetworkPolicyControllerConfiguration_To_config_SeedAPIServerNetworkPolicyControllerConfiguration(in *SeedAPIServerNetworkPolicyControllerConfiguration, out *config.SeedAPIServerNetworkPolicyControllerConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_SeedAPIServerNetworkPolicyControllerConfiguration_To_config_SeedAPIServerNetworkPolicyControllerConfiguration(in, out, s) +} + +func autoConvert_config_SeedAPIServerNetworkPolicyControllerConfiguration_To_v1alpha1_SeedAPIServerNetworkPolicyControllerConfiguration(in *config.SeedAPIServerNetworkPolicyControllerConfiguration, out *SeedAPIServerNetworkPolicyControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + return nil +} + +// Convert_config_SeedAPIServerNetworkPolicyControllerConfiguration_To_v1alpha1_SeedAPIServerNetworkPolicyControllerConfiguration is an autogenerated conversion function. +func Convert_config_SeedAPIServerNetworkPolicyControllerConfiguration_To_v1alpha1_SeedAPIServerNetworkPolicyControllerConfiguration(in *config.SeedAPIServerNetworkPolicyControllerConfiguration, out *SeedAPIServerNetworkPolicyControllerConfiguration, s conversion.Scope) error { + return autoConvert_config_SeedAPIServerNetworkPolicyControllerConfiguration_To_v1alpha1_SeedAPIServerNetworkPolicyControllerConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_SeedClientConnection_To_config_SeedClientConnection(in *SeedClientConnection, out *config.SeedClientConnection, s conversion.Scope) error { + if err := configv1alpha1.Convert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(&in.ClientConnectionConfiguration, &out.ClientConnectionConfiguration, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_SeedClientConnection_To_config_SeedClientConnection is an autogenerated conversion function. +func Convert_v1alpha1_SeedClientConnection_To_config_SeedClientConnection(in *SeedClientConnection, out *config.SeedClientConnection, s conversion.Scope) error { + return autoConvert_v1alpha1_SeedClientConnection_To_config_SeedClientConnection(in, out, s) +} + +func autoConvert_config_SeedClientConnection_To_v1alpha1_SeedClientConnection(in *config.SeedClientConnection, out *SeedClientConnection, s conversion.Scope) error { + if err := configv1alpha1.Convert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(&in.ClientConnectionConfiguration, &out.ClientConnectionConfiguration, s); err != nil { + return err + } + return nil +} + +// Convert_config_SeedClientConnection_To_v1alpha1_SeedClientConnection is an autogenerated conversion function. +func Convert_config_SeedClientConnection_To_v1alpha1_SeedClientConnection(in *config.SeedClientConnection, out *SeedClientConnection, s conversion.Scope) error { + return autoConvert_config_SeedClientConnection_To_v1alpha1_SeedClientConnection(in, out, s) +} + +func autoConvert_v1alpha1_SeedConfig_To_config_SeedConfig(in *SeedConfig, out *config.SeedConfig, s conversion.Scope) error { + if err := Convert_v1beta1_SeedTemplate_To_core_SeedTemplate(&in.SeedTemplate, &out.SeedTemplate, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_SeedConfig_To_config_SeedConfig is an autogenerated conversion function. +func Convert_v1alpha1_SeedConfig_To_config_SeedConfig(in *SeedConfig, out *config.SeedConfig, s conversion.Scope) error { + return autoConvert_v1alpha1_SeedConfig_To_config_SeedConfig(in, out, s) +} + +func autoConvert_config_SeedConfig_To_v1alpha1_SeedConfig(in *config.SeedConfig, out *SeedConfig, s conversion.Scope) error { + if err := Convert_core_SeedTemplate_To_v1beta1_SeedTemplate(&in.SeedTemplate, &out.SeedTemplate, s); err != nil { + return err + } + return nil +} + +// Convert_config_SeedConfig_To_v1alpha1_SeedConfig is an autogenerated conversion function. +func Convert_config_SeedConfig_To_v1alpha1_SeedConfig(in *config.SeedConfig, out *SeedConfig, s conversion.Scope) error { + return autoConvert_config_SeedConfig_To_v1alpha1_SeedConfig(in, out, s) +} + +func autoConvert_v1alpha1_SeedControllerConfiguration_To_config_SeedControllerConfiguration(in *SeedControllerConfiguration, out *config.SeedControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + out.SyncPeriod = (*v1.Duration)(unsafe.Pointer(in.SyncPeriod)) + return nil +} + +// Convert_v1alpha1_SeedControllerConfiguration_To_config_SeedControllerConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_SeedControllerConfiguration_To_config_SeedControllerConfiguration(in *SeedControllerConfiguration, out *config.SeedControllerConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_SeedControllerConfiguration_To_config_SeedControllerConfiguration(in, out, s) +} + +func autoConvert_config_SeedControllerConfiguration_To_v1alpha1_SeedControllerConfiguration(in *config.SeedControllerConfiguration, out *SeedControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + out.SyncPeriod = (*v1.Duration)(unsafe.Pointer(in.SyncPeriod)) + return nil +} + +// Convert_config_SeedControllerConfiguration_To_v1alpha1_SeedControllerConfiguration is an autogenerated conversion function. +func Convert_config_SeedControllerConfiguration_To_v1alpha1_SeedControllerConfiguration(in *config.SeedControllerConfiguration, out *SeedControllerConfiguration, s conversion.Scope) error { + return autoConvert_config_SeedControllerConfiguration_To_v1alpha1_SeedControllerConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_Server_To_config_Server(in *Server, out *config.Server, s conversion.Scope) error { + out.BindAddress = in.BindAddress + out.Port = in.Port + return nil +} + +// Convert_v1alpha1_Server_To_config_Server is an autogenerated conversion function. +func Convert_v1alpha1_Server_To_config_Server(in *Server, out *config.Server, s conversion.Scope) error { + return autoConvert_v1alpha1_Server_To_config_Server(in, out, s) +} + +func autoConvert_config_Server_To_v1alpha1_Server(in *config.Server, out *Server, s conversion.Scope) error { + out.BindAddress = in.BindAddress + out.Port = in.Port + return nil +} + +// Convert_config_Server_To_v1alpha1_Server is an autogenerated conversion function. +func Convert_config_Server_To_v1alpha1_Server(in *config.Server, out *Server, s conversion.Scope) error { + return autoConvert_config_Server_To_v1alpha1_Server(in, out, s) +} + +func autoConvert_v1alpha1_ServerConfiguration_To_config_ServerConfiguration(in *ServerConfiguration, out *config.ServerConfiguration, s conversion.Scope) error { + if err := Convert_v1alpha1_HTTPSServer_To_config_HTTPSServer(&in.HTTPS, &out.HTTPS, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_ServerConfiguration_To_config_ServerConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_ServerConfiguration_To_config_ServerConfiguration(in *ServerConfiguration, out *config.ServerConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_ServerConfiguration_To_config_ServerConfiguration(in, out, s) +} + +func autoConvert_config_ServerConfiguration_To_v1alpha1_ServerConfiguration(in *config.ServerConfiguration, out *ServerConfiguration, s conversion.Scope) error { + if err := Convert_config_HTTPSServer_To_v1alpha1_HTTPSServer(&in.HTTPS, &out.HTTPS, s); err != nil { + return err + } + return nil +} + +// Convert_config_ServerConfiguration_To_v1alpha1_ServerConfiguration is an autogenerated conversion function. +func Convert_config_ServerConfiguration_To_v1alpha1_ServerConfiguration(in *config.ServerConfiguration, out *ServerConfiguration, s conversion.Scope) error { + return autoConvert_config_ServerConfiguration_To_v1alpha1_ServerConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_ShootCareControllerConfiguration_To_config_ShootCareControllerConfiguration(in *ShootCareControllerConfiguration, out *config.ShootCareControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + out.SyncPeriod = (*v1.Duration)(unsafe.Pointer(in.SyncPeriod)) + out.StaleExtensionHealthChecks = (*config.StaleExtensionHealthChecks)(unsafe.Pointer(in.StaleExtensionHealthChecks)) + out.ConditionThresholds = *(*[]config.ConditionThreshold)(unsafe.Pointer(&in.ConditionThresholds)) + return nil +} + +// Convert_v1alpha1_ShootCareControllerConfiguration_To_config_ShootCareControllerConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_ShootCareControllerConfiguration_To_config_ShootCareControllerConfiguration(in *ShootCareControllerConfiguration, out *config.ShootCareControllerConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_ShootCareControllerConfiguration_To_config_ShootCareControllerConfiguration(in, out, s) +} + +func autoConvert_config_ShootCareControllerConfiguration_To_v1alpha1_ShootCareControllerConfiguration(in *config.ShootCareControllerConfiguration, out *ShootCareControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + out.SyncPeriod = (*v1.Duration)(unsafe.Pointer(in.SyncPeriod)) + out.StaleExtensionHealthChecks = (*StaleExtensionHealthChecks)(unsafe.Pointer(in.StaleExtensionHealthChecks)) + out.ConditionThresholds = *(*[]ConditionThreshold)(unsafe.Pointer(&in.ConditionThresholds)) + return nil +} + +// Convert_config_ShootCareControllerConfiguration_To_v1alpha1_ShootCareControllerConfiguration is an autogenerated conversion function. +func Convert_config_ShootCareControllerConfiguration_To_v1alpha1_ShootCareControllerConfiguration(in *config.ShootCareControllerConfiguration, out *ShootCareControllerConfiguration, s conversion.Scope) error { + return autoConvert_config_ShootCareControllerConfiguration_To_v1alpha1_ShootCareControllerConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_ShootClientConnection_To_config_ShootClientConnection(in *ShootClientConnection, out *config.ShootClientConnection, s conversion.Scope) error { + if err := configv1alpha1.Convert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(&in.ClientConnectionConfiguration, &out.ClientConnectionConfiguration, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_ShootClientConnection_To_config_ShootClientConnection is an autogenerated conversion function. +func Convert_v1alpha1_ShootClientConnection_To_config_ShootClientConnection(in *ShootClientConnection, out *config.ShootClientConnection, s conversion.Scope) error { + return autoConvert_v1alpha1_ShootClientConnection_To_config_ShootClientConnection(in, out, s) +} + +func autoConvert_config_ShootClientConnection_To_v1alpha1_ShootClientConnection(in *config.ShootClientConnection, out *ShootClientConnection, s conversion.Scope) error { + if err := configv1alpha1.Convert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(&in.ClientConnectionConfiguration, &out.ClientConnectionConfiguration, s); err != nil { + return err + } + return nil +} + +// Convert_config_ShootClientConnection_To_v1alpha1_ShootClientConnection is an autogenerated conversion function. +func Convert_config_ShootClientConnection_To_v1alpha1_ShootClientConnection(in *config.ShootClientConnection, out *ShootClientConnection, s conversion.Scope) error { + return autoConvert_config_ShootClientConnection_To_v1alpha1_ShootClientConnection(in, out, s) +} + +func autoConvert_v1alpha1_ShootControllerConfiguration_To_config_ShootControllerConfiguration(in *ShootControllerConfiguration, out *config.ShootControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + out.ProgressReportPeriod = (*v1.Duration)(unsafe.Pointer(in.ProgressReportPeriod)) + out.ReconcileInMaintenanceOnly = (*bool)(unsafe.Pointer(in.ReconcileInMaintenanceOnly)) + out.RespectSyncPeriodOverwrite = (*bool)(unsafe.Pointer(in.RespectSyncPeriodOverwrite)) + out.RetryDuration = (*v1.Duration)(unsafe.Pointer(in.RetryDuration)) + out.SyncPeriod = (*v1.Duration)(unsafe.Pointer(in.SyncPeriod)) + out.DNSEntryTTLSeconds = (*int64)(unsafe.Pointer(in.DNSEntryTTLSeconds)) + return nil +} + +// Convert_v1alpha1_ShootControllerConfiguration_To_config_ShootControllerConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_ShootControllerConfiguration_To_config_ShootControllerConfiguration(in *ShootControllerConfiguration, out *config.ShootControllerConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_ShootControllerConfiguration_To_config_ShootControllerConfiguration(in, out, s) +} + +func autoConvert_config_ShootControllerConfiguration_To_v1alpha1_ShootControllerConfiguration(in *config.ShootControllerConfiguration, out *ShootControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + out.ProgressReportPeriod = (*v1.Duration)(unsafe.Pointer(in.ProgressReportPeriod)) + out.ReconcileInMaintenanceOnly = (*bool)(unsafe.Pointer(in.ReconcileInMaintenanceOnly)) + out.RespectSyncPeriodOverwrite = (*bool)(unsafe.Pointer(in.RespectSyncPeriodOverwrite)) + out.RetryDuration = (*v1.Duration)(unsafe.Pointer(in.RetryDuration)) + out.SyncPeriod = (*v1.Duration)(unsafe.Pointer(in.SyncPeriod)) + out.DNSEntryTTLSeconds = (*int64)(unsafe.Pointer(in.DNSEntryTTLSeconds)) + return nil +} + +// Convert_config_ShootControllerConfiguration_To_v1alpha1_ShootControllerConfiguration is an autogenerated conversion function. +func Convert_config_ShootControllerConfiguration_To_v1alpha1_ShootControllerConfiguration(in *config.ShootControllerConfiguration, out *ShootControllerConfiguration, s conversion.Scope) error { + return autoConvert_config_ShootControllerConfiguration_To_v1alpha1_ShootControllerConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_ShootStateSyncControllerConfiguration_To_config_ShootStateSyncControllerConfiguration(in *ShootStateSyncControllerConfiguration, out *config.ShootStateSyncControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + out.SyncPeriod = (*v1.Duration)(unsafe.Pointer(in.SyncPeriod)) + return nil +} + +// Convert_v1alpha1_ShootStateSyncControllerConfiguration_To_config_ShootStateSyncControllerConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_ShootStateSyncControllerConfiguration_To_config_ShootStateSyncControllerConfiguration(in *ShootStateSyncControllerConfiguration, out *config.ShootStateSyncControllerConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_ShootStateSyncControllerConfiguration_To_config_ShootStateSyncControllerConfiguration(in, out, s) +} + +func autoConvert_config_ShootStateSyncControllerConfiguration_To_v1alpha1_ShootStateSyncControllerConfiguration(in *config.ShootStateSyncControllerConfiguration, out *ShootStateSyncControllerConfiguration, s conversion.Scope) error { + out.ConcurrentSyncs = (*int)(unsafe.Pointer(in.ConcurrentSyncs)) + out.SyncPeriod = (*v1.Duration)(unsafe.Pointer(in.SyncPeriod)) + return nil +} + +// Convert_config_ShootStateSyncControllerConfiguration_To_v1alpha1_ShootStateSyncControllerConfiguration is an autogenerated conversion function. +func Convert_config_ShootStateSyncControllerConfiguration_To_v1alpha1_ShootStateSyncControllerConfiguration(in *config.ShootStateSyncControllerConfiguration, out *ShootStateSyncControllerConfiguration, s conversion.Scope) error { + return autoConvert_config_ShootStateSyncControllerConfiguration_To_v1alpha1_ShootStateSyncControllerConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_StaleExtensionHealthChecks_To_config_StaleExtensionHealthChecks(in *StaleExtensionHealthChecks, out *config.StaleExtensionHealthChecks, s conversion.Scope) error { + out.Enabled = in.Enabled + out.Threshold = (*v1.Duration)(unsafe.Pointer(in.Threshold)) + return nil +} + +// Convert_v1alpha1_StaleExtensionHealthChecks_To_config_StaleExtensionHealthChecks is an autogenerated conversion function. +func Convert_v1alpha1_StaleExtensionHealthChecks_To_config_StaleExtensionHealthChecks(in *StaleExtensionHealthChecks, out *config.StaleExtensionHealthChecks, s conversion.Scope) error { + return autoConvert_v1alpha1_StaleExtensionHealthChecks_To_config_StaleExtensionHealthChecks(in, out, s) +} + +func autoConvert_config_StaleExtensionHealthChecks_To_v1alpha1_StaleExtensionHealthChecks(in *config.StaleExtensionHealthChecks, out *StaleExtensionHealthChecks, s conversion.Scope) error { + out.Enabled = in.Enabled + out.Threshold = (*v1.Duration)(unsafe.Pointer(in.Threshold)) + return nil +} + +// Convert_config_StaleExtensionHealthChecks_To_v1alpha1_StaleExtensionHealthChecks is an autogenerated conversion function. +func Convert_config_StaleExtensionHealthChecks_To_v1alpha1_StaleExtensionHealthChecks(in *config.StaleExtensionHealthChecks, out *StaleExtensionHealthChecks, s conversion.Scope) error { + return autoConvert_config_StaleExtensionHealthChecks_To_v1alpha1_StaleExtensionHealthChecks(in, out, s) +} + +func autoConvert_v1alpha1_TLSServer_To_config_TLSServer(in *TLSServer, out *config.TLSServer, s conversion.Scope) error { + out.ServerCertPath = in.ServerCertPath + out.ServerKeyPath = in.ServerKeyPath + return nil +} + +// Convert_v1alpha1_TLSServer_To_config_TLSServer is an autogenerated conversion function. +func Convert_v1alpha1_TLSServer_To_config_TLSServer(in *TLSServer, out *config.TLSServer, s conversion.Scope) error { + return autoConvert_v1alpha1_TLSServer_To_config_TLSServer(in, out, s) +} + +func autoConvert_config_TLSServer_To_v1alpha1_TLSServer(in *config.TLSServer, out *TLSServer, s conversion.Scope) error { + out.ServerCertPath = in.ServerCertPath + out.ServerKeyPath = in.ServerKeyPath + return nil +} + +// Convert_config_TLSServer_To_v1alpha1_TLSServer is an autogenerated conversion function. +func Convert_config_TLSServer_To_v1alpha1_TLSServer(in *config.TLSServer, out *TLSServer, s conversion.Scope) error { + return autoConvert_config_TLSServer_To_v1alpha1_TLSServer(in, out, s) +} diff --git a/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000..73b8a9f5 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,863 @@ +// +build !ignore_autogenerated + +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + klog "k8s.io/klog" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupBucketControllerConfiguration) DeepCopyInto(out *BackupBucketControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupBucketControllerConfiguration. +func (in *BackupBucketControllerConfiguration) DeepCopy() *BackupBucketControllerConfiguration { + if in == nil { + return nil + } + out := new(BackupBucketControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupEntryControllerConfiguration) DeepCopyInto(out *BackupEntryControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + if in.DeletionGracePeriodHours != nil { + in, out := &in.DeletionGracePeriodHours, &out.DeletionGracePeriodHours + *out = new(int) + **out = **in + } + if in.DeletionGracePeriodShootPurposes != nil { + in, out := &in.DeletionGracePeriodShootPurposes, &out.DeletionGracePeriodShootPurposes + *out = make([]v1beta1.ShootPurpose, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupEntryControllerConfiguration. +func (in *BackupEntryControllerConfiguration) DeepCopy() *BackupEntryControllerConfiguration { + if in == nil { + return nil + } + out := new(BackupEntryControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConditionThreshold) DeepCopyInto(out *ConditionThreshold) { + *out = *in + out.Duration = in.Duration + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionThreshold. +func (in *ConditionThreshold) DeepCopy() *ConditionThreshold { + if in == nil { + return nil + } + out := new(ConditionThreshold) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerInstallationCareControllerConfiguration) DeepCopyInto(out *ControllerInstallationCareControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + if in.SyncPeriod != nil { + in, out := &in.SyncPeriod, &out.SyncPeriod + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerInstallationCareControllerConfiguration. +func (in *ControllerInstallationCareControllerConfiguration) DeepCopy() *ControllerInstallationCareControllerConfiguration { + if in == nil { + return nil + } + out := new(ControllerInstallationCareControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerInstallationControllerConfiguration) DeepCopyInto(out *ControllerInstallationControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerInstallationControllerConfiguration. +func (in *ControllerInstallationControllerConfiguration) DeepCopy() *ControllerInstallationControllerConfiguration { + if in == nil { + return nil + } + out := new(ControllerInstallationControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerInstallationRequiredControllerConfiguration) DeepCopyInto(out *ControllerInstallationRequiredControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerInstallationRequiredControllerConfiguration. +func (in *ControllerInstallationRequiredControllerConfiguration) DeepCopy() *ControllerInstallationRequiredControllerConfiguration { + if in == nil { + return nil + } + out := new(ControllerInstallationRequiredControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FluentBit) DeepCopyInto(out *FluentBit) { + *out = *in + if in.ServiceSection != nil { + in, out := &in.ServiceSection, &out.ServiceSection + *out = new(string) + **out = **in + } + if in.InputSection != nil { + in, out := &in.InputSection, &out.InputSection + *out = new(string) + **out = **in + } + if in.OutputSection != nil { + in, out := &in.OutputSection, &out.OutputSection + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FluentBit. +func (in *FluentBit) DeepCopy() *FluentBit { + if in == nil { + return nil + } + out := new(FluentBit) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GardenClientConnection) DeepCopyInto(out *GardenClientConnection) { + *out = *in + out.ClientConnectionConfiguration = in.ClientConnectionConfiguration + if in.GardenClusterAddress != nil { + in, out := &in.GardenClusterAddress, &out.GardenClusterAddress + *out = new(string) + **out = **in + } + if in.GardenClusterCACert != nil { + in, out := &in.GardenClusterCACert, &out.GardenClusterCACert + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.BootstrapKubeconfig != nil { + in, out := &in.BootstrapKubeconfig, &out.BootstrapKubeconfig + *out = new(corev1.SecretReference) + **out = **in + } + if in.KubeconfigSecret != nil { + in, out := &in.KubeconfigSecret, &out.KubeconfigSecret + *out = new(corev1.SecretReference) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GardenClientConnection. +func (in *GardenClientConnection) DeepCopy() *GardenClientConnection { + if in == nil { + return nil + } + out := new(GardenClientConnection) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GardenletConfiguration) DeepCopyInto(out *GardenletConfiguration) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.GardenClientConnection != nil { + in, out := &in.GardenClientConnection, &out.GardenClientConnection + *out = new(GardenClientConnection) + (*in).DeepCopyInto(*out) + } + if in.SeedClientConnection != nil { + in, out := &in.SeedClientConnection, &out.SeedClientConnection + *out = new(SeedClientConnection) + **out = **in + } + if in.ShootClientConnection != nil { + in, out := &in.ShootClientConnection, &out.ShootClientConnection + *out = new(ShootClientConnection) + **out = **in + } + if in.Controllers != nil { + in, out := &in.Controllers, &out.Controllers + *out = new(GardenletControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = new(ResourcesConfiguration) + (*in).DeepCopyInto(*out) + } + if in.LeaderElection != nil { + in, out := &in.LeaderElection, &out.LeaderElection + *out = new(LeaderElectionConfiguration) + (*in).DeepCopyInto(*out) + } + if in.LogLevel != nil { + in, out := &in.LogLevel, &out.LogLevel + *out = new(string) + **out = **in + } + if in.KubernetesLogLevel != nil { + in, out := &in.KubernetesLogLevel, &out.KubernetesLogLevel + *out = new(klog.Level) + **out = **in + } + if in.Server != nil { + in, out := &in.Server, &out.Server + *out = new(ServerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.FeatureGates != nil { + in, out := &in.FeatureGates, &out.FeatureGates + *out = make(map[string]bool, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SeedConfig != nil { + in, out := &in.SeedConfig, &out.SeedConfig + *out = new(SeedConfig) + (*in).DeepCopyInto(*out) + } + if in.SeedSelector != nil { + in, out := &in.SeedSelector, &out.SeedSelector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.Logging != nil { + in, out := &in.Logging, &out.Logging + *out = new(Logging) + (*in).DeepCopyInto(*out) + } + if in.SNI != nil { + in, out := &in.SNI, &out.SNI + *out = new(SNI) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GardenletConfiguration. +func (in *GardenletConfiguration) DeepCopy() *GardenletConfiguration { + if in == nil { + return nil + } + out := new(GardenletConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GardenletConfiguration) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GardenletControllerConfiguration) DeepCopyInto(out *GardenletControllerConfiguration) { + *out = *in + if in.BackupBucket != nil { + in, out := &in.BackupBucket, &out.BackupBucket + *out = new(BackupBucketControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.BackupEntry != nil { + in, out := &in.BackupEntry, &out.BackupEntry + *out = new(BackupEntryControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.ControllerInstallation != nil { + in, out := &in.ControllerInstallation, &out.ControllerInstallation + *out = new(ControllerInstallationControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.ControllerInstallationCare != nil { + in, out := &in.ControllerInstallationCare, &out.ControllerInstallationCare + *out = new(ControllerInstallationCareControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.ControllerInstallationRequired != nil { + in, out := &in.ControllerInstallationRequired, &out.ControllerInstallationRequired + *out = new(ControllerInstallationRequiredControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.Seed != nil { + in, out := &in.Seed, &out.Seed + *out = new(SeedControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.Shoot != nil { + in, out := &in.Shoot, &out.Shoot + *out = new(ShootControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.ShootCare != nil { + in, out := &in.ShootCare, &out.ShootCare + *out = new(ShootCareControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.ShootStateSync != nil { + in, out := &in.ShootStateSync, &out.ShootStateSync + *out = new(ShootStateSyncControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.SeedAPIServerNetworkPolicy != nil { + in, out := &in.SeedAPIServerNetworkPolicy, &out.SeedAPIServerNetworkPolicy + *out = new(SeedAPIServerNetworkPolicyControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.ManagedSeed != nil { + in, out := &in.ManagedSeed, &out.ManagedSeed + *out = new(ManagedSeedControllerConfiguration) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GardenletControllerConfiguration. +func (in *GardenletControllerConfiguration) DeepCopy() *GardenletControllerConfiguration { + if in == nil { + return nil + } + out := new(GardenletControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HTTPSServer) DeepCopyInto(out *HTTPSServer) { + *out = *in + out.Server = in.Server + if in.TLS != nil { + in, out := &in.TLS, &out.TLS + *out = new(TLSServer) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPSServer. +func (in *HTTPSServer) DeepCopy() *HTTPSServer { + if in == nil { + return nil + } + out := new(HTTPSServer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LeaderElectionConfiguration) DeepCopyInto(out *LeaderElectionConfiguration) { + *out = *in + in.LeaderElectionConfiguration.DeepCopyInto(&out.LeaderElectionConfiguration) + if in.LockObjectNamespace != nil { + in, out := &in.LockObjectNamespace, &out.LockObjectNamespace + *out = new(string) + **out = **in + } + if in.LockObjectName != nil { + in, out := &in.LockObjectName, &out.LockObjectName + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaderElectionConfiguration. +func (in *LeaderElectionConfiguration) DeepCopy() *LeaderElectionConfiguration { + if in == nil { + return nil + } + out := new(LeaderElectionConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Logging) DeepCopyInto(out *Logging) { + *out = *in + if in.FluentBit != nil { + in, out := &in.FluentBit, &out.FluentBit + *out = new(FluentBit) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Logging. +func (in *Logging) DeepCopy() *Logging { + if in == nil { + return nil + } + out := new(Logging) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedControllerConfiguration) DeepCopyInto(out *ManagedSeedControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + if in.SyncJitterPeriod != nil { + in, out := &in.SyncJitterPeriod, &out.SyncJitterPeriod + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedControllerConfiguration. +func (in *ManagedSeedControllerConfiguration) DeepCopy() *ManagedSeedControllerConfiguration { + if in == nil { + return nil + } + out := new(ManagedSeedControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourcesConfiguration) DeepCopyInto(out *ResourcesConfiguration) { + *out = *in + if in.Capacity != nil { + in, out := &in.Capacity, &out.Capacity + *out = make(corev1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + if in.Reserved != nil { + in, out := &in.Reserved, &out.Reserved + *out = make(corev1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcesConfiguration. +func (in *ResourcesConfiguration) DeepCopy() *ResourcesConfiguration { + if in == nil { + return nil + } + out := new(ResourcesConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SNI) DeepCopyInto(out *SNI) { + *out = *in + if in.Ingress != nil { + in, out := &in.Ingress, &out.Ingress + *out = new(SNIIngress) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SNI. +func (in *SNI) DeepCopy() *SNI { + if in == nil { + return nil + } + out := new(SNI) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SNIIngress) DeepCopyInto(out *SNIIngress) { + *out = *in + if in.ServiceName != nil { + in, out := &in.ServiceName, &out.ServiceName + *out = new(string) + **out = **in + } + if in.Namespace != nil { + in, out := &in.Namespace, &out.Namespace + *out = new(string) + **out = **in + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SNIIngress. +func (in *SNIIngress) DeepCopy() *SNIIngress { + if in == nil { + return nil + } + out := new(SNIIngress) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedAPIServerNetworkPolicyControllerConfiguration) DeepCopyInto(out *SeedAPIServerNetworkPolicyControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedAPIServerNetworkPolicyControllerConfiguration. +func (in *SeedAPIServerNetworkPolicyControllerConfiguration) DeepCopy() *SeedAPIServerNetworkPolicyControllerConfiguration { + if in == nil { + return nil + } + out := new(SeedAPIServerNetworkPolicyControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedClientConnection) DeepCopyInto(out *SeedClientConnection) { + *out = *in + out.ClientConnectionConfiguration = in.ClientConnectionConfiguration + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedClientConnection. +func (in *SeedClientConnection) DeepCopy() *SeedClientConnection { + if in == nil { + return nil + } + out := new(SeedClientConnection) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedConfig) DeepCopyInto(out *SeedConfig) { + *out = *in + in.SeedTemplate.DeepCopyInto(&out.SeedTemplate) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedConfig. +func (in *SeedConfig) DeepCopy() *SeedConfig { + if in == nil { + return nil + } + out := new(SeedConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedControllerConfiguration) DeepCopyInto(out *SeedControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + if in.SyncPeriod != nil { + in, out := &in.SyncPeriod, &out.SyncPeriod + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedControllerConfiguration. +func (in *SeedControllerConfiguration) DeepCopy() *SeedControllerConfiguration { + if in == nil { + return nil + } + out := new(SeedControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Server) DeepCopyInto(out *Server) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Server. +func (in *Server) DeepCopy() *Server { + if in == nil { + return nil + } + out := new(Server) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerConfiguration) DeepCopyInto(out *ServerConfiguration) { + *out = *in + in.HTTPS.DeepCopyInto(&out.HTTPS) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerConfiguration. +func (in *ServerConfiguration) DeepCopy() *ServerConfiguration { + if in == nil { + return nil + } + out := new(ServerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ShootCareControllerConfiguration) DeepCopyInto(out *ShootCareControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + if in.SyncPeriod != nil { + in, out := &in.SyncPeriod, &out.SyncPeriod + *out = new(v1.Duration) + **out = **in + } + if in.StaleExtensionHealthChecks != nil { + in, out := &in.StaleExtensionHealthChecks, &out.StaleExtensionHealthChecks + *out = new(StaleExtensionHealthChecks) + (*in).DeepCopyInto(*out) + } + if in.ConditionThresholds != nil { + in, out := &in.ConditionThresholds, &out.ConditionThresholds + *out = make([]ConditionThreshold, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootCareControllerConfiguration. +func (in *ShootCareControllerConfiguration) DeepCopy() *ShootCareControllerConfiguration { + if in == nil { + return nil + } + out := new(ShootCareControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ShootClientConnection) DeepCopyInto(out *ShootClientConnection) { + *out = *in + out.ClientConnectionConfiguration = in.ClientConnectionConfiguration + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootClientConnection. +func (in *ShootClientConnection) DeepCopy() *ShootClientConnection { + if in == nil { + return nil + } + out := new(ShootClientConnection) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ShootControllerConfiguration) DeepCopyInto(out *ShootControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + if in.ProgressReportPeriod != nil { + in, out := &in.ProgressReportPeriod, &out.ProgressReportPeriod + *out = new(v1.Duration) + **out = **in + } + if in.ReconcileInMaintenanceOnly != nil { + in, out := &in.ReconcileInMaintenanceOnly, &out.ReconcileInMaintenanceOnly + *out = new(bool) + **out = **in + } + if in.RespectSyncPeriodOverwrite != nil { + in, out := &in.RespectSyncPeriodOverwrite, &out.RespectSyncPeriodOverwrite + *out = new(bool) + **out = **in + } + if in.RetryDuration != nil { + in, out := &in.RetryDuration, &out.RetryDuration + *out = new(v1.Duration) + **out = **in + } + if in.SyncPeriod != nil { + in, out := &in.SyncPeriod, &out.SyncPeriod + *out = new(v1.Duration) + **out = **in + } + if in.DNSEntryTTLSeconds != nil { + in, out := &in.DNSEntryTTLSeconds, &out.DNSEntryTTLSeconds + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootControllerConfiguration. +func (in *ShootControllerConfiguration) DeepCopy() *ShootControllerConfiguration { + if in == nil { + return nil + } + out := new(ShootControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ShootStateSyncControllerConfiguration) DeepCopyInto(out *ShootStateSyncControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + if in.SyncPeriod != nil { + in, out := &in.SyncPeriod, &out.SyncPeriod + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootStateSyncControllerConfiguration. +func (in *ShootStateSyncControllerConfiguration) DeepCopy() *ShootStateSyncControllerConfiguration { + if in == nil { + return nil + } + out := new(ShootStateSyncControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StaleExtensionHealthChecks) DeepCopyInto(out *StaleExtensionHealthChecks) { + *out = *in + if in.Threshold != nil { + in, out := &in.Threshold, &out.Threshold + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaleExtensionHealthChecks. +func (in *StaleExtensionHealthChecks) DeepCopy() *StaleExtensionHealthChecks { + if in == nil { + return nil + } + out := new(StaleExtensionHealthChecks) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TLSServer) DeepCopyInto(out *TLSServer) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSServer. +func (in *TLSServer) DeepCopy() *TLSServer { + if in == nil { + return nil + } + out := new(TLSServer) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/zz_generated.defaults.go b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/zz_generated.defaults.go new file mode 100644 index 00000000..881230c7 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,93 @@ +// +build !ignore_autogenerated + +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&GardenletConfiguration{}, func(obj interface{}) { SetObjectDefaults_GardenletConfiguration(obj.(*GardenletConfiguration)) }) + return nil +} + +func SetObjectDefaults_GardenletConfiguration(in *GardenletConfiguration) { + SetDefaults_GardenletConfiguration(in) + if in.GardenClientConnection != nil { + SetDefaults_ClientConnectionConfiguration(&in.GardenClientConnection.ClientConnectionConfiguration) + } + if in.SeedClientConnection != nil { + SetDefaults_ClientConnectionConfiguration(&in.SeedClientConnection.ClientConnectionConfiguration) + } + if in.ShootClientConnection != nil { + SetDefaults_ClientConnectionConfiguration(&in.ShootClientConnection.ClientConnectionConfiguration) + } + if in.Controllers != nil { + if in.Controllers.BackupBucket != nil { + SetDefaults_BackupBucketControllerConfiguration(in.Controllers.BackupBucket) + } + if in.Controllers.BackupEntry != nil { + SetDefaults_BackupEntryControllerConfiguration(in.Controllers.BackupEntry) + } + if in.Controllers.ControllerInstallation != nil { + SetDefaults_ControllerInstallationControllerConfiguration(in.Controllers.ControllerInstallation) + } + if in.Controllers.ControllerInstallationCare != nil { + SetDefaults_ControllerInstallationCareControllerConfiguration(in.Controllers.ControllerInstallationCare) + } + if in.Controllers.ControllerInstallationRequired != nil { + SetDefaults_ControllerInstallationRequiredControllerConfiguration(in.Controllers.ControllerInstallationRequired) + } + if in.Controllers.Seed != nil { + SetDefaults_SeedControllerConfiguration(in.Controllers.Seed) + } + if in.Controllers.Shoot != nil { + SetDefaults_ShootControllerConfiguration(in.Controllers.Shoot) + } + if in.Controllers.ShootCare != nil { + SetDefaults_ShootCareControllerConfiguration(in.Controllers.ShootCare) + if in.Controllers.ShootCare.StaleExtensionHealthChecks != nil { + SetDefaults_StaleExtensionHealthChecks(in.Controllers.ShootCare.StaleExtensionHealthChecks) + } + } + if in.Controllers.ShootStateSync != nil { + SetDefaults_ShootStateSyncControllerConfiguration(in.Controllers.ShootStateSync) + } + if in.Controllers.SeedAPIServerNetworkPolicy != nil { + SetDefaults_SeedAPIServerNetworkPolicyControllerConfiguration(in.Controllers.SeedAPIServerNetworkPolicy) + } + if in.Controllers.ManagedSeed != nil { + SetDefaults_ManagedSeedControllerConfiguration(in.Controllers.ManagedSeed) + } + } + if in.LeaderElection != nil { + SetDefaults_LeaderElectionConfiguration(in.LeaderElection) + } + if in.SNI != nil { + SetDefaults_SNI(in.SNI) + if in.SNI.Ingress != nil { + SetDefaults_SNIIngress(in.SNI.Ingress) + } + } +} diff --git a/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/zz_generated.deepcopy.go b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/zz_generated.deepcopy.go new file mode 100644 index 00000000..e47435f2 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/gardenlet/apis/config/zz_generated.deepcopy.go @@ -0,0 +1,863 @@ +// +build !ignore_autogenerated + +/* +Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package config + +import ( + core "github.com/gardener/gardener/pkg/apis/core" + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + klog "k8s.io/klog" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupBucketControllerConfiguration) DeepCopyInto(out *BackupBucketControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupBucketControllerConfiguration. +func (in *BackupBucketControllerConfiguration) DeepCopy() *BackupBucketControllerConfiguration { + if in == nil { + return nil + } + out := new(BackupBucketControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupEntryControllerConfiguration) DeepCopyInto(out *BackupEntryControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + if in.DeletionGracePeriodHours != nil { + in, out := &in.DeletionGracePeriodHours, &out.DeletionGracePeriodHours + *out = new(int) + **out = **in + } + if in.DeletionGracePeriodShootPurposes != nil { + in, out := &in.DeletionGracePeriodShootPurposes, &out.DeletionGracePeriodShootPurposes + *out = make([]core.ShootPurpose, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupEntryControllerConfiguration. +func (in *BackupEntryControllerConfiguration) DeepCopy() *BackupEntryControllerConfiguration { + if in == nil { + return nil + } + out := new(BackupEntryControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConditionThreshold) DeepCopyInto(out *ConditionThreshold) { + *out = *in + out.Duration = in.Duration + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionThreshold. +func (in *ConditionThreshold) DeepCopy() *ConditionThreshold { + if in == nil { + return nil + } + out := new(ConditionThreshold) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerInstallationCareControllerConfiguration) DeepCopyInto(out *ControllerInstallationCareControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + if in.SyncPeriod != nil { + in, out := &in.SyncPeriod, &out.SyncPeriod + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerInstallationCareControllerConfiguration. +func (in *ControllerInstallationCareControllerConfiguration) DeepCopy() *ControllerInstallationCareControllerConfiguration { + if in == nil { + return nil + } + out := new(ControllerInstallationCareControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerInstallationControllerConfiguration) DeepCopyInto(out *ControllerInstallationControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerInstallationControllerConfiguration. +func (in *ControllerInstallationControllerConfiguration) DeepCopy() *ControllerInstallationControllerConfiguration { + if in == nil { + return nil + } + out := new(ControllerInstallationControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerInstallationRequiredControllerConfiguration) DeepCopyInto(out *ControllerInstallationRequiredControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerInstallationRequiredControllerConfiguration. +func (in *ControllerInstallationRequiredControllerConfiguration) DeepCopy() *ControllerInstallationRequiredControllerConfiguration { + if in == nil { + return nil + } + out := new(ControllerInstallationRequiredControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FluentBit) DeepCopyInto(out *FluentBit) { + *out = *in + if in.ServiceSection != nil { + in, out := &in.ServiceSection, &out.ServiceSection + *out = new(string) + **out = **in + } + if in.InputSection != nil { + in, out := &in.InputSection, &out.InputSection + *out = new(string) + **out = **in + } + if in.OutputSection != nil { + in, out := &in.OutputSection, &out.OutputSection + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FluentBit. +func (in *FluentBit) DeepCopy() *FluentBit { + if in == nil { + return nil + } + out := new(FluentBit) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GardenClientConnection) DeepCopyInto(out *GardenClientConnection) { + *out = *in + out.ClientConnectionConfiguration = in.ClientConnectionConfiguration + if in.GardenClusterAddress != nil { + in, out := &in.GardenClusterAddress, &out.GardenClusterAddress + *out = new(string) + **out = **in + } + if in.GardenClusterCACert != nil { + in, out := &in.GardenClusterCACert, &out.GardenClusterCACert + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.BootstrapKubeconfig != nil { + in, out := &in.BootstrapKubeconfig, &out.BootstrapKubeconfig + *out = new(corev1.SecretReference) + **out = **in + } + if in.KubeconfigSecret != nil { + in, out := &in.KubeconfigSecret, &out.KubeconfigSecret + *out = new(corev1.SecretReference) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GardenClientConnection. +func (in *GardenClientConnection) DeepCopy() *GardenClientConnection { + if in == nil { + return nil + } + out := new(GardenClientConnection) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GardenletConfiguration) DeepCopyInto(out *GardenletConfiguration) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.GardenClientConnection != nil { + in, out := &in.GardenClientConnection, &out.GardenClientConnection + *out = new(GardenClientConnection) + (*in).DeepCopyInto(*out) + } + if in.SeedClientConnection != nil { + in, out := &in.SeedClientConnection, &out.SeedClientConnection + *out = new(SeedClientConnection) + **out = **in + } + if in.ShootClientConnection != nil { + in, out := &in.ShootClientConnection, &out.ShootClientConnection + *out = new(ShootClientConnection) + **out = **in + } + if in.Controllers != nil { + in, out := &in.Controllers, &out.Controllers + *out = new(GardenletControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = new(ResourcesConfiguration) + (*in).DeepCopyInto(*out) + } + if in.LeaderElection != nil { + in, out := &in.LeaderElection, &out.LeaderElection + *out = new(LeaderElectionConfiguration) + (*in).DeepCopyInto(*out) + } + if in.LogLevel != nil { + in, out := &in.LogLevel, &out.LogLevel + *out = new(string) + **out = **in + } + if in.KubernetesLogLevel != nil { + in, out := &in.KubernetesLogLevel, &out.KubernetesLogLevel + *out = new(klog.Level) + **out = **in + } + if in.Server != nil { + in, out := &in.Server, &out.Server + *out = new(ServerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.FeatureGates != nil { + in, out := &in.FeatureGates, &out.FeatureGates + *out = make(map[string]bool, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SeedConfig != nil { + in, out := &in.SeedConfig, &out.SeedConfig + *out = new(SeedConfig) + (*in).DeepCopyInto(*out) + } + if in.SeedSelector != nil { + in, out := &in.SeedSelector, &out.SeedSelector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.Logging != nil { + in, out := &in.Logging, &out.Logging + *out = new(Logging) + (*in).DeepCopyInto(*out) + } + if in.SNI != nil { + in, out := &in.SNI, &out.SNI + *out = new(SNI) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GardenletConfiguration. +func (in *GardenletConfiguration) DeepCopy() *GardenletConfiguration { + if in == nil { + return nil + } + out := new(GardenletConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GardenletConfiguration) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GardenletControllerConfiguration) DeepCopyInto(out *GardenletControllerConfiguration) { + *out = *in + if in.BackupBucket != nil { + in, out := &in.BackupBucket, &out.BackupBucket + *out = new(BackupBucketControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.BackupEntry != nil { + in, out := &in.BackupEntry, &out.BackupEntry + *out = new(BackupEntryControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.ControllerInstallation != nil { + in, out := &in.ControllerInstallation, &out.ControllerInstallation + *out = new(ControllerInstallationControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.ControllerInstallationCare != nil { + in, out := &in.ControllerInstallationCare, &out.ControllerInstallationCare + *out = new(ControllerInstallationCareControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.ControllerInstallationRequired != nil { + in, out := &in.ControllerInstallationRequired, &out.ControllerInstallationRequired + *out = new(ControllerInstallationRequiredControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.Seed != nil { + in, out := &in.Seed, &out.Seed + *out = new(SeedControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.Shoot != nil { + in, out := &in.Shoot, &out.Shoot + *out = new(ShootControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.ShootCare != nil { + in, out := &in.ShootCare, &out.ShootCare + *out = new(ShootCareControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.ShootStateSync != nil { + in, out := &in.ShootStateSync, &out.ShootStateSync + *out = new(ShootStateSyncControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.SeedAPIServerNetworkPolicy != nil { + in, out := &in.SeedAPIServerNetworkPolicy, &out.SeedAPIServerNetworkPolicy + *out = new(SeedAPIServerNetworkPolicyControllerConfiguration) + (*in).DeepCopyInto(*out) + } + if in.ManagedSeed != nil { + in, out := &in.ManagedSeed, &out.ManagedSeed + *out = new(ManagedSeedControllerConfiguration) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GardenletControllerConfiguration. +func (in *GardenletControllerConfiguration) DeepCopy() *GardenletControllerConfiguration { + if in == nil { + return nil + } + out := new(GardenletControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HTTPSServer) DeepCopyInto(out *HTTPSServer) { + *out = *in + out.Server = in.Server + if in.TLS != nil { + in, out := &in.TLS, &out.TLS + *out = new(TLSServer) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPSServer. +func (in *HTTPSServer) DeepCopy() *HTTPSServer { + if in == nil { + return nil + } + out := new(HTTPSServer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LeaderElectionConfiguration) DeepCopyInto(out *LeaderElectionConfiguration) { + *out = *in + out.LeaderElectionConfiguration = in.LeaderElectionConfiguration + if in.LockObjectNamespace != nil { + in, out := &in.LockObjectNamespace, &out.LockObjectNamespace + *out = new(string) + **out = **in + } + if in.LockObjectName != nil { + in, out := &in.LockObjectName, &out.LockObjectName + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaderElectionConfiguration. +func (in *LeaderElectionConfiguration) DeepCopy() *LeaderElectionConfiguration { + if in == nil { + return nil + } + out := new(LeaderElectionConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Logging) DeepCopyInto(out *Logging) { + *out = *in + if in.FluentBit != nil { + in, out := &in.FluentBit, &out.FluentBit + *out = new(FluentBit) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Logging. +func (in *Logging) DeepCopy() *Logging { + if in == nil { + return nil + } + out := new(Logging) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedSeedControllerConfiguration) DeepCopyInto(out *ManagedSeedControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + if in.SyncJitterPeriod != nil { + in, out := &in.SyncJitterPeriod, &out.SyncJitterPeriod + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSeedControllerConfiguration. +func (in *ManagedSeedControllerConfiguration) DeepCopy() *ManagedSeedControllerConfiguration { + if in == nil { + return nil + } + out := new(ManagedSeedControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourcesConfiguration) DeepCopyInto(out *ResourcesConfiguration) { + *out = *in + if in.Capacity != nil { + in, out := &in.Capacity, &out.Capacity + *out = make(corev1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + if in.Reserved != nil { + in, out := &in.Reserved, &out.Reserved + *out = make(corev1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcesConfiguration. +func (in *ResourcesConfiguration) DeepCopy() *ResourcesConfiguration { + if in == nil { + return nil + } + out := new(ResourcesConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SNI) DeepCopyInto(out *SNI) { + *out = *in + if in.Ingress != nil { + in, out := &in.Ingress, &out.Ingress + *out = new(SNIIngress) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SNI. +func (in *SNI) DeepCopy() *SNI { + if in == nil { + return nil + } + out := new(SNI) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SNIIngress) DeepCopyInto(out *SNIIngress) { + *out = *in + if in.ServiceName != nil { + in, out := &in.ServiceName, &out.ServiceName + *out = new(string) + **out = **in + } + if in.Namespace != nil { + in, out := &in.Namespace, &out.Namespace + *out = new(string) + **out = **in + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SNIIngress. +func (in *SNIIngress) DeepCopy() *SNIIngress { + if in == nil { + return nil + } + out := new(SNIIngress) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedAPIServerNetworkPolicyControllerConfiguration) DeepCopyInto(out *SeedAPIServerNetworkPolicyControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedAPIServerNetworkPolicyControllerConfiguration. +func (in *SeedAPIServerNetworkPolicyControllerConfiguration) DeepCopy() *SeedAPIServerNetworkPolicyControllerConfiguration { + if in == nil { + return nil + } + out := new(SeedAPIServerNetworkPolicyControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedClientConnection) DeepCopyInto(out *SeedClientConnection) { + *out = *in + out.ClientConnectionConfiguration = in.ClientConnectionConfiguration + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedClientConnection. +func (in *SeedClientConnection) DeepCopy() *SeedClientConnection { + if in == nil { + return nil + } + out := new(SeedClientConnection) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedConfig) DeepCopyInto(out *SeedConfig) { + *out = *in + in.SeedTemplate.DeepCopyInto(&out.SeedTemplate) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedConfig. +func (in *SeedConfig) DeepCopy() *SeedConfig { + if in == nil { + return nil + } + out := new(SeedConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedControllerConfiguration) DeepCopyInto(out *SeedControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + if in.SyncPeriod != nil { + in, out := &in.SyncPeriod, &out.SyncPeriod + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedControllerConfiguration. +func (in *SeedControllerConfiguration) DeepCopy() *SeedControllerConfiguration { + if in == nil { + return nil + } + out := new(SeedControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Server) DeepCopyInto(out *Server) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Server. +func (in *Server) DeepCopy() *Server { + if in == nil { + return nil + } + out := new(Server) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerConfiguration) DeepCopyInto(out *ServerConfiguration) { + *out = *in + in.HTTPS.DeepCopyInto(&out.HTTPS) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerConfiguration. +func (in *ServerConfiguration) DeepCopy() *ServerConfiguration { + if in == nil { + return nil + } + out := new(ServerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ShootCareControllerConfiguration) DeepCopyInto(out *ShootCareControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + if in.SyncPeriod != nil { + in, out := &in.SyncPeriod, &out.SyncPeriod + *out = new(v1.Duration) + **out = **in + } + if in.StaleExtensionHealthChecks != nil { + in, out := &in.StaleExtensionHealthChecks, &out.StaleExtensionHealthChecks + *out = new(StaleExtensionHealthChecks) + (*in).DeepCopyInto(*out) + } + if in.ConditionThresholds != nil { + in, out := &in.ConditionThresholds, &out.ConditionThresholds + *out = make([]ConditionThreshold, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootCareControllerConfiguration. +func (in *ShootCareControllerConfiguration) DeepCopy() *ShootCareControllerConfiguration { + if in == nil { + return nil + } + out := new(ShootCareControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ShootClientConnection) DeepCopyInto(out *ShootClientConnection) { + *out = *in + out.ClientConnectionConfiguration = in.ClientConnectionConfiguration + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootClientConnection. +func (in *ShootClientConnection) DeepCopy() *ShootClientConnection { + if in == nil { + return nil + } + out := new(ShootClientConnection) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ShootControllerConfiguration) DeepCopyInto(out *ShootControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + if in.ProgressReportPeriod != nil { + in, out := &in.ProgressReportPeriod, &out.ProgressReportPeriod + *out = new(v1.Duration) + **out = **in + } + if in.ReconcileInMaintenanceOnly != nil { + in, out := &in.ReconcileInMaintenanceOnly, &out.ReconcileInMaintenanceOnly + *out = new(bool) + **out = **in + } + if in.RespectSyncPeriodOverwrite != nil { + in, out := &in.RespectSyncPeriodOverwrite, &out.RespectSyncPeriodOverwrite + *out = new(bool) + **out = **in + } + if in.RetryDuration != nil { + in, out := &in.RetryDuration, &out.RetryDuration + *out = new(v1.Duration) + **out = **in + } + if in.SyncPeriod != nil { + in, out := &in.SyncPeriod, &out.SyncPeriod + *out = new(v1.Duration) + **out = **in + } + if in.DNSEntryTTLSeconds != nil { + in, out := &in.DNSEntryTTLSeconds, &out.DNSEntryTTLSeconds + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootControllerConfiguration. +func (in *ShootControllerConfiguration) DeepCopy() *ShootControllerConfiguration { + if in == nil { + return nil + } + out := new(ShootControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ShootStateSyncControllerConfiguration) DeepCopyInto(out *ShootStateSyncControllerConfiguration) { + *out = *in + if in.ConcurrentSyncs != nil { + in, out := &in.ConcurrentSyncs, &out.ConcurrentSyncs + *out = new(int) + **out = **in + } + if in.SyncPeriod != nil { + in, out := &in.SyncPeriod, &out.SyncPeriod + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootStateSyncControllerConfiguration. +func (in *ShootStateSyncControllerConfiguration) DeepCopy() *ShootStateSyncControllerConfiguration { + if in == nil { + return nil + } + out := new(ShootStateSyncControllerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StaleExtensionHealthChecks) DeepCopyInto(out *StaleExtensionHealthChecks) { + *out = *in + if in.Threshold != nil { + in, out := &in.Threshold, &out.Threshold + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaleExtensionHealthChecks. +func (in *StaleExtensionHealthChecks) DeepCopy() *StaleExtensionHealthChecks { + if in == nil { + return nil + } + out := new(StaleExtensionHealthChecks) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TLSServer) DeepCopyInto(out *TLSServer) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSServer. +func (in *TLSServer) DeepCopy() *TLSServer { + if in == nil { + return nil + } + out := new(TLSServer) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/gardener/gardener/pkg/mock/go/context/doc.go b/vendor/github.com/gardener/gardener/pkg/mock/go/context/doc.go deleted file mode 100644 index d6d46c49..00000000 --- a/vendor/github.com/gardener/gardener/pkg/mock/go/context/doc.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file -// -// 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. - -//go:generate mockgen -package=context -destination=funcs.go github.com/gardener/gardener/pkg/mock/go/context WithTimeout,CancelFunc -//go:generate mockgen -package=context -destination=mocks.go github.com/gardener/gardener/pkg/mock/go/context Context - -package context - -import ( - "context" - "time" -) - -// Context allows mocking context.Context. The interface is necessary due to an issue with -// golang/mock not being able to generate code for go's core context package. -type Context interface { - context.Context -} - -// WithTimeout is an interface that allows mocking `WithTimeout`. -type WithTimeout interface { - Do(parent context.Context, timeout time.Duration) (context.Context, context.CancelFunc) -} - -// CancelFunc is an interface that allows mocking `CancelFunc`. -type CancelFunc interface { - Do() -} diff --git a/vendor/github.com/gardener/gardener/pkg/mock/go/context/funcs.go b/vendor/github.com/gardener/gardener/pkg/mock/go/context/funcs.go deleted file mode 100644 index 7fa12c43..00000000 --- a/vendor/github.com/gardener/gardener/pkg/mock/go/context/funcs.go +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: github.com/gardener/gardener/pkg/mock/go/context (interfaces: WithTimeout,CancelFunc) - -// Package context is a generated GoMock package. -package context - -import ( - context "context" - reflect "reflect" - time "time" - - gomock "github.com/golang/mock/gomock" -) - -// MockWithTimeout is a mock of WithTimeout interface. -type MockWithTimeout struct { - ctrl *gomock.Controller - recorder *MockWithTimeoutMockRecorder -} - -// MockWithTimeoutMockRecorder is the mock recorder for MockWithTimeout. -type MockWithTimeoutMockRecorder struct { - mock *MockWithTimeout -} - -// NewMockWithTimeout creates a new mock instance. -func NewMockWithTimeout(ctrl *gomock.Controller) *MockWithTimeout { - mock := &MockWithTimeout{ctrl: ctrl} - mock.recorder = &MockWithTimeoutMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockWithTimeout) EXPECT() *MockWithTimeoutMockRecorder { - return m.recorder -} - -// Do mocks base method. -func (m *MockWithTimeout) Do(arg0 context.Context, arg1 time.Duration) (context.Context, context.CancelFunc) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Do", arg0, arg1) - ret0, _ := ret[0].(context.Context) - ret1, _ := ret[1].(context.CancelFunc) - return ret0, ret1 -} - -// Do indicates an expected call of Do. -func (mr *MockWithTimeoutMockRecorder) Do(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockWithTimeout)(nil).Do), arg0, arg1) -} - -// MockCancelFunc is a mock of CancelFunc interface. -type MockCancelFunc struct { - ctrl *gomock.Controller - recorder *MockCancelFuncMockRecorder -} - -// MockCancelFuncMockRecorder is the mock recorder for MockCancelFunc. -type MockCancelFuncMockRecorder struct { - mock *MockCancelFunc -} - -// NewMockCancelFunc creates a new mock instance. -func NewMockCancelFunc(ctrl *gomock.Controller) *MockCancelFunc { - mock := &MockCancelFunc{ctrl: ctrl} - mock.recorder = &MockCancelFuncMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockCancelFunc) EXPECT() *MockCancelFuncMockRecorder { - return m.recorder -} - -// Do mocks base method. -func (m *MockCancelFunc) Do() { - m.ctrl.T.Helper() - m.ctrl.Call(m, "Do") -} - -// Do indicates an expected call of Do. -func (mr *MockCancelFuncMockRecorder) Do() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockCancelFunc)(nil).Do)) -} diff --git a/vendor/github.com/gardener/gardener/pkg/mock/go/context/mocks.go b/vendor/github.com/gardener/gardener/pkg/mock/go/context/mocks.go deleted file mode 100644 index f3d53dc5..00000000 --- a/vendor/github.com/gardener/gardener/pkg/mock/go/context/mocks.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: github.com/gardener/gardener/pkg/mock/go/context (interfaces: Context) - -// Package context is a generated GoMock package. -package context - -import ( - reflect "reflect" - time "time" - - gomock "github.com/golang/mock/gomock" -) - -// MockContext is a mock of Context interface. -type MockContext struct { - ctrl *gomock.Controller - recorder *MockContextMockRecorder -} - -// MockContextMockRecorder is the mock recorder for MockContext. -type MockContextMockRecorder struct { - mock *MockContext -} - -// NewMockContext creates a new mock instance. -func NewMockContext(ctrl *gomock.Controller) *MockContext { - mock := &MockContext{ctrl: ctrl} - mock.recorder = &MockContextMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockContext) EXPECT() *MockContextMockRecorder { - return m.recorder -} - -// Deadline mocks base method. -func (m *MockContext) Deadline() (time.Time, bool) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Deadline") - ret0, _ := ret[0].(time.Time) - ret1, _ := ret[1].(bool) - return ret0, ret1 -} - -// Deadline indicates an expected call of Deadline. -func (mr *MockContextMockRecorder) Deadline() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deadline", reflect.TypeOf((*MockContext)(nil).Deadline)) -} - -// Done mocks base method. -func (m *MockContext) Done() <-chan struct{} { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Done") - ret0, _ := ret[0].(<-chan struct{}) - return ret0 -} - -// Done indicates an expected call of Done. -func (mr *MockContextMockRecorder) Done() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockContext)(nil).Done)) -} - -// Err mocks base method. -func (m *MockContext) Err() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Err") - ret0, _ := ret[0].(error) - return ret0 -} - -// Err indicates an expected call of Err. -func (mr *MockContextMockRecorder) Err() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockContext)(nil).Err)) -} - -// Value mocks base method. -func (m *MockContext) Value(arg0 interface{}) interface{} { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Value", arg0) - ret0, _ := ret[0].(interface{}) - return ret0 -} - -// Value indicates an expected call of Value. -func (mr *MockContextMockRecorder) Value(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockContext)(nil).Value), arg0) -} diff --git a/vendor/github.com/gardener/gardener/pkg/operation/common/extensions.go b/vendor/github.com/gardener/gardener/pkg/operation/common/extensions.go new file mode 100644 index 00000000..f3690407 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/operation/common/extensions.go @@ -0,0 +1,568 @@ +// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package common + +import ( + "context" + "errors" + "fmt" + "time" + + "github.com/gardener/gardener/pkg/api/extensions" + gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1alpha1helper "github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" + gardencorev1beta1helper "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" + extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" + "github.com/gardener/gardener/pkg/utils" + "github.com/gardener/gardener/pkg/utils/flow" + kutil "github.com/gardener/gardener/pkg/utils/kubernetes" + "github.com/gardener/gardener/pkg/utils/kubernetes/health" + "github.com/gardener/gardener/pkg/utils/retry" + + "github.com/sirupsen/logrus" + autoscalingv1 "k8s.io/api/autoscaling/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" +) + +// SyncClusterResourceToSeed creates or updates the `extensions.gardener.cloud/v1alpha1.Cluster` resource in the seed +// cluster by adding the shoot, seed, and cloudprofile specification. +func SyncClusterResourceToSeed(ctx context.Context, client client.Client, clusterName string, shoot *gardencorev1beta1.Shoot, cloudProfile *gardencorev1beta1.CloudProfile, seed *gardencorev1beta1.Seed) error { + if shoot.Spec.SeedName == nil { + return nil + } + + var ( + cluster = &extensionsv1alpha1.Cluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: clusterName, + }, + } + + cloudProfileObj *gardencorev1beta1.CloudProfile + seedObj *gardencorev1beta1.Seed + shootObj *gardencorev1beta1.Shoot + ) + + if cloudProfile != nil { + cloudProfileObj = cloudProfile.DeepCopy() + cloudProfileObj.TypeMeta = metav1.TypeMeta{ + APIVersion: gardencorev1beta1.SchemeGroupVersion.String(), + Kind: "CloudProfile", + } + } + + if seed != nil { + seedObj = seed.DeepCopy() + seedObj.TypeMeta = metav1.TypeMeta{ + APIVersion: gardencorev1beta1.SchemeGroupVersion.String(), + Kind: "Seed", + } + } + + if shoot != nil { + shootObj = shoot.DeepCopy() + shootObj.TypeMeta = metav1.TypeMeta{ + APIVersion: gardencorev1beta1.SchemeGroupVersion.String(), + Kind: "Shoot", + } + } + + _, err := controllerutil.CreateOrUpdate(ctx, client, cluster, func() error { + if cloudProfileObj != nil { + cluster.Spec.CloudProfile = runtime.RawExtension{Object: cloudProfileObj} + } + if seedObj != nil { + cluster.Spec.Seed = runtime.RawExtension{Object: seedObj} + } + if shootObj != nil { + cluster.Spec.Shoot = runtime.RawExtension{Object: shootObj} + } + return nil + }) + return err +} + +// WaitUntilExtensionCRReady waits until the given extension resource has become ready. +func WaitUntilExtensionCRReady( + ctx context.Context, + c client.Client, + logger logrus.FieldLogger, + newObjFunc func() client.Object, + kind string, + namespace string, + name string, + interval time.Duration, + severeThreshold time.Duration, + timeout time.Duration, + postReadyFunc func(client.Object) error, +) error { + return WaitUntilObjectReadyWithHealthFunction( + ctx, + c, + logger, + health.CheckExtensionObject, + newObjFunc, + kind, + namespace, + name, + interval, + severeThreshold, + timeout, + postReadyFunc, + ) +} + +// WaitUntilObjectReadyWithHealthFunction waits until the given resource has become ready. It takes the health check +// function that should be executed. +func WaitUntilObjectReadyWithHealthFunction( + ctx context.Context, + c client.Client, + logger logrus.FieldLogger, + healthFunc health.Func, + newObjFunc func() client.Object, + kind string, + namespace string, + name string, + interval time.Duration, + severeThreshold time.Duration, + timeout time.Duration, + postReadyFunc func(client.Object) error, +) error { + var ( + errorWithCode *gardencorev1beta1helper.ErrorWithCodes + lastObservedError error + retryCountUntilSevere int + ) + + if err := retry.UntilTimeout(ctx, interval, timeout, func(ctx context.Context) (bool, error) { + retryCountUntilSevere++ + + obj := newObjFunc() + if err := c.Get(ctx, client.ObjectKey{Name: name, Namespace: namespace}, obj); err != nil { + if apierrors.IsNotFound(err) { + return retry.MinorError(err) + } + return retry.SevereError(err) + } + + if err := healthFunc(obj); err != nil { + lastObservedError = err + logger.WithError(err).Errorf("%s did not get ready yet", extensionKey(kind, namespace, name)) + if errors.As(err, &errorWithCode) { + return retry.MinorOrSevereError(retryCountUntilSevere, int(severeThreshold.Nanoseconds()/interval.Nanoseconds()), err) + } + return retry.MinorError(err) + } + + if postReadyFunc != nil { + if err := postReadyFunc(obj); err != nil { + return retry.SevereError(err) + } + } + + return retry.Ok() + }); err != nil { + message := fmt.Sprintf("Error while waiting for %s to become ready", extensionKey(kind, namespace, name)) + if lastObservedError != nil { + return gardencorev1beta1helper.NewErrorWithCodes(formatErrorMessage(message, lastObservedError.Error()), gardencorev1beta1helper.ExtractErrorCodes(lastObservedError)...) + } + return errors.New(formatErrorMessage(message, err.Error())) + } + + return nil +} + +// DeleteExtensionCR deletes an extension resource. +func DeleteExtensionCR( + ctx context.Context, + c client.Client, + newObjFunc func() extensionsv1alpha1.Object, + namespace string, + name string, + deleteOpts ...client.DeleteOption, +) error { + obj := newObjFunc() + obj.SetNamespace(namespace) + obj.SetName(name) + + if err := ConfirmDeletion(ctx, c, obj); err != nil { + return err + } + + return client.IgnoreNotFound(c.Delete(ctx, obj, deleteOpts...)) +} + +// DeleteExtensionCRs lists all extension resources and loops over them. It executes the given for each +// of them, and if it evaluates to true then the resource will be deleted. +func DeleteExtensionCRs( + ctx context.Context, + c client.Client, + listObj client.ObjectList, + newObjFunc func() extensionsv1alpha1.Object, + namespace string, + predicateFunc func(obj extensionsv1alpha1.Object) bool, + deleteOpts ...client.DeleteOption, +) error { + fns, err := applyFuncToExtensionResources(ctx, c, listObj, namespace, predicateFunc, func(ctx context.Context, obj extensionsv1alpha1.Object) error { + return DeleteExtensionCR( + ctx, + c, + newObjFunc, + obj.GetNamespace(), + obj.GetName(), + deleteOpts..., + ) + }) + + if err != nil { + return err + } + + return flow.Parallel(fns...)(ctx) +} + +// WaitUntilExtensionCRsDeleted lists all extension resources and loops over them. It executes the given +// for each of them, and if it evaluates to true then it waits for the resource to be deleted. +func WaitUntilExtensionCRsDeleted( + ctx context.Context, + c client.Client, + logger logrus.FieldLogger, + listObj client.ObjectList, + newObjFunc func() extensionsv1alpha1.Object, + kind string, + namespace string, + interval time.Duration, + timeout time.Duration, + predicateFunc func(obj extensionsv1alpha1.Object) bool, +) error { + fns, err := applyFuncToExtensionResources( + ctx, + c, + listObj, + namespace, + func(obj extensionsv1alpha1.Object) bool { + if obj.GetDeletionTimestamp() == nil { + return false + } + if predicateFunc != nil && !predicateFunc(obj) { + return false + } + return true + }, + func(ctx context.Context, obj extensionsv1alpha1.Object) error { + return WaitUntilExtensionCRDeleted( + ctx, + c, + logger, + newObjFunc, + kind, + obj.GetNamespace(), + obj.GetName(), + interval, + timeout, + ) + }, + ) + + if err != nil { + return err + } + + return flow.Parallel(fns...)(ctx) +} + +// WaitUntilExtensionCRDeleted waits until an extension resource is deleted from the system. +func WaitUntilExtensionCRDeleted( + ctx context.Context, + c client.Client, + logger logrus.FieldLogger, + newObjFunc func() extensionsv1alpha1.Object, + kind string, + namespace string, + name string, + interval time.Duration, + timeout time.Duration, +) error { + var lastObservedError error + + if err := retry.UntilTimeout(ctx, interval, timeout, func(ctx context.Context) (bool, error) { + obj := newObjFunc() + if err := c.Get(ctx, client.ObjectKey{Name: name, Namespace: namespace}, obj); err != nil { + if apierrors.IsNotFound(err) { + return retry.Ok() + } + return retry.SevereError(err) + } + + acc, err := extensions.Accessor(obj) + if err != nil { + return retry.SevereError(err) + } + + if lastErr := acc.GetExtensionStatus().GetLastError(); lastErr != nil { + logger.Errorf("%s did not get deleted yet, lastError is: %s", extensionKey(kind, namespace, name), lastErr.Description) + lastObservedError = gardencorev1beta1helper.NewErrorWithCodes(lastErr.Description, lastErr.Codes...) + } + + var message = fmt.Sprintf("%s is still present", extensionKey(kind, namespace, name)) + if lastObservedError != nil { + message += fmt.Sprintf(", last observed error: %s", lastObservedError.Error()) + } + return retry.MinorError(fmt.Errorf(message)) + }); err != nil { + message := fmt.Sprintf("Failed to delete %s", extensionKey(kind, namespace, name)) + if lastObservedError != nil { + return gardencorev1beta1helper.NewErrorWithCodes(formatErrorMessage(message, lastObservedError.Error()), gardencorev1beta1helper.ExtractErrorCodes(lastObservedError)...) + } + return errors.New(formatErrorMessage(message, err.Error())) + } + + return nil +} + +// RestoreExtensionWithDeployFunction deploys the extension resource with the passed in deployFunc and sets its operation annotation to wait-for-state. +// It then restores the state of the extension resource from the ShootState, creates any required state resources and sets the operation annotation to restore. +func RestoreExtensionWithDeployFunction( + ctx context.Context, + c client.Client, + shootState *gardencorev1alpha1.ShootState, + resourceKind string, + namespace string, + deployFunc func(ctx context.Context, operationAnnotation string) (extensionsv1alpha1.Object, error), +) error { + extensionObj, err := deployFunc(ctx, v1beta1constants.GardenerOperationWaitForState) + if err != nil { + return err + } + + if err := RestoreExtensionObjectState(ctx, c, shootState, namespace, extensionObj, resourceKind); err != nil { + return err + } + + return AnnotateExtensionObjectWithOperation(ctx, c, extensionObj, v1beta1constants.GardenerOperationRestore) +} + +// RestoreExtensionObjectState restores the status.state field of the extension resources and deploys any required resources from the provided shoot state +func RestoreExtensionObjectState( + ctx context.Context, + c client.Client, + shootState *gardencorev1alpha1.ShootState, + namespace string, + extensionObj extensionsv1alpha1.Object, + resourceKind string, +) error { + var resourceRefs []autoscalingv1.CrossVersionObjectReference + if shootState.Spec.Extensions != nil { + resourceName := extensionObj.GetName() + purpose := extensionObj.GetExtensionSpec().GetExtensionPurpose() + list := gardencorev1alpha1helper.ExtensionResourceStateList(shootState.Spec.Extensions) + if extensionResourceState := list.Get(resourceKind, &resourceName, purpose); extensionResourceState != nil { + extensionStatus := extensionObj.GetExtensionStatus() + extensionStatus.SetState(extensionResourceState.State) + extensionStatus.SetResources(extensionResourceState.Resources) + + if err := c.Status().Update(ctx, extensionObj); err != nil { + return err + } + + for _, r := range extensionResourceState.Resources { + resourceRefs = append(resourceRefs, r.ResourceRef) + } + } + } + if shootState.Spec.Resources != nil { + list := gardencorev1alpha1helper.ResourceDataList(shootState.Spec.Resources) + for _, resourceRef := range resourceRefs { + resourceData := list.Get(&resourceRef) + if resourceData != nil { + obj, err := runtime.DefaultUnstructuredConverter.ToUnstructured(&resourceData.Data) + if err != nil { + return err + } + if err := utils.CreateOrUpdateObjectByRef(ctx, c, &resourceRef, namespace, obj); err != nil { + return err + } + } + } + } + return nil +} + +// MigrateExtensionCR adds the migrate operation annotation to the extension CR. +func MigrateExtensionCR( + ctx context.Context, + c client.Client, + newObjFunc func() extensionsv1alpha1.Object, + namespace string, + name string, +) error { + obj := newObjFunc() + obj.SetNamespace(namespace) + obj.SetName(name) + + if err := c.Get(ctx, client.ObjectKey{Namespace: namespace, Name: name}, obj); err != nil { + if client.IgnoreNotFound(err) == nil { + return nil + } + return err + } + + return AnnotateExtensionObjectWithOperation(ctx, c, obj, v1beta1constants.GardenerOperationMigrate) +} + +// MigrateExtensionCRs lists all extension resources of a given kind and annotates them with the Migrate operation. +func MigrateExtensionCRs( + ctx context.Context, + c client.Client, + listObj client.ObjectList, + newObjFunc func() extensionsv1alpha1.Object, + namespace string, +) error { + fns, err := applyFuncToExtensionResources(ctx, c, listObj, namespace, nil, func(ctx context.Context, o extensionsv1alpha1.Object) error { + return MigrateExtensionCR(ctx, c, newObjFunc, o.GetNamespace(), o.GetName()) + }) + + if err != nil { + return err + } + + return flow.Parallel(fns...)(ctx) +} + +// WaitUntilExtensionCRMigrated waits until the migrate operation for the extension resource is successful. +func WaitUntilExtensionCRMigrated( + ctx context.Context, + c client.Client, + newObjFunc func() extensionsv1alpha1.Object, + namespace string, + name string, + interval time.Duration, + timeout time.Duration, +) error { + obj := newObjFunc() + obj.SetNamespace(namespace) + obj.SetName(name) + + return retry.UntilTimeout(ctx, interval, timeout, func(ctx context.Context) (done bool, err error) { + if err := c.Get(ctx, client.ObjectKey{Namespace: namespace, Name: name}, obj); err != nil { + if client.IgnoreNotFound(err) == nil { + return retry.Ok() + } + return retry.SevereError(err) + } + + if extensionObjStatus := obj.GetExtensionStatus(); extensionObjStatus != nil { + if lastOperation := extensionObjStatus.GetLastOperation(); lastOperation != nil { + if lastOperation.Type == gardencorev1beta1.LastOperationTypeMigrate && lastOperation.State == gardencorev1beta1.LastOperationStateSucceeded { + return retry.Ok() + } + } + } + + var extensionType string + if extensionSpec := obj.GetExtensionSpec(); extensionSpec != nil { + extensionType = extensionSpec.GetExtensionType() + } + return retry.MinorError(fmt.Errorf("lastOperation for extension CR %s with name %s and type %s is not Migrate=Succeeded", obj.GetObjectKind().GroupVersionKind().Kind, name, extensionType)) + }) +} + +// WaitUntilExtensionCRsMigrated lists all extension resources of a given kind and waits until they are migrated +func WaitUntilExtensionCRsMigrated( + ctx context.Context, + c client.Client, + listObj client.ObjectList, + newObjFunc func() extensionsv1alpha1.Object, + namespace string, + interval time.Duration, + timeout time.Duration, +) error { + fns, err := applyFuncToExtensionResources(ctx, c, listObj, namespace, nil, func(ctx context.Context, object extensionsv1alpha1.Object) error { + return WaitUntilExtensionCRMigrated( + ctx, + c, + newObjFunc, + object.GetNamespace(), + object.GetName(), + interval, + timeout, + ) + }) + + if err != nil { + return err + } + + return flow.Parallel(fns...)(ctx) +} + +// AnnotateExtensionObjectWithOperation annotates the extension resource with the provided operation annotation value. +func AnnotateExtensionObjectWithOperation(ctx context.Context, c client.Client, extensionObj extensionsv1alpha1.Object, operation string) error { + extensionObjCopy := extensionObj.DeepCopyObject() + kutil.SetMetaDataAnnotation(extensionObj, v1beta1constants.GardenerOperation, operation) + kutil.SetMetaDataAnnotation(extensionObj, v1beta1constants.GardenerTimestamp, TimeNow().UTC().String()) + return c.Patch(ctx, extensionObj, client.MergeFrom(extensionObjCopy)) +} + +func applyFuncToExtensionResources( + ctx context.Context, + c client.Client, + listObj client.ObjectList, + namespace string, + predicateFunc func(obj extensionsv1alpha1.Object) bool, + applyFunc func(ctx context.Context, object extensionsv1alpha1.Object) error, +) ([]flow.TaskFn, error) { + if err := c.List(ctx, listObj, client.InNamespace(namespace)); err != nil { + return nil, err + } + + fns := make([]flow.TaskFn, 0, meta.LenList(listObj)) + + if err := meta.EachListItem(listObj, func(obj runtime.Object) error { + o, ok := obj.(extensionsv1alpha1.Object) + if !ok { + return fmt.Errorf("expected extensionsv1alpha1.Object but got %T", obj) + } + + if predicateFunc != nil && !predicateFunc(o) { + return nil + } + + fns = append(fns, func(ctx context.Context) error { + return applyFunc(ctx, o) + }) + + return nil + }); err != nil { + return nil, err + } + + return fns, nil +} + +func extensionKey(kind, namespace, name string) string { + return fmt.Sprintf("%s %s/%s", kind, namespace, name) +} + +func formatErrorMessage(message, description string) string { + return fmt.Sprintf("%s: %s", message, description) +} diff --git a/vendor/github.com/gardener/gardener/pkg/operation/common/managedresources.go b/vendor/github.com/gardener/gardener/pkg/operation/common/managedresources.go new file mode 100644 index 00000000..5b1bb545 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/operation/common/managedresources.go @@ -0,0 +1,106 @@ +// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package common + +import ( + "context" + + "github.com/gardener/gardener-resource-manager/pkg/manager" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +const ( + // ManagedResourceLabelKeyOrigin is a key for a label on a managed resource with the value 'origin'. + ManagedResourceLabelKeyOrigin = "origin" + // ManagedResourceLabelValueGardener is a value for a label on a managed resource with the value 'gardener'. + ManagedResourceLabelValueGardener = "gardener" + + // ManagedResourceSecretPrefix is the prefix that is used for secrets referenced by managed resources. + ManagedResourceSecretPrefix = "managedresource-" +) + +// DeployManagedResourceForShoot deploys a ManagedResource CR for the shoot's gardener-resource-manager. +func DeployManagedResourceForShoot(ctx context.Context, c client.Client, name, namespace string, keepObjects bool, data map[string][]byte) error { + return deployManagedResource(ctx, c, name, namespace, data, NewManagedResourceForShoot(c, name, namespace, keepObjects)) +} + +// DeleteManagedResourceForShoot deploys a ManagedResource CR for the shoot's gardener-resource-manager. +func DeleteManagedResourceForShoot(ctx context.Context, c client.Client, name, namespace string) error { + return deleteManagedResource(ctx, c, name, namespace, manager.NewManagedResource(c).WithNamespacedName(namespace, name)) +} + +// DeployManagedResourceForSeed deploys a ManagedResource CR for the seed's gardener-resource-manager. +func DeployManagedResourceForSeed(ctx context.Context, c client.Client, name, namespace string, keepObjects bool, data map[string][]byte) error { + return deployManagedResource(ctx, c, name, namespace, data, NewManagedResourceForSeed(c, name, namespace, keepObjects)) +} + +// DeleteManagedResourceForSeed deploys a ManagedResource CR for the seed's gardener-resource-manager. +func DeleteManagedResourceForSeed(ctx context.Context, c client.Client, name, namespace string) error { + return deleteManagedResource(ctx, c, name, namespace, manager.NewManagedResource(c).WithNamespacedName(namespace, name)) +} + +func deployManagedResource(ctx context.Context, c client.Client, name, namespace string, data map[string][]byte, managedResource *manager.ManagedResource) error { + secretName, secret := NewManagedResourceSecret(c, name, namespace) + + if err := secret.WithKeyValues(data).Reconcile(ctx); err != nil { + return err + } + + return managedResource.WithSecretRef(secretName).Reconcile(ctx) +} + +func deleteManagedResource(ctx context.Context, c client.Client, name, namespace string, managedResource *manager.ManagedResource) error { + _, secret := NewManagedResourceSecret(c, name, namespace) + + if err := managedResource.Delete(ctx); err != nil { + return err + } + return secret.Delete(ctx) +} + +// NewManagedResourceSecret constructs a new Secret object containing manifests managed by the Gardener-Resource-Manager +// which can be reconciled. +func NewManagedResourceSecret(c client.Client, name, namespace string) (string, *manager.Secret) { + secretName := ManagedResourceSecretName(name) + return secretName, manager.NewSecret(c).WithNamespacedName(namespace, secretName) +} + +// NewManagedResourceForShoot constructs a new ManagedResource object for the shoot's Gardener-Resource-Manager. +func NewManagedResourceForShoot(c client.Client, name, namespace string, keepObjects bool) *manager.ManagedResource { + var ( + injectedLabels = map[string]string{ShootNoCleanup: "true"} + labels = map[string]string{ManagedResourceLabelKeyOrigin: ManagedResourceLabelValueGardener} + ) + + return manager.NewManagedResource(c). + WithNamespacedName(namespace, name). + WithLabels(labels). + WithInjectedLabels(injectedLabels). + KeepObjects(keepObjects) +} + +// NewManagedResourceForSeed constructs a new ManagedResource object for the seed's Gardener-Resource-Manager. +func NewManagedResourceForSeed(c client.Client, name, namespace string, keepObjects bool) *manager.ManagedResource { + return manager.NewManagedResource(c). + WithNamespacedName(namespace, name). + WithClass("seed"). + KeepObjects(keepObjects) +} + +// ManagedResourceSecretName returns the name of a corev1.Scret for the given name of a +// resourcesv1alpha1.ManagedResource. +func ManagedResourceSecretName(managedResourceName string) string { + return ManagedResourceSecretPrefix + managedResourceName +} diff --git a/vendor/github.com/gardener/gardener/pkg/operation/common/network_policies.go b/vendor/github.com/gardener/gardener/pkg/operation/common/network_policies.go new file mode 100644 index 00000000..e3646545 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/operation/common/network_policies.go @@ -0,0 +1,118 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package common + +import ( + "net" +) + +// Private8BitBlock returns a private network (RFC1918) 10.0.0.0/8 IPv4 block +func Private8BitBlock() *net.IPNet { + return &net.IPNet{IP: net.IP{10, 0, 0, 0}, Mask: net.CIDRMask(8, 32)} +} + +// Private12BitBlock returns a private network (RFC1918) 172.16.0.0/12 IPv4 block +func Private12BitBlock() *net.IPNet { + return &net.IPNet{IP: net.IP{172, 16, 0, 0}, Mask: net.CIDRMask(12, 32)} +} + +// Private16BitBlock returns a private network (RFC1918) 192.168.0.0/16 IPv4 block +func Private16BitBlock() *net.IPNet { + return &net.IPNet{IP: net.IP{192, 168, 0, 0}, Mask: net.CIDRMask(16, 32)} +} + +// CarrierGradeNATBlock returns a Carrier-grade NAT (RFC6598) 100.64.0.0/10 IPv4 block +func CarrierGradeNATBlock() *net.IPNet { + return &net.IPNet{IP: net.IP{100, 64, 0, 0}, Mask: net.CIDRMask(10, 32)} +} + +// AllPrivateNetworkBlocks returns a list of all Private network (RFC1918) and +// Carrier-grade NAT (RFC6598) IPv4 blocks. +func AllPrivateNetworkBlocks() []net.IPNet { + return []net.IPNet{ + *Private8BitBlock(), + *Private12BitBlock(), + *Private16BitBlock(), + *CarrierGradeNATBlock(), + } +} + +// ToExceptNetworks returns a list of maps with `network` key containing one of `networks` +// and `except` key containgn list of `cidr` which are part of those CIDRs. +// +// Calling +// `ToExceptNetworks(AllPrivateNetworkBlocks(),"10.10.0.0/24","172.16.1.0/24","192.168.1.0/24","100.64.1.0/24")` +// produces: +// +// [ +// {"network": "10.0.0.0/8", "except": ["10.10.0.0/24"]}, +// {"network": "172.16.0.0/12", "except": ["172.16.1.0/24"]}, +// {"network": "192.168.0.0/16", "except": ["192.168.1.0/24"]}, +// {"network": "100.64.0.0/10", "except": ["100.64.1.0/24"]}, +// ] +func ToExceptNetworks(networks []net.IPNet, except ...string) ([]interface{}, error) { + result := []interface{}{} + + for _, n := range networks { + excluded, err := excludeBlock(&n, except...) + if err != nil { + return nil, err + } + + result = append(result, map[string]interface{}{ + "network": n.String(), + "except": excluded, + }) + } + return result, nil +} + +// ExceptNetworks returns a list of maps with `network` key containing one of `networks` +// and `except` key containgn list of `cidr` which are part of those CIDRs. +// +// Calling +// `ExceptNetworks([]garden.CIDR{"10.0.0.0/8","172.16.0.0/12"},"10.10.0.0/24","172.16.1.0/24")` +// produces: +// +// [ +// {"network": "10.0.0.0/8", "except": ["10.10.0.0/24"]}, +// {"network": "172.16.0.0/12", "except": ["172.16.1.0/24"]}, +// ] +func ExceptNetworks(networks []string, except ...string) ([]interface{}, error) { + ipNets := []net.IPNet{} + for _, n := range networks { + _, net, err := net.ParseCIDR(string(n)) + if err != nil { + return nil, err + } + ipNets = append(ipNets, *net) + } + return ToExceptNetworks(ipNets, except...) +} + +func excludeBlock(parentBlock *net.IPNet, cidrs ...string) ([]string, error) { + matchedCIDRs := []string{} + + for _, cidr := range cidrs { + ip, ipNet, err := net.ParseCIDR(string(cidr)) + if err != nil { + return matchedCIDRs, err + } + if parentBlock.Contains(ip) && !ipNet.Contains(parentBlock.IP) { + matchedCIDRs = append(matchedCIDRs, cidr) + } + } + return matchedCIDRs, nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/operation/common/types.go b/vendor/github.com/gardener/gardener/pkg/operation/common/types.go new file mode 100644 index 00000000..c64c43bf --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/operation/common/types.go @@ -0,0 +1,286 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package common + +import ( + "time" +) + +const ( + // VPNTunnel dictates that VPN is used as a tunnel between seed and shoot networks. + VPNTunnel string = "vpn-shoot" + + // BasicAuthSecretName is the name of the secret containing basic authentication credentials for the kube-apiserver. + BasicAuthSecretName = "kube-apiserver-basic-auth" + + // ConfirmationDeletion is an annotation on a Shoot and Project resources whose value must be set to "true" in order to + // allow deleting the resource (if the annotation is not set any DELETE request will be denied). + ConfirmationDeletion = "confirmation.gardener.cloud/deletion" + + // DNSProvider is the key for an annotation on a Kubernetes Secret object whose value must point to a valid + // DNS provider. + DNSProvider = "dns.gardener.cloud/provider" + + // DNSDomain is the key for an annotation on a Kubernetes Secret object whose value must point to a valid + // domain name. + DNSDomain = "dns.gardener.cloud/domain" + + // DNSIncludeZones is the key for an annotation on a Kubernetes Secret object whose value must point to a list + // of zones that shall be included. + DNSIncludeZones = "dns.gardener.cloud/include-zones" + + // DNSExcludeZones is the key for an annotation on a Kubernetes Secret object whose value must point to a list + // of zones that shall be excluded. + DNSExcludeZones = "dns.gardener.cloud/exclude-zones" + + // EtcdEncryptionSecretName is the name of the shoot-specific secret which contains + // that shoot's EncryptionConfiguration. The EncryptionConfiguration contains a key + // which the shoot's apiserver uses for encrypting selected etcd content. + // Should match charts/seed-controlplane/charts/kube-apiserver/templates/deployment.yaml + EtcdEncryptionSecretName = "etcd-encryption-secret" + + // EtcdEncryptionSecretFileName is the name of the file within the EncryptionConfiguration + // which is made available as volume mount to the shoot's apiserver. + // Should match charts/seed-controlplane/charts/kube-apiserver/templates/deployment.yaml + EtcdEncryptionSecretFileName = "encryption-configuration.yaml" + + // EtcdEncryptionChecksumLabelName is the name of the label which is added to the shoot + // secrets after rewriting them to ensure that successfully rewritten secrets are not + // (unnecessarily) rewritten during each reconciliation. + EtcdEncryptionChecksumLabelName = "shoot.gardener.cloud/etcd-encryption-configuration-checksum" + + // EtcdEncryptionForcePlaintextAnnotationName is the name of the annotation with which to annotate + // the EncryptionConfiguration secret to force the decryption of shoot secrets + EtcdEncryptionForcePlaintextAnnotationName = "shoot.gardener.cloud/etcd-encryption-force-plaintext-secrets" + + // EtcdEncryptionEncryptedResourceSecrets is the name of the secret resource to be encrypted + EtcdEncryptionEncryptedResourceSecrets = "secrets" + + // EtcdEncryptionKeyPrefix is the prefix for the key name of the EncryptionConfiguration's key + EtcdEncryptionKeyPrefix = "key" + + // EtcdEncryptionKeySecretLen is the expected length in bytes of the EncryptionConfiguration's key + EtcdEncryptionKeySecretLen = 32 + + // GardenerDeletionProtected is a label on CustomResourceDefinitions indicating that the deletion is protected, i.e. + // it must be confirmed with the `confirmation.gardener.cloud/deletion=true` annotation before a `DELETE` call + // is accepted. + GardenerDeletionProtected = "gardener.cloud/deletion-protected" + + // ETCDEncryptionConfigDataName is the name of ShootState data entry holding the current key and encryption state used to encrypt shoot resources + ETCDEncryptionConfigDataName = "etcdEncryptionConfiguration" + + // GardenRoleDefaultDomain is the value of the GardenRole key indicating type 'default-domain'. + GardenRoleDefaultDomain = "default-domain" + + // GardenRoleInternalDomain is the value of the GardenRole key indicating type 'internal-domain'. + GardenRoleInternalDomain = "internal-domain" + + // GardenRoleOpenVPNDiffieHellman is the value of the GardenRole key indicating type 'openvpn-diffie-hellman'. + GardenRoleOpenVPNDiffieHellman = "openvpn-diffie-hellman" + + // GardenRoleGlobalMonitoring is the value of the GardenRole key indicating type 'global-monitoring' + GardenRoleGlobalMonitoring = "global-monitoring" + + // GardenRoleAlerting is the value of GardenRole key indicating type 'alerting'. + GardenRoleAlerting = "alerting" + + // GardenRoleHvpa is the value of GardenRole key indicating type 'hvpa'. + GardenRoleHvpa = "hvpa" + + // GardenCreatedBy is the key for an annotation of a Shoot cluster whose value indicates contains the username + // of the user that created the resource. + GardenCreatedBy = "gardener.cloud/created-by" + + // GrafanaOperatorsPrefix is a constant for a prefix used for the operators Grafana instance. + GrafanaOperatorsPrefix = "go" + + // GrafanaUsersPrefix is a constant for a prefix used for the users Grafana instance. + GrafanaUsersPrefix = "gu" + + // GrafanaOperatorsRole is a constant for the operators role. + GrafanaOperatorsRole = "operators" + + // GrafanaUsersRole is a constant for the users role. + GrafanaUsersRole = "users" + + // PrometheusPrefix is a constant for a prefix used for the Prometheus instance. + PrometheusPrefix = "p" + + // AlertManagerPrefix is a constant for a prefix used for the AlertManager instance. + AlertManagerPrefix = "au" + + // IngressPrefix is the part of a FQDN which will be used to construct the domain name for an ingress controller of + // a Shoot cluster. For example, when a Shoot specifies domain 'cluster.example.com', the ingress domain would be + // '*..cluster.example.com'. + IngressPrefix = "ingress" + + // APIServerPrefix is the part of a FQDN which will be used to construct the domain name for the kube-apiserver of + // a Shoot cluster. For example, when a Shoot specifies domain 'cluster.example.com', the apiserver domain would be + // 'api.cluster.example.com'. + APIServerPrefix = "api" + + // InternalDomainKey is a key which must be present in an internal domain constructed for a Shoot cluster. If the + // configured internal domain already contains it, it won't be added twice. If it does not contain it, it will be + // appended. + InternalDomainKey = "internal" + + // CoreDNSDeploymentName is the name of the coredns deployment. + CoreDNSDeploymentName = "coredns" + + // KubecfgUsername is the username for the token used for the kubeconfig the shoot. + KubecfgUsername = "system:cluster-admin" + + // KubecfgSecretName is the name of the kubecfg secret. + KubecfgSecretName = "kubecfg" + + // DependencyWatchdogExternalProbeSecretName is the name of the kubecfg secret with internal DNS for external access. + DependencyWatchdogExternalProbeSecretName = "dependency-watchdog-external-probe" + + // DependencyWatchdogInternalProbeSecretName is the name of the kubecfg secret with cluster IP access. + DependencyWatchdogInternalProbeSecretName = "dependency-watchdog-internal-probe" + + // DependencyWatchdogUserName is the user name of the dependency-watchdog. + DependencyWatchdogUserName = "gardener.cloud:system:dependency-watchdog" + + // KubeAPIServerHealthCheck is a key for the kube-apiserver-health-check user. + KubeAPIServerHealthCheck = "kube-apiserver-health-check" + + // StaticTokenSecretName is the name of the secret containing static tokens for the kube-apiserver. + StaticTokenSecretName = "static-token" + + // VPASecretName is the name of the secret used by VPA + VPASecretName = "vpa-tls-certs" + + // ProjectName is the key of a label on namespaces whose value holds the project name. + ProjectName = "project.gardener.cloud/name" + + // ProjectSkipStaleCheck is the key of an annotation on a project namespace that marks the associated Project to be + // skipped by the stale project controller. If the project has already configured stale timestamps in its status + // then they will be reset. + ProjectSkipStaleCheck = "project.gardener.cloud/skip-stale-check" + + // NamespaceProject is the key of an annotation on namespace whose value holds the project uid. + NamespaceProject = "namespace.gardener.cloud/project" + + // NamespaceKeepAfterProjectDeletion is a constant for an annotation on a `Namespace` resource that states that it + // should not be deleted if the corresponding `Project` gets deleted. Please note that all project related labels + // from the namespace will be removed when the project is being deleted. + NamespaceKeepAfterProjectDeletion = "namespace.gardener.cloud/keep-after-project-deletion" + + // ShootAlphaScalingAPIServerClass is a constant for an annotation on the shoot stating the initial API server class. + // It influences the size of the initial resource requests/limits. + // Possible values are [small, medium, large, xlarge, 2xlarge]. + // Note that this annotation is alpha and can be removed anytime without further notice. Only use it if you know + // what you do. + ShootAlphaScalingAPIServerClass = "alpha.kube-apiserver.scaling.shoot.gardener.cloud/class" + + // ShootExpirationTimestamp is an annotation on a Shoot resource whose value represents the time when the Shoot lifetime + // is expired. The lifetime can be extended, but at most by the minimal value of the 'clusterLifetimeDays' property + // of referenced quotas. + ShootExpirationTimestamp = "shoot.gardener.cloud/expiration-timestamp" + + // ShootNoCleanup is a constant for a label on a resource indicating that the Gardener cleaner should not delete this + // resource when cleaning a shoot during the deletion flow. + ShootNoCleanup = "shoot.gardener.cloud/no-cleanup" + + // ShootStatus is a constant for a label on a Shoot resource indicating that the Shoot's health. + ShootStatus = "shoot.gardener.cloud/status" + + // ShootOperationMaintain is a constant for an annotation on a Shoot indicating that the Shoot maintenance shall be executed as soon as + // possible. + ShootOperationMaintain = "maintain" + + // FailedShootNeedsRetryOperation is a constant for an annotation on a Shoot in a failed state indicating that a retry operation should be triggered during the next maintenance time window. + FailedShootNeedsRetryOperation = "maintenance.shoot.gardener.cloud/needs-retry-operation" + + // ShootOperationRotateKubeconfigCredentials is a constant for an annotation on a Shoot indicating that the credentials contained in the + // kubeconfig that is handed out to the user shall be rotated. + ShootOperationRotateKubeconfigCredentials = "rotate-kubeconfig-credentials" + + // ShootTasks is a constant for an annotation on a Shoot which states that certain tasks should be done. + ShootTasks = "shoot.gardener.cloud/tasks" + + // ShootTaskDeployInfrastructure is a name for a Shoot's infrastructure deployment task. It indicates that the + // Infrastructure extension resource shall be reconciled. + ShootTaskDeployInfrastructure = "deployInfrastructure" + + // ShootTaskRestartControlPlanePods is a name for a Shoot task which is dedicated to restart related control plane pods. + ShootTaskRestartControlPlanePods = "restartControlPlanePods" + + // ShootTaskRestartCoreAddons is a name for a Shoot task which is dedicated to restart some core addons. + ShootTaskRestartCoreAddons = "restartCoreAddons" + + // ShootOperationRetry is a constant for an annotation on a Shoot indicating that a failed Shoot reconciliation shall be retried. + ShootOperationRetry = "retry" + + // ShootOperationReconcile is a constant for an annotation on a Shoot indicating that a Shoot reconciliation shall be triggered. + ShootOperationReconcile = "reconcile" + + // ShootSyncPeriod is a constant for an annotation on a Shoot which may be used to overwrite the global Shoot controller sync period. + // The value must be a duration. It can also be used to disable the reconciliation at all by setting it to 0m. Disabling the reconciliation + // does only mean that the period reconciliation is disabled. However, when the Gardener is restarted/redeployed or the specification is + // changed then the reconciliation flow will be executed. + ShootSyncPeriod = "shoot.gardener.cloud/sync-period" + + // ShootIgnore is a constant for an annotation on a Shoot which may be used to tell the Gardener that the Shoot with this name should be + // ignored completely. That means that the Shoot will never reach the reconciliation flow (independent of the operation (create/update/ + // delete)). + ShootIgnore = "shoot.gardener.cloud/ignore" + + // ManagedResourceShootCoreName is the name of the shoot core managed resource. + ManagedResourceShootCoreName = "shoot-core" + + // ManagedResourceAddonsName is the name of the addons managed resource. + ManagedResourceAddonsName = "addons" + + // SeedSpecHash is a constant for a label on `ControllerInstallation`s (similar to `pod-template-hash` on `Pod`s). + SeedSpecHash = "seed-spec-hash" + + // RegistrationSpecHash is a constant for a label on `ControllerInstallation`s (similar to `pod-template-hash` on `Pod`s). + RegistrationSpecHash = "registration-spec-hash" + + // VpaAdmissionControllerName is the name of the vpa-admission-controller name. + VpaAdmissionControllerName = "gardener.cloud:vpa:admission-controller" + // VpaRecommenderName is the name of the vpa-recommender name. + VpaRecommenderName = "gardener.cloud:vpa:recommender" + // VpaUpdaterName is the name of the vpa-updater name. + VpaUpdaterName = "gardener.cloud:vpa:updater" + // VpaExporterName is the name of the vpa-exporter name. + VpaExporterName = "gardener.cloud:vpa:exporter" + + // IstioNamespace is the istio-system namespace + IstioNamespace = "istio-system" + + // ServiceAccountSigningKeySecretDataKey is the data key of a signing key Kubernetes secret. + ServiceAccountSigningKeySecretDataKey = "signing-key" + + // ControlPlaneWildcardCert is the value of the GardenRole key indicating type 'controlplane-cert'. + // It refers to a wildcard tls certificate which can be used for services exposed under the corresponding domain. + ControlPlaneWildcardCert = "controlplane-cert" + + // AlertManagerTLS is the name of the secret resource which holds the TLS certificate for Alert Manager. + AlertManagerTLS = "alertmanager-tls" + // GrafanaTLS is the name of the secret resource which holds the TLS certificate for Grafana. + GrafanaTLS = "grafana-tls" + // PrometheusTLS is the name of the secret resource which holds the TLS certificate for Prometheus. + PrometheusTLS = "prometheus-tls" + + // EndUserCrtValidity is the time period a user facing certificate is valid. + EndUserCrtValidity = 730 * 24 * time.Hour // ~2 years, see https://support.apple.com/en-us/HT210176 + + // ShootDNSIngressName is a constant for the DNS resources used for the shoot ingress addon. + ShootDNSIngressName = "ingress" +) diff --git a/vendor/github.com/gardener/gardener/pkg/operation/common/utils.go b/vendor/github.com/gardener/gardener/pkg/operation/common/utils.go new file mode 100644 index 00000000..be117be4 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/operation/common/utils.go @@ -0,0 +1,741 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package common + +import ( + "context" + "errors" + "fmt" + "math/big" + "net" + "reflect" + "regexp" + "strconv" + "strings" + "time" + + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" + gardencorelisters "github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1" + "github.com/gardener/gardener/pkg/client/kubernetes" + "github.com/gardener/gardener/pkg/utils" + kutil "github.com/gardener/gardener/pkg/utils/kubernetes" + hvpav1alpha1 "github.com/gardener/hvpa-controller/api/v1alpha1" + + admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + extensionsv1beta1 "k8s.io/api/extensions/v1beta1" + networkingv1 "k8s.io/api/networking/v1" + rbacv1 "k8s.io/api/rbac/v1" + schedulingv1 "k8s.io/api/scheduling/v1" + schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" + autoscalingv1beta2 "k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1beta2" + "k8s.io/client-go/util/retry" + "k8s.io/component-base/version" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +// TimeNow returns the current time. Exposed for testing. +var TimeNow = time.Now + +// GetSecretKeysWithPrefix returns a list of keys of the given map which are prefixed with . +func GetSecretKeysWithPrefix(kind string, m map[string]*corev1.Secret) []string { + var result []string + for key := range m { + if strings.HasPrefix(key, kind) { + result = append(result, key) + } + } + return result +} + +// ComputeOffsetIP parses the provided and offsets with the value of . +// For example, = 100.64.0.0/11 and = 10 the result would be 100.64.0.10 +// IPv6 and IPv4 is supported. +func ComputeOffsetIP(subnet *net.IPNet, offset int64) (net.IP, error) { + if subnet == nil { + return nil, fmt.Errorf("subnet is nil") + } + + isIPv6 := false + + bytes := subnet.IP.To4() + if bytes == nil { + isIPv6 = true + bytes = subnet.IP.To16() + } + + ip := net.IP(big.NewInt(0).Add(big.NewInt(0).SetBytes(bytes), big.NewInt(offset)).Bytes()) + + if !subnet.Contains(ip) { + return nil, fmt.Errorf("cannot compute IP with offset %d - subnet %q too small", offset, subnet) + } + + // there is no broadcast address on IPv6 + if isIPv6 { + return ip, nil + } + + for i := range ip { + // IP address is not the same, so it's not the broadcast ip. + if ip[i] != ip[i]|^subnet.Mask[i] { + return ip.To4(), nil + } + } + + return nil, fmt.Errorf("computed IPv4 address %q is broadcast for subnet %q", ip, subnet) +} + +// GenerateAddonConfig returns the provided in case is true. Otherwise, nil is +// being returned. +func GenerateAddonConfig(values map[string]interface{}, enabled bool) map[string]interface{} { + v := map[string]interface{}{ + "enabled": enabled, + } + if enabled { + for key, value := range values { + v[key] = value + } + } + return v +} + +// GenerateBackupEntryName returns BackupEntry resource name created from provided and . +func GenerateBackupEntryName(seedNamespace string, shootUID types.UID) string { + return fmt.Sprintf("%s--%s", seedNamespace, shootUID) +} + +// ExtractShootDetailsFromBackupEntryName returns Shoot resource technicalID its UID from provided . +func ExtractShootDetailsFromBackupEntryName(backupEntryName string) (shootTechnicalID, shootUID string) { + tokens := strings.Split(backupEntryName, "--") + shootUID = tokens[len(tokens)-1] + shootTechnicalID = strings.TrimSuffix(backupEntryName, shootUID) + shootTechnicalID = strings.TrimSuffix(shootTechnicalID, "--") + return shootTechnicalID, shootUID +} + +// ReplaceCloudProviderConfigKey replaces a key with the new value in the given cloud provider config. +func ReplaceCloudProviderConfigKey(cloudProviderConfig, separator, key, value string) string { + keyValueRegexp := regexp.MustCompile(fmt.Sprintf(`(\Q%s\E%s)([^\n]*)`, key, separator)) + return keyValueRegexp.ReplaceAllString(cloudProviderConfig, fmt.Sprintf(`${1}%q`, strings.Replace(value, `$`, `$$`, -1))) +} + +// ProjectForNamespace returns the project object responsible for a given . +// It tries to identify the project object by looking for the namespace name in the project spec. +func ProjectForNamespace(projectLister gardencorelisters.ProjectLister, namespaceName string) (*gardencorev1beta1.Project, error) { + projectList, err := projectLister.List(labels.Everything()) + if err != nil { + return nil, err + } + + var projects []gardencorev1beta1.Project + for _, p := range projectList { + projects = append(projects, *p) + } + + return projectForNamespace(projects, namespaceName) +} + +// ProjectForNamespaceWithClient returns the project object responsible for a given . +// It tries to identify the project object by looking for the namespace name in the project spec. +func ProjectForNamespaceWithClient(ctx context.Context, c client.Reader, namespaceName string) (*gardencorev1beta1.Project, error) { + projectList := &gardencorev1beta1.ProjectList{} + err := c.List(ctx, projectList) + if err != nil { + return nil, err + } + + return projectForNamespace(projectList.Items, namespaceName) +} + +func projectForNamespace(projects []gardencorev1beta1.Project, namespaceName string) (*gardencorev1beta1.Project, error) { + for _, project := range projects { + if project.Spec.Namespace != nil && *project.Spec.Namespace == namespaceName { + return &project, nil + } + } + + return nil, apierrors.NewNotFound(gardencorev1beta1.Resource("Project"), fmt.Sprintf("for namespace %s", namespaceName)) +} + +// GardenerDeletionGracePeriod is the default grace period for Gardener's force deletion methods. +var GardenerDeletionGracePeriod = 5 * time.Minute + +// ShouldObjectBeRemoved determines whether the given object should be gone now. +// This is calculated by first checking the deletion timestamp of an object: If the deletion timestamp +// is unset, the object should not be removed - i.e. this returns false. +// Otherwise, it is checked whether the deletionTimestamp is before the current time minus the +// grace period. +func ShouldObjectBeRemoved(obj metav1.Object, gracePeriod time.Duration) bool { + deletionTimestamp := obj.GetDeletionTimestamp() + if deletionTimestamp == nil { + return false + } + + return deletionTimestamp.Time.Before(time.Now().Add(-gracePeriod)) +} + +// DeleteHvpa delete all resources required for the HVPA in the given namespace. +func DeleteHvpa(ctx context.Context, k8sClient kubernetes.Interface, namespace string) error { + if k8sClient == nil { + return fmt.Errorf("require kubernetes client") + } + + listOptions := metav1.ListOptions{ + LabelSelector: fmt.Sprintf("%s=%s", v1beta1constants.GardenRole, GardenRoleHvpa), + } + + // Delete all CRDs with label "gardener.cloud/role=hvpa" + // Workaround: Due to https://github.com/gardener/gardener/issues/2257, we first list the HVPA CRDs and then remove + // them one by one. + crdList, err := k8sClient.APIExtension().ApiextensionsV1beta1().CustomResourceDefinitions().List(ctx, listOptions) + if err != nil { + return err + } + for _, crd := range crdList.Items { + if err := k8sClient.APIExtension().ApiextensionsV1beta1().CustomResourceDefinitions().Delete(ctx, crd.Name, metav1.DeleteOptions{}); client.IgnoreNotFound(err) != nil { + return err + } + } + + // Delete all Deployments with label "gardener.cloud/role=hvpa" + deletePropagation := metav1.DeletePropagationForeground + if err := k8sClient.Kubernetes().AppsV1().Deployments(namespace).DeleteCollection(ctx, metav1.DeleteOptions{PropagationPolicy: &deletePropagation}, listOptions); client.IgnoreNotFound(err) != nil { + return err + } + + // Delete all ClusterRoles with label "gardener.cloud/role=hvpa" + if err := k8sClient.Kubernetes().RbacV1().ClusterRoles().DeleteCollection(ctx, metav1.DeleteOptions{}, listOptions); client.IgnoreNotFound(err) != nil { + return err + } + + // Delete all ClusterRoleBindings with label "gardener.cloud/role=hvpa" + if err := k8sClient.Kubernetes().RbacV1().ClusterRoleBindings().DeleteCollection(ctx, metav1.DeleteOptions{}, listOptions); client.IgnoreNotFound(err) != nil { + return err + } + + // Delete all ServiceAccounts with label "gardener.cloud/role=hvpa" + if err := k8sClient.Kubernetes().CoreV1().ServiceAccounts(namespace).DeleteCollection(ctx, metav1.DeleteOptions{}, listOptions); client.IgnoreNotFound(err) != nil { + return err + } + + return nil +} + +// DeleteVpa delete all resources required for the VPA in the given namespace. +func DeleteVpa(ctx context.Context, c client.Client, namespace string, isShoot bool) error { + resources := []client.Object{ + &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameVPAAdmissionController, Namespace: namespace}}, + &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameVPARecommender, Namespace: namespace}}, + &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameVPAUpdater, Namespace: namespace}}, + &corev1.Service{ObjectMeta: metav1.ObjectMeta{Name: "vpa-webhook", Namespace: namespace}}, + &autoscalingv1beta2.VerticalPodAutoscaler{ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameVPAAdmissionController, Namespace: namespace}}, + &autoscalingv1beta2.VerticalPodAutoscaler{ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameVPARecommender, Namespace: namespace}}, + &autoscalingv1beta2.VerticalPodAutoscaler{ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameVPAUpdater, Namespace: namespace}}, + } + + if isShoot { + resources = append(resources, + &corev1.Secret{ObjectMeta: metav1.ObjectMeta{Name: "vpa-admission-controller", Namespace: namespace}}, + &corev1.Secret{ObjectMeta: metav1.ObjectMeta{Name: "vpa-recommender", Namespace: namespace}}, + &corev1.Secret{ObjectMeta: metav1.ObjectMeta{Name: VPASecretName, Namespace: namespace}}, + &corev1.Secret{ObjectMeta: metav1.ObjectMeta{Name: "vpa-updater", Namespace: namespace}}, + &networkingv1.NetworkPolicy{ObjectMeta: metav1.ObjectMeta{Name: "allow-kube-apiserver-to-vpa-admission-controller", Namespace: namespace}}, + ) + } else { + resources = append(resources, + &rbacv1.ClusterRole{ObjectMeta: metav1.ObjectMeta{Name: "gardener.cloud:vpa:seed:actor"}}, + &rbacv1.ClusterRole{ObjectMeta: metav1.ObjectMeta{Name: "gardener.cloud:vpa:seed:admission-controller"}}, + &rbacv1.ClusterRole{ObjectMeta: metav1.ObjectMeta{Name: "gardener.cloud:vpa:seed:checkpoint-actor"}}, + &rbacv1.ClusterRole{ObjectMeta: metav1.ObjectMeta{Name: "gardener.cloud:vpa:seed:metrics-reader"}}, + &rbacv1.ClusterRole{ObjectMeta: metav1.ObjectMeta{Name: "gardener.cloud:vpa:seed:target-reader"}}, + &rbacv1.ClusterRole{ObjectMeta: metav1.ObjectMeta{Name: "gardener.cloud:vpa:seed:evictioner"}}, + &rbacv1.ClusterRoleBinding{ObjectMeta: metav1.ObjectMeta{Name: "gardener.cloud:vpa:seed:actor"}}, + &rbacv1.ClusterRoleBinding{ObjectMeta: metav1.ObjectMeta{Name: "gardener.cloud:vpa:seed:admission-controller"}}, + &rbacv1.ClusterRoleBinding{ObjectMeta: metav1.ObjectMeta{Name: "gardener.cloud:vpa:seed:checkpoint-actor"}}, + &rbacv1.ClusterRoleBinding{ObjectMeta: metav1.ObjectMeta{Name: "gardener.cloud:vpa:seed:metrics-reader"}}, + &rbacv1.ClusterRoleBinding{ObjectMeta: metav1.ObjectMeta{Name: "gardener.cloud:vpa:seed:target-reader"}}, + &rbacv1.ClusterRoleBinding{ObjectMeta: metav1.ObjectMeta{Name: "gardener.cloud:vpa:seed:evictioner"}}, + &corev1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Name: "vpa-admission-controller", Namespace: namespace}}, + &corev1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Name: "vpa-recommender", Namespace: namespace}}, + &corev1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Name: "vpa-updater", Namespace: namespace}}, + &admissionregistrationv1beta1.MutatingWebhookConfiguration{ObjectMeta: metav1.ObjectMeta{Name: "vpa-webhook-config-seed"}}, + ) + } + + for _, resource := range resources { + if err := c.Delete(ctx, resource); client.IgnoreNotFound(err) != nil { + return err + } + } + return nil +} + +// DeleteShootLoggingStack deletes all shoot resource of the logging stack in the given namespace. +func DeleteShootLoggingStack(ctx context.Context, k8sClient client.Client, namespace string) error { + return DeleteLoki(ctx, k8sClient, namespace) +} + +// DeleteLoki deletes all resources of the Loki in a given namespace. +func DeleteLoki(ctx context.Context, k8sClient client.Client, namespace string) error { + resources := []client.Object{ + &networkingv1.NetworkPolicy{ObjectMeta: metav1.ObjectMeta{Name: "allow-loki", Namespace: namespace}}, + &networkingv1.NetworkPolicy{ObjectMeta: metav1.ObjectMeta{Name: "allow-to-loki", Namespace: namespace}}, + &hvpav1alpha1.Hvpa{ObjectMeta: metav1.ObjectMeta{Name: "loki", Namespace: namespace}}, + &corev1.ConfigMap{ObjectMeta: metav1.ObjectMeta{Name: "loki-config", Namespace: namespace}}, + &corev1.Service{ObjectMeta: metav1.ObjectMeta{Name: "loki", Namespace: namespace}}, + &corev1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Name: "loki", Namespace: namespace}}, + &appsv1.StatefulSet{ObjectMeta: metav1.ObjectMeta{Name: "loki", Namespace: namespace}}, + &corev1.PersistentVolumeClaim{ObjectMeta: metav1.ObjectMeta{Name: "loki-loki-0", Namespace: namespace}}, + } + + for _, resource := range resources { + if err := k8sClient.Delete(ctx, resource); client.IgnoreNotFound(err) != nil && !meta.IsNoMatchError(err) { + return err + } + } + return nil +} + +// DeleteSeedLoggingStack deletes all seed resource of the logging stack in the garden namespace. +func DeleteSeedLoggingStack(ctx context.Context, k8sClient client.Client) error { + resources := []client.Object{ + &corev1.ConfigMap{ObjectMeta: metav1.ObjectMeta{Name: "fluent-bit-config", Namespace: v1beta1constants.GardenNamespace}}, + &appsv1.DaemonSet{ObjectMeta: metav1.ObjectMeta{Name: "fluent-bit", Namespace: v1beta1constants.GardenNamespace}}, + &networkingv1.NetworkPolicy{ObjectMeta: metav1.ObjectMeta{Name: "allow-fluentbit", Namespace: v1beta1constants.GardenNamespace}}, + &schedulingv1.PriorityClass{ObjectMeta: metav1.ObjectMeta{Name: "fluent-bit"}}, + &rbacv1.ClusterRole{ObjectMeta: metav1.ObjectMeta{Name: "fluent-bit-read"}}, + &rbacv1.ClusterRoleBinding{ObjectMeta: metav1.ObjectMeta{Name: "fluent-bit-read"}}, + &corev1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Name: "fluent-bit", Namespace: v1beta1constants.GardenNamespace}}, + &corev1.Service{ObjectMeta: metav1.ObjectMeta{Name: "fluent-bit", Namespace: v1beta1constants.GardenNamespace}}, + } + + for _, resource := range resources { + if err := k8sClient.Delete(ctx, resource); client.IgnoreNotFound(err) != nil && !meta.IsNoMatchError(err) { + return err + } + } + + return DeleteLoki(ctx, k8sClient, v1beta1constants.GardenNamespace) +} + +// GetContainerResourcesInStatefulSet returns the containers resources in StatefulSet +func GetContainerResourcesInStatefulSet(ctx context.Context, k8sClient client.Client, key client.ObjectKey) (map[string]*corev1.ResourceRequirements, error) { + statefulSet := &appsv1.StatefulSet{} + resourcesPerContainer := make(map[string]*corev1.ResourceRequirements) + if err := k8sClient.Get(ctx, key, statefulSet); client.IgnoreNotFound(err) != nil { + return nil, err + } else if !apierrors.IsNotFound(err) { + for _, container := range statefulSet.Spec.Template.Spec.Containers { + resourcesPerContainer[container.Name] = container.Resources.DeepCopy() + } + return resourcesPerContainer, nil + } + + // Use the default resources defined in values file + return nil, nil +} + +// DeleteReserveExcessCapacity deletes the deployment and priority class for excess capacity +func DeleteReserveExcessCapacity(ctx context.Context, k8sClient client.Client) error { + if k8sClient == nil { + return errors.New("must provide non-nil kubernetes client to common.DeleteReserveExcessCapacity") + } + + deploy := &appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: "reserve-excess-capacity", + Namespace: v1beta1constants.GardenNamespace, + }, + } + if err := k8sClient.Delete(ctx, deploy); client.IgnoreNotFound(err) != nil { + return err + } + + priorityClass := &schedulingv1beta1.PriorityClass{ + ObjectMeta: metav1.ObjectMeta{ + Name: "gardener-reserve-excess-capacity", + }, + } + return client.IgnoreNotFound(k8sClient.Delete(ctx, priorityClass)) +} + +// DeleteAlertmanager deletes all resources of the Alertmanager in a given namespace. +func DeleteAlertmanager(ctx context.Context, k8sClient client.Client, namespace string) error { + objs := []client.Object{ + &appsv1.StatefulSet{ + ObjectMeta: metav1.ObjectMeta{ + Name: v1beta1constants.StatefulSetNameAlertManager, + Namespace: namespace, + }, + }, + &extensionsv1beta1.Ingress{ + ObjectMeta: metav1.ObjectMeta{ + Name: "alertmanager", + Namespace: namespace, + }, + }, + &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "alertmanager-client", + Namespace: namespace, + }, + }, + &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "alertmanager", + Namespace: namespace, + }, + }, + &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "alertmanager-basic-auth", + Namespace: namespace, + }, + }, + &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: AlertManagerTLS, + Namespace: namespace, + }, + }, + &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "alertmanager-config", + Namespace: namespace, + }, + }, + &corev1.PersistentVolumeClaim{ + ObjectMeta: metav1.ObjectMeta{ + Name: "alertmanager-db-alertmanager-0", + Namespace: namespace, + }, + }, + } + + return kutil.DeleteObjects(ctx, k8sClient, objs...) +} + +// DeleteGrafanaByRole deletes the monitoring stack for the shoot owner. +func DeleteGrafanaByRole(ctx context.Context, k8sClient kubernetes.Interface, namespace, role string) error { + if k8sClient == nil { + return fmt.Errorf("require kubernetes client") + } + + listOptions := metav1.ListOptions{ + LabelSelector: fmt.Sprintf("%s=%s,%s=%s", "component", "grafana", "role", role), + } + + deletePropagation := metav1.DeletePropagationForeground + if err := k8sClient.Kubernetes().AppsV1().Deployments(namespace).DeleteCollection( + ctx, + metav1.DeleteOptions{ + PropagationPolicy: &deletePropagation, + }, listOptions); err != nil && !apierrors.IsNotFound(err) { + return err + } + + if err := k8sClient.Kubernetes().CoreV1().ConfigMaps(namespace).DeleteCollection( + ctx, metav1.DeleteOptions{}, listOptions); err != nil && !apierrors.IsNotFound(err) { + return err + } + + if err := k8sClient.Kubernetes().ExtensionsV1beta1().Ingresses(namespace).DeleteCollection( + ctx, metav1.DeleteOptions{}, listOptions); err != nil && !apierrors.IsNotFound(err) { + return err + } + + if err := k8sClient.Kubernetes().CoreV1().Secrets(namespace).DeleteCollection( + ctx, metav1.DeleteOptions{}, listOptions); err != nil && !apierrors.IsNotFound(err) { + return err + } + + if err := k8sClient.Kubernetes().CoreV1().Services(namespace).Delete( + ctx, fmt.Sprintf("grafana-%s", role), metav1.DeleteOptions{}); err != nil && !apierrors.IsNotFound(err) { + return err + } + return nil +} + +// GetDomainInfoFromAnnotations returns the provider and the domain that is specified in the give annotations. +func GetDomainInfoFromAnnotations(annotations map[string]string) (provider string, domain string, includeZones, excludeZones []string, err error) { + if annotations == nil { + return "", "", nil, nil, fmt.Errorf("domain secret has no annotations") + } + + if providerAnnotation, ok := annotations[DNSProvider]; ok { + provider = providerAnnotation + } + + if domainAnnotation, ok := annotations[DNSDomain]; ok { + domain = domainAnnotation + } + + if includeZonesAnnotation, ok := annotations[DNSIncludeZones]; ok { + includeZones = strings.Split(includeZonesAnnotation, ",") + } + if excludeZonesAnnotation, ok := annotations[DNSExcludeZones]; ok { + excludeZones = strings.Split(excludeZonesAnnotation, ",") + } + + if len(domain) == 0 { + return "", "", nil, nil, fmt.Errorf("missing dns domain annotation on domain secret") + } + if len(provider) == 0 { + return "", "", nil, nil, fmt.Errorf("missing dns provider annotation on domain secret") + } + + return +} + +// CurrentReplicaCount returns the current replicaCount for the given deployment. +func CurrentReplicaCount(ctx context.Context, client client.Client, namespace, deploymentName string) (int32, error) { + deployment := &appsv1.Deployment{} + if err := client.Get(ctx, kutil.Key(namespace, deploymentName), deployment); err != nil && !apierrors.IsNotFound(err) { + return 0, err + } + if deployment.Spec.Replicas == nil { + return 0, nil + } + return *deployment.Spec.Replicas, nil +} + +// RespectShootSyncPeriodOverwrite checks whether to respect the sync period overwrite of a Shoot or not. +func RespectShootSyncPeriodOverwrite(respectSyncPeriodOverwrite bool, shoot *gardencorev1beta1.Shoot) bool { + return respectSyncPeriodOverwrite || shoot.Namespace == v1beta1constants.GardenNamespace +} + +// ShouldIgnoreShoot determines whether a Shoot should be ignored or not. +func ShouldIgnoreShoot(respectSyncPeriodOverwrite bool, shoot *gardencorev1beta1.Shoot) bool { + if !RespectShootSyncPeriodOverwrite(respectSyncPeriodOverwrite, shoot) { + return false + } + + value, ok := shoot.Annotations[ShootIgnore] + if !ok { + return false + } + + ignore, _ := strconv.ParseBool(value) + return ignore +} + +// IsShootFailed checks if a Shoot is failed. +func IsShootFailed(shoot *gardencorev1beta1.Shoot) bool { + lastOperation := shoot.Status.LastOperation + + return lastOperation != nil && lastOperation.State == gardencorev1beta1.LastOperationStateFailed && + shoot.Generation == shoot.Status.ObservedGeneration && + shoot.Status.Gardener.Version == version.Get().GitVersion +} + +// IsNowInEffectiveShootMaintenanceTimeWindow checks if the current time is in the effective +// maintenance time window of the Shoot. +func IsNowInEffectiveShootMaintenanceTimeWindow(shoot *gardencorev1beta1.Shoot) bool { + return EffectiveShootMaintenanceTimeWindow(shoot).Contains(time.Now()) +} + +// LastReconciliationDuringThisTimeWindow returns true if is contained in the given effective maintenance time +// window of the shoot and if the did not happen longer than the longest possible duration of a +// maintenance time window. +func LastReconciliationDuringThisTimeWindow(shoot *gardencorev1beta1.Shoot) bool { + if shoot.Status.LastOperation == nil { + return false + } + + var ( + timeWindow = EffectiveShootMaintenanceTimeWindow(shoot) + now = time.Now() + lastReconciliation = shoot.Status.LastOperation.LastUpdateTime.Time + ) + + return timeWindow.Contains(lastReconciliation) && now.UTC().Sub(lastReconciliation.UTC()) <= gardencorev1beta1.MaintenanceTimeWindowDurationMaximum +} + +// IsObservedAtLatestGenerationAndSucceeded checks whether the Shoot's generation has changed or if the LastOperation status +// is Succeeded. +func IsObservedAtLatestGenerationAndSucceeded(shoot *gardencorev1beta1.Shoot) bool { + lastOperation := shoot.Status.LastOperation + return shoot.Generation == shoot.Status.ObservedGeneration && + (lastOperation != nil && lastOperation.State == gardencorev1beta1.LastOperationStateSucceeded) +} + +// SyncPeriodOfShoot determines the sync period of the given shoot. +// +// If no overwrite is allowed, the defaultMinSyncPeriod is returned. +// Otherwise, the overwrite is parsed. If an error occurs or it is smaller than the defaultMinSyncPeriod, +// the defaultMinSyncPeriod is returned. Otherwise, the overwrite is returned. +func SyncPeriodOfShoot(respectSyncPeriodOverwrite bool, defaultMinSyncPeriod time.Duration, shoot *gardencorev1beta1.Shoot) time.Duration { + if !RespectShootSyncPeriodOverwrite(respectSyncPeriodOverwrite, shoot) { + return defaultMinSyncPeriod + } + + syncPeriodOverwrite, ok := shoot.Annotations[ShootSyncPeriod] + if !ok { + return defaultMinSyncPeriod + } + + syncPeriod, err := time.ParseDuration(syncPeriodOverwrite) + if err != nil { + return defaultMinSyncPeriod + } + + if syncPeriod < defaultMinSyncPeriod { + return defaultMinSyncPeriod + } + return syncPeriod +} + +// EffectiveMaintenanceTimeWindow cuts a maintenance time window at the end with a guess of 15 minutes. It is subtracted from the end +// of a maintenance time window to use a best-effort kind of finishing the operation before the end. +// Generally, we can't make sure that the maintenance operation is done by the end of the time window anyway (considering large +// clusters with hundreds of nodes, a rolling update will take several hours). +func EffectiveMaintenanceTimeWindow(timeWindow *utils.MaintenanceTimeWindow) *utils.MaintenanceTimeWindow { + return timeWindow.WithEnd(timeWindow.End().Add(0, -15, 0)) +} + +// EffectiveShootMaintenanceTimeWindow returns the effective MaintenanceTimeWindow of the given Shoot. +func EffectiveShootMaintenanceTimeWindow(shoot *gardencorev1beta1.Shoot) *utils.MaintenanceTimeWindow { + maintenance := shoot.Spec.Maintenance + if maintenance == nil || maintenance.TimeWindow == nil { + return utils.AlwaysTimeWindow + } + + timeWindow, err := utils.ParseMaintenanceTimeWindow(maintenance.TimeWindow.Begin, maintenance.TimeWindow.End) + if err != nil { + return utils.AlwaysTimeWindow + } + + return EffectiveMaintenanceTimeWindow(timeWindow) +} + +// GardenEtcdEncryptionSecretName returns the name to the 'backup' of the etcd encryption secret in the Garden cluster. +func GardenEtcdEncryptionSecretName(shootName string) string { + return fmt.Sprintf("%s.%s", shootName, EtcdEncryptionSecretName) +} + +// ReadServiceAccountSigningKeySecret reads the signing key secret to extract the signing key. +// It errors if there is no value at ServiceAccountSigningKeySecretDataKey. +func ReadServiceAccountSigningKeySecret(secret *corev1.Secret) (string, error) { + data, ok := secret.Data[ServiceAccountSigningKeySecretDataKey] + if !ok { + return "", fmt.Errorf("no signing key secret in secret %s/%s at .Data.%s", secret.Namespace, secret.Name, ServiceAccountSigningKeySecretDataKey) + } + + return string(data), nil +} + +// GetServiceAccountSigningKeySecret gets the signing key from the secret with the given name and namespace. +func GetServiceAccountSigningKeySecret(ctx context.Context, c client.Client, shootNamespace, secretName string) (string, error) { + secret := &corev1.Secret{} + if err := c.Get(ctx, kutil.Key(shootNamespace, secretName), secret); err != nil { + return "", err + } + + return ReadServiceAccountSigningKeySecret(secret) +} + +// GetAPIServerDomain returns the fully qualified domain name of for the api-server for the Shoot cluster. The +// end result is 'api.'. +func GetAPIServerDomain(domain string) string { + return fmt.Sprintf("%s.%s", APIServerPrefix, domain) +} + +// GetSecretFromSecretRef gets the Secret object from . +func GetSecretFromSecretRef(ctx context.Context, c client.Client, secretRef *corev1.SecretReference) (*corev1.Secret, error) { + secret := &corev1.Secret{} + if err := c.Get(ctx, kutil.Key(secretRef.Namespace, secretRef.Name), secret); err != nil { + return nil, err + } + return secret, nil +} + +// CheckIfDeletionIsConfirmed returns whether the deletion of an object is confirmed or not. +func CheckIfDeletionIsConfirmed(obj client.Object) error { + annotations := obj.GetAnnotations() + if annotations == nil { + return annotationRequiredError() + } + + value := annotations[ConfirmationDeletion] + if confirmed, err := strconv.ParseBool(value); err != nil || !confirmed { + return annotationRequiredError() + } + return nil +} + +func annotationRequiredError() error { + return fmt.Errorf("must have a %q annotation to delete", ConfirmationDeletion) +} + +// ConfirmDeletion adds Gardener's deletion confirmation annotation to the given object and sends an UPDATE request. +func ConfirmDeletion(ctx context.Context, c client.Client, obj client.Object) error { + return retry.RetryOnConflict(retry.DefaultBackoff, func() error { + if err := c.Get(ctx, client.ObjectKeyFromObject(obj), obj); err != nil { + if !apierrors.IsNotFound(err) { + return err + } + return nil + } + + existing := obj.DeepCopyObject() + kutil.SetMetaDataAnnotation(obj, ConfirmationDeletion, "true") + kutil.SetMetaDataAnnotation(obj, v1beta1constants.GardenerTimestamp, TimeNow().UTC().String()) + + if reflect.DeepEqual(existing, obj) { + return nil + } + + return c.Update(ctx, obj) + }) +} + +// ExtensionID returns an identifier for the given extension kind/type. +func ExtensionID(extensionKind, extensionType string) string { + return fmt.Sprintf("%s/%s", extensionKind, extensionType) +} + +// DeleteDeploymentsHavingDeprecatedRoleLabelKey deletes the Deployments with the passed object keys if +// the corresponding Deployment .spec.selector contains the deprecated "garden.sapcloud.io/role" label key. +func DeleteDeploymentsHavingDeprecatedRoleLabelKey(ctx context.Context, c client.Client, keys []client.ObjectKey) error { + for _, key := range keys { + deployment := &appsv1.Deployment{} + if err := c.Get(ctx, key, deployment); err != nil { + if apierrors.IsNotFound(err) { + continue + } + + return err + } + + if _, ok := deployment.Spec.Selector.MatchLabels[v1beta1constants.DeprecatedGardenRole]; ok { + if err := c.Delete(ctx, deployment); client.IgnoreNotFound(err) != nil { + return err + } + + if err := kutil.WaitUntilResourceDeleted(ctx, c, deployment, 2*time.Second); err != nil { + return err + } + } + } + + return nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/chart/chart.go b/vendor/github.com/gardener/gardener/pkg/utils/chart/chart.go index a74bf328..0984bc1c 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/chart/chart.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/chart/chart.go @@ -24,7 +24,6 @@ import ( "github.com/pkg/errors" apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -51,7 +50,7 @@ type Chart struct { // Object represents an object deployed by a Chart. type Object struct { - Type runtime.Object + Type client.Object Name string } @@ -137,7 +136,7 @@ func (c *Chart) Delete(ctx context.Context, client client.Client, namespace stri // Delete objects for _, o := range c.Objects { if err := o.Delete(ctx, client, namespace); err != nil { - return errors.Wrap(err, "could not delete chart '%s' object") + return errors.Wrap(err, "could not delete chart object") } } @@ -152,17 +151,17 @@ func (c *Chart) Delete(ctx context.Context, client client.Client, namespace stri } // Delete deletes this object from the given namespace using the given client. -func (o *Object) Delete(ctx context.Context, client client.Client, namespace string) error { - obj := o.Type.DeepCopyObject() +func (o *Object) Delete(ctx context.Context, c client.Client, namespace string) error { + obj := o.Type.DeepCopyObject().(client.Object) kind := obj.GetObjectKind().GroupVersionKind().Kind key := objectKey(namespace, o.Name) - if err := client.Get(ctx, key, obj); err != nil { + if err := c.Get(ctx, key, obj); err != nil { if apierrors.IsNotFound(err) { return nil } return errors.Wrapf(err, "could not get %s '%s'", kind, key.String()) } - if err := client.Delete(ctx, obj); err != nil { + if err := c.Delete(ctx, obj); err != nil { return errors.Wrapf(err, "could not delete %s '%s'", kind, key.String()) } return nil @@ -172,24 +171,6 @@ func objectKey(namespace, name string) client.ObjectKey { return client.ObjectKey{Namespace: namespace, Name: name} } -// CopyValues creates a shallow copy of the given Values. -func CopyValues(values map[string]interface{}) map[string]interface{} { - copiedValues := make(map[string]interface{}, len(values)) - for k, v := range values { - copiedValues[k] = v - } - return copiedValues -} - -// ImageMapToValues transforms the given image name to image mapping into chart Values. -func ImageMapToValues(m map[string]*imagevector.Image) map[string]interface{} { - out := make(map[string]interface{}, len(m)) - for k, v := range m { - out[k] = v.String() - } - return out -} - // InjectImages finds the images with the given names and opts, makes a shallow copy of the given // Values and injects a name to image string mapping at the `images` key of that map and returns it. func InjectImages(values map[string]interface{}, v imagevector.ImageVector, names []string, opts ...imagevector.FindOptionFunc) (map[string]interface{}, error) { @@ -198,7 +179,7 @@ func InjectImages(values map[string]interface{}, v imagevector.ImageVector, name return nil, err } - values = CopyValues(values) - values["images"] = ImageMapToValues(images) + values = utils.ShallowCopyMapStringInterface(values) + values["images"] = imagevector.ImageMapToValues(images) return values, nil } diff --git a/vendor/github.com/gardener/gardener/pkg/utils/flow/flow.go b/vendor/github.com/gardener/gardener/pkg/utils/flow/flow.go new file mode 100644 index 00000000..459f1209 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/utils/flow/flow.go @@ -0,0 +1,387 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package flow provides utilities to construct a directed acyclic computational graph +// that is then executed and monitored with maximum parallelism. +package flow + +import ( + "context" + "fmt" + "time" + + "github.com/gardener/gardener/pkg/logger" + utilerrors "github.com/gardener/gardener/pkg/utils/errors" + + "github.com/hashicorp/go-multierror" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" +) + +const ( + logKeyFlow = "flow" + logKeyTask = "task" +) + +// ErrorCleaner is called when a task which errored during the previous reconciliation phase completes with success +type ErrorCleaner func(context.Context, string) + +type nodes map[TaskID]*node + +func (ns nodes) rootIDs() TaskIDs { + roots := NewTaskIDs() + for taskID, node := range ns { + if node.required == 0 { + roots.Insert(taskID) + } + } + return roots +} + +func (ns nodes) getOrCreate(id TaskID) *node { + n, ok := ns[id] + if !ok { + n = &node{} + ns[id] = n + } + return n +} + +// Flow is a validated executable Graph. +type Flow struct { + name string + nodes nodes +} + +// Name retrieves the name of a flow. +func (f *Flow) Name() string { + return f.name +} + +// Len retrieves the amount of tasks in a Flow. +func (f *Flow) Len() int { + return len(f.nodes) +} + +// node is a compiled Task that contains the triggered Tasks, the +// number of triggers the node itself requires and its payload function. +type node struct { + targetIDs TaskIDs + required int + fn TaskFn +} + +func (n *node) String() string { + return fmt.Sprintf("node{targets=%s, required=%d}", n.targetIDs.List(), n.required) +} + +// addTargets adds the given TaskIDs as targets to the node. +func (n *node) addTargets(taskIDs ...TaskID) { + if n.targetIDs == nil { + n.targetIDs = NewTaskIDs(TaskIDSlice(taskIDs)) + return + } + n.targetIDs.Insert(TaskIDSlice(taskIDs)) +} + +// Opts are options for a Flow execution. If they are not set, they +// are left blank and don't affect the Flow. +type Opts struct { + Logger logrus.FieldLogger + ProgressReporter ProgressReporter + ErrorCleaner func(ctx context.Context, taskID string) + ErrorContext *utilerrors.ErrorContext + Context context.Context +} + +// Run starts an execution of a Flow. +// It blocks until the Flow has finished and returns the error, if any. +func (f *Flow) Run(opts Opts) error { + ctx := opts.Context + if ctx == nil { + ctx = context.Background() + } + return newExecution(f, opts.Logger, opts.ProgressReporter, opts.ErrorCleaner, opts.ErrorContext).run(ctx) +} + +type nodeResult struct { + TaskID TaskID + Error error +} + +// Stats are the statistics of a Flow execution. +type Stats struct { + FlowName string + All TaskIDs + Succeeded TaskIDs + Failed TaskIDs + Running TaskIDs + Pending TaskIDs +} + +// ProgressPercent retrieves the progress of a Flow execution in percent. +func (s *Stats) ProgressPercent() int32 { + progress := (100 * s.Succeeded.Len()) / s.All.Len() + return int32(progress) +} + +// Copy deeply copies a Stats object. +func (s *Stats) Copy() *Stats { + return &Stats{ + s.FlowName, + s.All.Copy(), + s.Succeeded.Copy(), + s.Failed.Copy(), + s.Running.Copy(), + s.Pending.Copy(), + } +} + +// InitialStats creates a new Stats object with the given set of initial TaskIDs. +// The initial TaskIDs are added to all TaskIDs as well as to the pending ones. +func InitialStats(flowName string, all TaskIDs) *Stats { + return &Stats{ + flowName, + all, + NewTaskIDs(), + NewTaskIDs(), + NewTaskIDs(), + all.Copy(), + } +} + +func newExecution(flow *Flow, log logrus.FieldLogger, progressReporter ProgressReporter, errorCleaner ErrorCleaner, errorContext *utilerrors.ErrorContext) *execution { + all := NewTaskIDs() + + for name := range flow.nodes { + all.Insert(name) + } + + if log == nil { + log = logger.NewNopLogger() + } + log = log.WithField(logKeyFlow, flow.name) + + return &execution{ + flow, + InitialStats(flow.name, all), + nil, + log, + progressReporter, + errorCleaner, + errorContext, + make(chan *nodeResult), + make(map[TaskID]int), + } +} + +type execution struct { + flow *Flow + + stats *Stats + taskErrors []error + + log logrus.FieldLogger + progressReporter ProgressReporter + errorCleaner ErrorCleaner + errorContext *utilerrors.ErrorContext + + done chan *nodeResult + triggerCounts map[TaskID]int +} + +func (e *execution) Log() logrus.FieldLogger { + return e.log +} + +func (e *execution) runNode(ctx context.Context, id TaskID) { + if e.errorContext != nil { + e.errorContext.AddErrorID(string(id)) + } + e.stats.Pending.Delete(id) + e.stats.Running.Insert(id) + go func() { + log := e.log.WithField(logKeyTask, id) + + start := time.Now().UTC() + log.Debugf("Started") + err := e.flow.nodes[id].fn(ctx) + end := time.Now().UTC() + log.Debugf("Finished, took %s", end.Sub(start)) + + if err != nil { + log.WithError(err).Error("Error") + } else { + log.Info("Succeeded") + } + + err = errors.Wrapf(err, "task %q failed", id) + e.done <- &nodeResult{TaskID: id, Error: err} + }() +} + +func (e *execution) updateSuccess(id TaskID) { + e.stats.Running.Delete(id) + e.stats.Succeeded.Insert(id) +} + +func (e *execution) updateFailure(id TaskID) { + e.stats.Running.Delete(id) + e.stats.Failed.Insert(id) +} + +func (e *execution) processTriggers(ctx context.Context, id TaskID) { + node := e.flow.nodes[id] + for target := range node.targetIDs { + e.triggerCounts[target]++ + if e.triggerCounts[target] == e.flow.nodes[target].required { + e.runNode(ctx, target) + } + } +} + +func (e *execution) cleanErrors(ctx context.Context, taskID TaskID) { + if e.errorCleaner != nil { + e.errorCleaner(ctx, string(taskID)) + } +} + +func (e *execution) reportProgress(ctx context.Context) { + if e.progressReporter != nil { + e.progressReporter.Report(ctx, e.stats.Copy()) + } +} + +func (e *execution) run(ctx context.Context) error { + defer close(e.done) + + if e.progressReporter != nil { + if err := e.progressReporter.Start(ctx); err != nil { + return err + } + defer e.progressReporter.Stop() + } + + e.log.Info("Starting") + e.reportProgress(ctx) + + var ( + cancelErr error + roots = e.flow.nodes.rootIDs() + ) + for name := range roots { + if cancelErr = ctx.Err(); cancelErr == nil { + e.runNode(ctx, name) + } + } + e.reportProgress(ctx) + + for e.stats.Running.Len() > 0 { + result := <-e.done + if result.Error != nil { + e.taskErrors = append(e.taskErrors, utilerrors.WithID(string(result.TaskID), result.Error)) + e.updateFailure(result.TaskID) + } else { + e.updateSuccess(result.TaskID) + if e.errorContext != nil && e.errorContext.HasLastErrorWithID(string(result.TaskID)) { + e.cleanErrors(ctx, result.TaskID) + } + if cancelErr = ctx.Err(); cancelErr == nil { + e.processTriggers(ctx, result.TaskID) + } + } + e.reportProgress(ctx) + } + + e.log.Info("Finished") + return e.result(cancelErr) +} + +func (e *execution) result(cancelErr error) error { + if cancelErr != nil { + return &flowCanceled{ + name: e.flow.name, + taskErrors: e.taskErrors, + cause: cancelErr, + } + } + + if len(e.taskErrors) > 0 { + return &flowFailed{ + name: e.flow.name, + taskErrors: e.taskErrors, + } + } + return nil +} + +type flowCanceled struct { + name string + taskErrors []error + cause error +} + +type flowFailed struct { + name string + taskErrors []error +} + +func (f *flowCanceled) Error() string { + if len(f.taskErrors) == 0 { + return fmt.Sprintf("flow %q was canceled: %v", f.name, f.cause) + } + return fmt.Sprintf("flow %q was canceled: %v. Encountered task errors: %v", + f.name, f.cause, f.taskErrors) +} + +func (f *flowCanceled) Cause() error { + return f.cause +} + +func (f *flowFailed) Error() string { + return fmt.Sprintf("flow %q encountered task errors: %v", f.name, f.taskErrors) +} + +func (f *flowFailed) Cause() error { + return &multierror.Error{Errors: f.taskErrors} +} + +// Errors reports all wrapped Task errors of the given Flow error. +func Errors(err error) *multierror.Error { + switch e := err.(type) { + case *flowCanceled: + return &multierror.Error{Errors: e.taskErrors} + case *flowFailed: + return &multierror.Error{Errors: e.taskErrors} + } + return nil +} + +// Causes reports the causes of all Task errors of the given Flow error. +func Causes(err error) *multierror.Error { + var ( + errs = Errors(err).Errors + causes = make([]error, 0, len(errs)) + ) + for _, err := range errs { + causes = append(causes, errors.Cause(err)) + } + return &multierror.Error{Errors: causes} +} + +// WasCanceled determines whether the given flow error was caused by cancellation. +func WasCanceled(err error) bool { + _, ok := err.(*flowCanceled) + return ok +} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/flow/graph.go b/vendor/github.com/gardener/gardener/pkg/utils/flow/graph.go new file mode 100644 index 00000000..8dc29204 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/utils/flow/graph.go @@ -0,0 +1,101 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package flow + +import ( + "fmt" +) + +// Task is a unit of work. It has a name, a payload function and a set of dependencies. +// A is only started once all its dependencies have been completed successfully. +type Task struct { + Name string + Fn TaskFn + Dependencies TaskIDs +} + +// Spec returns the TaskSpec of a task. +func (t *Task) Spec() *TaskSpec { + return &TaskSpec{ + t.Fn, + t.Dependencies.Copy(), + } +} + +// TaskSpec is functional body of a Task, consisting only of the payload function and +// the dependencies of the Task. +type TaskSpec struct { + Fn TaskFn + Dependencies TaskIDs +} + +// Tasks is a mapping from TaskID to TaskSpec. +type Tasks map[TaskID]*TaskSpec + +// Graph is a builder for a Flow. +type Graph struct { + name string + tasks Tasks +} + +// Name returns the name of a graph. +func (g *Graph) Name() string { + return g.name +} + +// NewGraph returns a new Graph with the given name. +func NewGraph(name string) *Graph { + return &Graph{name: name, tasks: make(Tasks)} +} + +// Add adds the given Task to the graph. +// This panics if +// - There is already a Task present with the same name +// - One of the dependencies of the Task is not present +func (g *Graph) Add(task Task) TaskID { + id := TaskID(task.Name) + if _, ok := g.tasks[id]; ok { + panic(fmt.Sprintf("Task with id %q already exists", id)) + } + spec := task.Spec() + for dependencyID := range spec.Dependencies { + if _, ok := g.tasks[dependencyID]; !ok { + panic(fmt.Sprintf("Task %q is missing dependency %q", id, dependencyID)) + } + } + g.tasks[id] = task.Spec() + return id +} + +// Compile compiles the graph into an executable Flow. +func (g *Graph) Compile() *Flow { + nodes := make(nodes, len(g.tasks)) + + for taskName, taskSpec := range g.tasks { + for dependencyID := range taskSpec.Dependencies { + dependency := nodes.getOrCreate(dependencyID) + dependency.addTargets(taskName) + } + + node := nodes.getOrCreate(taskName) + node.fn = taskSpec.Fn + node.required = taskSpec.Dependencies.Len() + } + + return &Flow{ + g.name, + nodes, + } +} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/event.go b/vendor/github.com/gardener/gardener/pkg/utils/flow/progress_reporter.go similarity index 57% rename from vendor/github.com/gardener/gardener/pkg/utils/kubernetes/event.go rename to vendor/github.com/gardener/gardener/pkg/utils/flow/progress_reporter.go index 8280af60..4acdc8d3 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/event.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/flow/progress_reporter.go @@ -12,24 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -package kubernetes +package flow -import corev1 "k8s.io/api/core/v1" +import ( + "context" +) -// SortableEvents implements sort.Interface for []api.Event based on the Timestamp field. -type SortableEvents []corev1.Event +// ProgressReporterFn is continuously called on progress in a flow. +type ProgressReporterFn func(context.Context, *Stats) -// Len implements sort.Interface. -func (list SortableEvents) Len() int { - return len(list) -} - -// Swap implements sort.Interface. -func (list SortableEvents) Swap(i, j int) { - list[i], list[j] = list[j], list[i] -} - -// Less implements sort.Interface. -func (list SortableEvents) Less(i, j int) bool { - return list[i].LastTimestamp.Time.Before(list[j].LastTimestamp.Time) +// ProgressReporter is used to report the current progress of a flow. +type ProgressReporter interface { + // Start starts the progress reporter. + Start(context.Context) error + // Stop stops the progress reporter. + Stop() + // Report reports the progress using the current statistics. + Report(context.Context, *Stats) } diff --git a/vendor/github.com/gardener/gardener/pkg/utils/flow/progress_reporter_delaying.go b/vendor/github.com/gardener/gardener/pkg/utils/flow/progress_reporter_delaying.go new file mode 100644 index 00000000..c49c4111 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/utils/flow/progress_reporter_delaying.go @@ -0,0 +1,117 @@ +// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package flow + +import ( + "context" + "fmt" + "sync" + "time" +) + +type progressReporterDelaying struct { + lock sync.Mutex + ctx context.Context + ctxCancel context.CancelFunc + reporterFn ProgressReporterFn + period time.Duration + timer *time.Timer + pendingProgress *Stats + delayProgressReport bool +} + +// NewDelayingProgressReporter returns a new progress reporter with the given function and the configured period. A +// period of `0` will lead to immediate reports as soon as flow tasks are completed. +func NewDelayingProgressReporter(reporterFn ProgressReporterFn, period time.Duration) ProgressReporter { + return &progressReporterDelaying{ + reporterFn: reporterFn, + period: period, + } +} + +func (p *progressReporterDelaying) Start(ctx context.Context) error { + p.lock.Lock() + defer p.lock.Unlock() + + if p.timer != nil { + return fmt.Errorf("progress reporter has already been started") + } + + // We store the context on the progressReporterDelaying object so that we can call the reporterFn with the original + // context - otherwise, the final state cannot be reported because the cancel context will already be canceled + p.ctx = ctx + + if p.period > 0 { + p.timer = time.NewTimer(p.period) + + ctx, cancel := context.WithCancel(ctx) + p.ctxCancel = cancel + + go p.run(ctx) + } + + return nil +} + +func (p *progressReporterDelaying) Stop() { + p.lock.Lock() + + if p.ctxCancel != nil { + p.ctxCancel() + } + + p.ctxCancel = nil + p.timer = nil + p.lock.Unlock() + p.report() +} + +func (p *progressReporterDelaying) Report(_ context.Context, pendingProgress *Stats) { + p.lock.Lock() + defer p.lock.Unlock() + + if p.timer != nil && p.delayProgressReport { + p.pendingProgress = pendingProgress + return + } + + p.reporterFn(p.ctx, pendingProgress) + p.delayProgressReport = true +} + +func (p *progressReporterDelaying) run(ctx context.Context) { + timer := p.timer + for timer != nil { + select { + case <-timer.C: + timer.Reset(p.period) + p.report() + + case <-ctx.Done(): + timer.Stop() + return + } + } +} + +func (p *progressReporterDelaying) report() { + p.lock.Lock() + defer p.lock.Unlock() + + if p.pendingProgress != nil { + p.reporterFn(p.ctx, p.pendingProgress) + p.pendingProgress = nil + } +} diff --git a/vendor/github.com/gardener/gardener/pkg/api/extensions/utils.go b/vendor/github.com/gardener/gardener/pkg/utils/flow/progress_reporter_immediate.go similarity index 51% rename from vendor/github.com/gardener/gardener/pkg/api/extensions/utils.go rename to vendor/github.com/gardener/gardener/pkg/utils/flow/progress_reporter_immediate.go index b9475f0f..d3f293d0 100644 --- a/vendor/github.com/gardener/gardener/pkg/api/extensions/utils.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/flow/progress_reporter_immediate.go @@ -12,24 +12,25 @@ // See the License for the specific language governing permissions and // limitations under the License. -package extensions +package flow import ( - extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" - "k8s.io/apimachinery/pkg/runtime" + "context" ) -// GetShootNamespacedCRsLists returns an empty CR list struct, for each CR used for Shoot managment -func GetShootNamespacedCRsLists() []runtime.Object { - return []runtime.Object{ - &extensionsv1alpha1.ControlPlaneList{}, - &extensionsv1alpha1.ExtensionList{}, - &extensionsv1alpha1.InfrastructureList{}, - //The Network CR is now handled as a shoot component - //&extensionsv1alpha1.NetworkList{}, - &extensionsv1alpha1.OperatingSystemConfigList{}, - &extensionsv1alpha1.WorkerList{}, - //The ContainerRuntime CR is now handled as a shoot component - //&extensionsv1alpha1.ContainerRuntimeList{}, +type progressReporterImmediate struct { + reporterFn ProgressReporterFn +} + +// NewImmediateProgressReporter returns a new progress reporter with the given function. +func NewImmediateProgressReporter(reporterFn ProgressReporterFn) ProgressReporter { + return progressReporterImmediate{ + reporterFn: reporterFn, } } + +func (p progressReporterImmediate) Start(context.Context) error { return nil } +func (p progressReporterImmediate) Stop() {} +func (p progressReporterImmediate) Report(ctx context.Context, stats *Stats) { + p.reporterFn(ctx, stats) +} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/flow/taskfn.go b/vendor/github.com/gardener/gardener/pkg/utils/flow/taskfn.go new file mode 100644 index 00000000..64ef5921 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/utils/flow/taskfn.go @@ -0,0 +1,181 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package flow + +import ( + "context" + "sync" + "time" + + "github.com/gardener/gardener/pkg/utils/retry" + + "github.com/hashicorp/go-multierror" +) + +var ( + // ContextWithTimeout is context.WithTimeout. Exposed for testing. + ContextWithTimeout = context.WithTimeout +) + +// TaskFn is a payload function of a task. +type TaskFn func(ctx context.Context) error + +// RecoverFn is a function that can recover an error. +type RecoverFn func(ctx context.Context, err error) error + +// EmptyTaskFn is a TaskFn that does nothing (returns nil). +var EmptyTaskFn TaskFn = func(ctx context.Context) error { return nil } + +// SkipIf returns a TaskFn that does nothing if the condition is true, otherwise the function +// will be executed once called. +func (t TaskFn) SkipIf(condition bool) TaskFn { + if condition { + return EmptyTaskFn + } + return t +} + +// DoIf returns a TaskFn that will be executed if the condition is true when it is called. +// Otherwise, it will do nothing when called. +func (t TaskFn) DoIf(condition bool) TaskFn { + return t.SkipIf(!condition) +} + +// Timeout returns a TaskFn that is bound to a context which times out. +func (t TaskFn) Timeout(timeout time.Duration) TaskFn { + return func(ctx context.Context) error { + var cancel func() + ctx, cancel = context.WithTimeout(ctx, timeout) + defer cancel() + + return t(ctx) + } +} + +// RetryUntilTimeout returns a TaskFn that is retried until the timeout is reached. +func (t TaskFn) RetryUntilTimeout(interval, timeout time.Duration) TaskFn { + return func(ctx context.Context) error { + ctx, cancel := context.WithTimeout(ctx, timeout) + defer cancel() + + return retry.Until(ctx, interval, func(ctx context.Context) (done bool, err error) { + if err := t(ctx); err != nil { + return retry.MinorError(err) + } + return retry.Ok() + }) + } +} + +// ToRecoverFn converts the TaskFn to a RecoverFn that ignores the incoming error. +func (t TaskFn) ToRecoverFn() RecoverFn { + return func(ctx context.Context, _ error) error { + return t(ctx) + } +} + +// Recover creates a new TaskFn that recovers an error with the given RecoverFn. +func (t TaskFn) Recover(recoverFn RecoverFn) TaskFn { + return func(ctx context.Context) error { + if err := t(ctx); err != nil { + if ctx.Err() != nil { + return err + } + return recoverFn(ctx, err) + } + return nil + } +} + +// Sequential runs the given TaskFns sequentially. +func Sequential(fns ...TaskFn) TaskFn { + return func(ctx context.Context) error { + for _, fn := range fns { + if err := fn(ctx); err != nil { + return err + } + + if err := ctx.Err(); err != nil { + return err + } + } + return nil + } +} + +// Parallel runs the given TaskFns in parallel, collecting their errors in a multierror. +func Parallel(fns ...TaskFn) TaskFn { + return func(ctx context.Context) error { + var ( + wg sync.WaitGroup + errors = make(chan error) + result error + ) + + for _, fn := range fns { + t := fn + wg.Add(1) + go func() { + defer wg.Done() + errors <- t(ctx) + }() + } + + go func() { + defer close(errors) + wg.Wait() + }() + + for err := range errors { + if err != nil { + result = multierror.Append(result, err) + } + } + return result + } +} + +// ParallelExitOnError runs the given TaskFns in parallel and stops execution as soon as one TaskFn returns an error. +func ParallelExitOnError(fns ...TaskFn) TaskFn { + return func(ctx context.Context) error { + var ( + wg sync.WaitGroup + errors = make(chan error) + subCtx, cancel = context.WithCancel(ctx) + ) + defer cancel() + + for _, fn := range fns { + t := fn + wg.Add(1) + go func() { + defer wg.Done() + errors <- t(subCtx) + }() + } + + go func() { + defer close(errors) + wg.Wait() + }() + + for err := range errors { + if err != nil { + return err + } + } + return nil + } +} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/flow/taskid.go b/vendor/github.com/gardener/gardener/pkg/utils/flow/taskid.go new file mode 100644 index 00000000..e786fa82 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/utils/flow/taskid.go @@ -0,0 +1,155 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package flow + +import "sort" + +// TaskID is an id of a task. +type TaskID string + +// TaskIDs retrieves this TaskID as a singleton slice. +func (t TaskID) TaskIDs() []TaskID { + return []TaskID{t} +} + +// TaskIDs is a set of TaskID. +type TaskIDs map[TaskID]struct{} + +// TaskIDs retrieves all TaskIDs as an unsorted slice. +func (t TaskIDs) TaskIDs() []TaskID { + return t.UnsortedList() +} + +// TaskIDer can produce a slice of TaskIDs. +// Default implementations of this are +// TaskIDs, TaskID and TaskIDSlice +type TaskIDer interface { + // TaskIDs reports all TaskIDs of this TaskIDer. + TaskIDs() []TaskID +} + +// NewTaskIDs returns a new set of TaskIDs initialized +// to contain all TaskIDs of the given TaskIDers. +func NewTaskIDs(ids ...TaskIDer) TaskIDs { + set := make(TaskIDs) + set.Insert(ids...) + return set +} + +// Insert inserts the TaskIDs of all TaskIDers into +// this TaskIDs. +func (t TaskIDs) Insert(iders ...TaskIDer) TaskIDs { + for _, ider := range iders { + for _, id := range ider.TaskIDs() { + t[id] = struct{}{} + } + } + return t +} + +// InsertIf inserts the TaskIDs of all TaskIDers into +// this TaskIDs if the given condition evaluates to true. +func (t TaskIDs) InsertIf(condition bool, iders ...TaskIDer) TaskIDs { + if condition { + return t.Insert(iders...) + } + return t +} + +// Delete deletes the TaskIDs of all TaskIDers from +// this TaskIDs. +func (t TaskIDs) Delete(iders ...TaskIDer) TaskIDs { + for _, ider := range iders { + for _, id := range ider.TaskIDs() { + delete(t, id) + } + } + return t +} + +// Len returns the amount of TaskIDs this contains. +func (t TaskIDs) Len() int { + return len(t) +} + +// Has checks if the given TaskID is present in this set. +func (t TaskIDs) Has(id TaskID) bool { + _, ok := t[id] + return ok +} + +// Copy makes a deep copy of this TaskIDs. +func (t TaskIDs) Copy() TaskIDs { + out := make(TaskIDs, len(t)) + for k := range t { + out[k] = struct{}{} + } + return out +} + +// UnsortedList returns the elements of this in an unordered slice. +func (t TaskIDs) UnsortedList() TaskIDSlice { + out := make([]TaskID, 0, len(t)) + for k := range t { + out = append(out, k) + } + return out +} + +// List returns the elements of this in an ordered slice. +func (t TaskIDs) List() TaskIDSlice { + out := make(TaskIDSlice, 0, len(t)) + for k := range t { + out = append(out, k) + } + sort.Sort(out) + return out +} + +// UnsortedStringList returns the elements of this in an unordered string slice. +func (t TaskIDs) UnsortedStringList() []string { + out := make([]string, 0, len(t)) + for k := range t { + out = append(out, string(k)) + } + return out +} + +// StringList returns the elements of this in an ordered string slice. +func (t TaskIDs) StringList() []string { + out := t.UnsortedStringList() + sort.Strings(out) + return out +} + +// TaskIDSlice is a slice of TaskIDs. +type TaskIDSlice []TaskID + +// TaskIDs returns this as a slice of TaskIDs. +func (t TaskIDSlice) TaskIDs() []TaskID { + return t +} + +func (t TaskIDSlice) Len() int { + return len(t) +} + +func (t TaskIDSlice) Less(i1, i2 int) bool { + return t[i1] < t[i2] +} + +func (t TaskIDSlice) Swap(i1, i2 int) { + t[i1], t[i2] = t[i2], t[i1] +} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/imagevector/imagevector.go b/vendor/github.com/gardener/gardener/pkg/utils/imagevector/imagevector.go index 6dcfa339..597fee2d 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/imagevector/imagevector.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/imagevector/imagevector.go @@ -199,7 +199,7 @@ func TargetVersion(version string) FindOptionFunc { } } -var r = regexp.MustCompile(`^(v?[0-9]+|=)`) +var r = regexp.MustCompile(`^(v?[0-9]+\.[0-9]+\.[0-9]+|=)`) func checkConstraint(constraint, version *string) (score int, ok bool, err error) { if constraint == nil || version == nil { @@ -326,3 +326,12 @@ func (i *Image) String() string { return i.Repository + delimiter + *i.Tag } + +// ImageMapToValues transforms the given image name to image mapping into chart Values. +func ImageMapToValues(m map[string]*Image) map[string]interface{} { + out := make(map[string]interface{}, len(m)) + for k, v := range m { + out[k] = v.String() + } + return out +} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/health/and.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/health/and.go index efe6c021..b41efa23 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/health/and.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/health/and.go @@ -15,16 +15,16 @@ package health import ( - "k8s.io/apimachinery/pkg/runtime" + "sigs.k8s.io/controller-runtime/pkg/client" ) // Func is a type for a function that checks the health of a runtime.Object. -type Func func(runtime.Object) error +type Func func(client.Object) error // And combines multiple health check funcs to a single func, checking all funcs sequentially and return the first // error that occurs or nil if no error occurs.¬ func And(fns ...Func) Func { - return func(o runtime.Object) error { + return func(o client.Object) error { for _, fn := range fns { if err := fn(o); err != nil { return err diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/health/health.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/health/health.go index 283456ba..8b47f8d8 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/health/health.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/health/health.go @@ -22,20 +22,23 @@ import ( druidv1alpha1 "github.com/gardener/etcd-druid/api/v1alpha1" resourcesv1alpha1 "github.com/gardener/gardener-resource-manager/pkg/apis/resources/v1alpha1" + "github.com/sirupsen/logrus" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/rest" + "sigs.k8s.io/controller-runtime/pkg/client" gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" gardencorev1beta1helper "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" + seedmanagementv1alpha1 "github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1" + "github.com/gardener/gardener/pkg/client/kubernetes" "github.com/gardener/gardener/pkg/utils" - "github.com/sirupsen/logrus" + "github.com/gardener/gardener/pkg/utils/retry" ) func requiredConditionMissing(conditionType string) error { @@ -282,13 +285,39 @@ func checkSeed(seed *gardencorev1beta1.Seed, identity *gardencorev1beta1.Gardene return nil } +var ( + managedSeedConditionTypes = []gardencorev1beta1.ConditionType{ + seedmanagementv1alpha1.ManagedSeedShootReconciled, + seedmanagementv1alpha1.ManagedSeedSeedRegistered, + } +) + +// CheckManagedSeed checks if the given ManagedSeed is up-to-date and if its Seed has been registered. +func CheckManagedSeed(managedSeed *seedmanagementv1alpha1.ManagedSeed) error { + if managedSeed.Status.ObservedGeneration < managedSeed.Generation { + return fmt.Errorf("observed generation outdated (%d/%d)", managedSeed.Status.ObservedGeneration, managedSeed.Generation) + } + + for _, conditionType := range managedSeedConditionTypes { + condition := gardencorev1beta1helper.GetCondition(managedSeed.Status.Conditions, conditionType) + if condition == nil { + return requiredConditionMissing(string(conditionType)) + } + if err := checkConditionState(string(conditionType), string(gardencorev1beta1.ConditionTrue), string(condition.Status), condition.Reason, condition.Message); err != nil { + return err + } + } + + return nil +} + // CheckExtensionObject checks if an extension Object is healthy or not. // An extension object is healthy if // * Its observed generation is up-to-date // * No gardener.cloud/operation is set // * No lastError is in the status // * A last operation is state succeeded is present -func CheckExtensionObject(o runtime.Object) error { +func CheckExtensionObject(o client.Object) error { obj, ok := o.(extensionsv1alpha1.Object) if !ok { return fmt.Errorf("expected extensionsv1alpha1.Object but got %T", o) @@ -301,7 +330,7 @@ func CheckExtensionObject(o runtime.Object) error { // ExtensionOperationHasBeenUpdatedSince returns a health check function that checks if an extension Object's last // operation has been updated since `lastUpdateTime`. func ExtensionOperationHasBeenUpdatedSince(lastUpdateTime metav1.Time) Func { - return func(o runtime.Object) error { + return func(o client.Object) error { obj, ok := o.(extensionsv1alpha1.Object) if !ok { return fmt.Errorf("expected extensionsv1alpha1.Object but got %T", o) @@ -316,7 +345,7 @@ func ExtensionOperationHasBeenUpdatedSince(lastUpdateTime metav1.Time) Func { } // CheckBackupBucket checks if an backup bucket Object is healthy or not. -func CheckBackupBucket(bb runtime.Object) error { +func CheckBackupBucket(bb client.Object) error { obj, ok := bb.(*gardencorev1beta1.BackupBucket) if !ok { return fmt.Errorf("expected gardencorev1beta1.BackupBucket but got %T", bb) @@ -423,3 +452,32 @@ func getManagedResourceCondition(conditions []resourcesv1alpha1.ManagedResourceC } return nil } + +// CheckTunnelConnection checks if the tunnel connection between the control plane and the shoot networks +// is established. +func CheckTunnelConnection(ctx context.Context, shootClient kubernetes.Interface, logger logrus.FieldLogger, tunnelName string) (bool, error) { + podList := &corev1.PodList{} + if err := shootClient.Client().List(ctx, podList, client.InNamespace(metav1.NamespaceSystem), client.MatchingLabels{"app": tunnelName}); err != nil { + return retry.SevereError(err) + } + + var tunnelPod *corev1.Pod + for _, pod := range podList.Items { + if pod.Status.Phase == corev1.PodRunning { + tunnelPod = &pod + break + } + } + + if tunnelPod == nil { + logger.Infof("Waiting until a running %s pod exists in the Shoot cluster...", tunnelName) + return retry.MinorError(fmt.Errorf("no running %s pod found yet in the shoot cluster", tunnelName)) + } + if err := shootClient.CheckForwardPodPort(tunnelPod.Namespace, tunnelPod.Name, 0, 22); err != nil { + logger.Info("Waiting until the tunnel connection has been established...") + return retry.MinorError(fmt.Errorf("could not forward to %s pod: %v", tunnelName, err)) + } + + logger.Info("Tunnel connection has been established.") + return retry.Ok() +} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/kubernetes.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/kubernetes.go index acc470f7..6a0ac745 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/kubernetes.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/kubernetes.go @@ -27,14 +27,18 @@ import ( "github.com/gardener/gardener/pkg/utils/retry" "github.com/sirupsen/logrus" + appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/duration" "k8s.io/apimachinery/pkg/util/intstr" + corev1client "k8s.io/client-go/kubernetes/typed/core/v1" "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/client/apiutil" ) // TruncateLabelValue truncates a string at 63 characters so it's suitable for a label value. @@ -73,15 +77,6 @@ func HasMetaDataAnnotation(meta metav1.Object, key, value string) bool { return ok && val == value } -// HasDeletionTimestamp checks if an object has a deletion timestamp -func HasDeletionTimestamp(obj runtime.Object) (bool, error) { - metadata, err := meta.Accessor(obj) - if err != nil { - return false, err - } - return metadata.GetDeletionTimestamp() != nil, nil -} - func nameAndNamespace(namespaceOrName string, nameOpt ...string) (namespace, name string) { if len(nameOpt) > 1 { panic(fmt.Sprintf("more than name/namespace for key specified: %s/%v", namespaceOrName, nameOpt)) @@ -106,11 +101,6 @@ func Key(namespaceOrName string, nameOpt ...string) client.ObjectKey { return client.ObjectKey{Namespace: namespace, Name: name} } -// KeyFromObject obtains the client.ObjectKey from the given metav1.Object. -func KeyFromObject(obj metav1.Object) client.ObjectKey { - return Key(obj.GetNamespace(), obj.GetName()) -} - // ObjectMeta creates a new metav1.ObjectMeta from the given parameters. // There are only two ways to call this function: // - If only namespaceOrName is set, then a metav1.ObjectMeta with name set to namespaceOrName is returned. @@ -129,12 +119,8 @@ func ObjectMetaFromKey(key client.ObjectKey) metav1.ObjectMeta { // WaitUntilResourceDeleted deletes the given resource and then waits until it has been deleted. It respects the // given interval and timeout. -func WaitUntilResourceDeleted(ctx context.Context, c client.Client, obj runtime.Object, interval time.Duration) error { - key, err := client.ObjectKeyFromObject(obj) - if err != nil { - return err - } - +func WaitUntilResourceDeleted(ctx context.Context, c client.Client, obj client.Object, interval time.Duration) error { + key := client.ObjectKeyFromObject(obj) return retry.Until(ctx, interval, func(ctx context.Context) (done bool, err error) { if err := c.Get(ctx, key, obj); err != nil { if apierrors.IsNotFound(err) { @@ -148,17 +134,17 @@ func WaitUntilResourceDeleted(ctx context.Context, c client.Client, obj runtime. // WaitUntilResourcesDeleted waits until the given resources are gone. // It respects the given interval and timeout. -func WaitUntilResourcesDeleted(ctx context.Context, c client.Client, obj runtime.Object, interval time.Duration, opts ...client.ListOption) error { +func WaitUntilResourcesDeleted(ctx context.Context, c client.Client, list client.ObjectList, interval time.Duration, opts ...client.ListOption) error { return retry.Until(ctx, interval, func(ctx context.Context) (done bool, err error) { - if err := c.List(ctx, obj, opts...); err != nil { + if err := c.List(ctx, list, opts...); err != nil { return retry.SevereError(err) } - if meta.LenList(obj) == 0 { + if meta.LenList(list) == 0 { return retry.Ok() } var remainingItems []string acc := meta.NewAccessor() - if err := meta.EachListItem(obj, func(remainingObj runtime.Object) error { + if err := meta.EachListItem(list, func(remainingObj runtime.Object) error { name, err := acc.Name(remainingObj) if err != nil { return err @@ -174,7 +160,7 @@ func WaitUntilResourcesDeleted(ctx context.Context, c client.Client, obj runtime // WaitUntilResourceDeletedWithDefaults deletes the given resource and then waits until it has been deleted. It // uses a default interval and timeout -func WaitUntilResourceDeletedWithDefaults(ctx context.Context, c client.Client, obj runtime.Object) error { +func WaitUntilResourceDeletedWithDefaults(ctx context.Context, c client.Client, obj client.Object) error { ctx, cancel := context.WithTimeout(ctx, 10*time.Minute) defer cancel() @@ -184,9 +170,12 @@ func WaitUntilResourceDeletedWithDefaults(ctx context.Context, c client.Client, // WaitUntilLoadBalancerIsReady waits until the given external load balancer has // been created (i.e., its ingress information has been updated in the service status). func WaitUntilLoadBalancerIsReady(ctx context.Context, kubeClient kubernetes.Interface, namespace, name string, timeout time.Duration, logger *logrus.Entry) (string, error) { - var loadBalancerIngress string + var ( + loadBalancerIngress string + service = &corev1.Service{ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}} + ) if err := retry.UntilTimeout(ctx, 5*time.Second, timeout, func(ctx context.Context) (done bool, err error) { - loadBalancerIngress, err = GetLoadBalancerIngress(ctx, kubeClient.Client(), namespace, name) + loadBalancerIngress, err = GetLoadBalancerIngress(ctx, kubeClient.Client(), service) if err != nil { logger.Infof("Waiting until the %s service deployed is ready...", name) // TODO(AC): This is a quite optimistic check / we should differentiate here @@ -194,35 +183,29 @@ func WaitUntilLoadBalancerIsReady(ctx context.Context, kubeClient kubernetes.Int } return retry.Ok() }); err != nil { - fieldSelector := client.MatchingFields{ - "involvedObject.kind": "Service", - "involvedObject.name": name, - "involvedObject.namespace": namespace, - "type": corev1.EventTypeWarning, - } - eventList := &corev1.EventList{} - if err2 := kubeClient.DirectClient().List(ctx, eventList, fieldSelector); err2 != nil { - return "", fmt.Errorf("error '%v' occured while fetching more details on error '%v'", err2, err) - } + const eventsLimit = 2 - if len(eventList.Items) > 0 { - eventsErrorMessage := buildEventsErrorMessage(eventList.Items) + eventsErrorMessage, err2 := FetchEventMessages(ctx, kubeClient.DirectClient(), service, corev1.EventTypeWarning, eventsLimit) + if err2 != nil { + logger.Errorf("error %q occured while fetching events for error %q", err2, err) + return "", fmt.Errorf("'%w' occurred but could not fetch events for more information", err) + } + if eventsErrorMessage != "" { errorMessage := err.Error() + "\n\n" + eventsErrorMessage return "", errors.New(errorMessage) } - return "", err } return loadBalancerIngress, nil } -// GetLoadBalancerIngress takes a context, a client, a namespace and a service name. It queries for a load balancer's technical name -// (ip address or hostname). It returns the value of the technical name whereby it always prefers the hostname (if given) -// over the IP address. It also returns the list of all load balancer ingresses. -func GetLoadBalancerIngress(ctx context.Context, client client.Client, namespace, name string) (string, error) { - service := &corev1.Service{} - if err := client.Get(ctx, Key(namespace, name), service); err != nil { +// GetLoadBalancerIngress takes a context, a client, a service object. It gets the `service` and +// queries for a load balancer's technical name (ip address or hostname). It returns the value of the technical name +// whereby it always prefers the hostname (if given) over the IP address. +// The passed `service` instance is updated with the information received from the API server. +func GetLoadBalancerIngress(ctx context.Context, c client.Client, service *corev1.Service) (string, error) { + if err := c.Get(ctx, client.ObjectKeyFromObject(service), service); err != nil { return "", err } @@ -246,7 +229,7 @@ func GetLoadBalancerIngress(ctx context.Context, client client.Client, namespace // LookupObject retrieves an obj for the given object key dealing with potential stale cache that still does not contain the obj. // It first tries to retrieve the obj using the given cached client. // If the object key is not found, then it does live lookup from the API server using the given apiReader. -func LookupObject(ctx context.Context, c client.Client, apiReader client.Reader, key client.ObjectKey, obj runtime.Object) error { +func LookupObject(ctx context.Context, c client.Client, apiReader client.Reader, key client.ObjectKey, obj client.Object) error { err := c.Get(ctx, key, obj) if err == nil { return nil @@ -316,10 +299,58 @@ func ReconcileServicePorts(existingPorts []corev1.ServicePort, desiredPorts []co return out } -func buildEventsErrorMessage(events []corev1.Event) string { - sort.Sort(SortableEvents(events)) +// FetchEventMessages gets events for the given object of the given `eventType` and returns them as a formatted output. +// The function expects that the given `obj` is specified with a proper `metav1.TypeMeta`. +func FetchEventMessages(ctx context.Context, c client.Client, obj client.Object, eventType string, eventsLimit int) (string, error) { + if c.Scheme() == nil { + return "", errors.New("scheme is not provided") + } + gvk, err := apiutil.GVKForObject(obj, c.Scheme()) + if err != nil { + return "", fmt.Errorf("failed identify GVK for object: %w", err) + } + + apiVersion, kind := gvk.ToAPIVersionAndKind() + if apiVersion == "" { + return "", fmt.Errorf("apiVersion not specified for object %s/%s", obj.GetNamespace(), obj.GetName()) + } + if kind == "" { + return "", fmt.Errorf("kind not specified for object %s/%s", obj.GetNamespace(), obj.GetName()) + } + fieldSelector := client.MatchingFields{ + "involvedObject.apiVersion": apiVersion, + "involvedObject.kind": kind, + "involvedObject.name": obj.GetName(), + "involvedObject.namespace": obj.GetNamespace(), + "type": eventType, + } + eventList := &corev1.EventList{} + if err := c.List(ctx, eventList, fieldSelector); err != nil { + return "", fmt.Errorf("error '%v' occurred while fetching more details", err) + } + + if len(eventList.Items) > 0 { + return buildEventsErrorMessage(eventList.Items, eventsLimit), nil + } + return "", nil +} + +func buildEventsErrorMessage(events []corev1.Event, eventsLimit int) string { + sortByLastTimestamp := func(o1, o2 client.Object) bool { + obj1, ok1 := o1.(*corev1.Event) + obj2, ok2 := o2.(*corev1.Event) + + if !ok1 || !ok2 { + return false + } + + return obj1.LastTimestamp.Time.Before(obj2.LastTimestamp.Time) + } + + list := &corev1.EventList{Items: events} + SortBy(sortByLastTimestamp).Sort(list) + events = list.Items - const eventsLimit = 2 if len(events) > eventsLimit { events = events[len(events)-eventsLimit:] } @@ -366,3 +397,166 @@ func translateMicroTimestampSince(timestamp metav1.MicroTime) string { return duration.HumanDuration(time.Since(timestamp.Time)) } + +// MergeOwnerReferences merges the newReferences with the list of existing references. +func MergeOwnerReferences(references []metav1.OwnerReference, newReferences ...metav1.OwnerReference) []metav1.OwnerReference { + uids := make(map[types.UID]struct{}) + for _, reference := range references { + uids[reference.UID] = struct{}{} + } + + for _, newReference := range newReferences { + if _, ok := uids[newReference.UID]; !ok { + references = append(references, newReference) + } + } + + return references +} + +// OwnedBy checks if the given object's owner reference contains an entry with the provided attributes. +func OwnedBy(obj client.Object, apiVersion, kind, name string, uid types.UID) bool { + for _, ownerReference := range obj.GetOwnerReferences() { + return ownerReference.APIVersion == apiVersion && + ownerReference.Kind == kind && + ownerReference.Name == name && + ownerReference.UID == uid + } + + return false +} + +// NewestObject returns the most recently created object based on the provided list object type. If a filter function +// is provided then it will be applied for each object right after listing all objects. If no object remains then nil +// is returned. The Items field in the list object will be populated with the result returned from the server after +// applying the filter function (if provided). +func NewestObject(ctx context.Context, c client.Client, listObj client.ObjectList, filterFn func(client.Object) bool, listOpts ...client.ListOption) (client.Object, error) { + if err := c.List(ctx, listObj, listOpts...); err != nil { + return nil, err + } + + if filterFn != nil { + var items []runtime.Object + + if err := meta.EachListItem(listObj, func(object runtime.Object) error { + obj, ok := object.(client.Object) + if !ok { + return fmt.Errorf("%T does not implement client.Object", object) + } + + if filterFn(obj) { + items = append(items, obj) + } + return nil + }); err != nil { + return nil, err + } + + if err := meta.SetList(listObj, items); err != nil { + return nil, err + } + } + + if meta.LenList(listObj) == 0 { + return nil, nil + } + + ByCreationTimestamp().Sort(listObj) + + items, err := meta.ExtractList(listObj) + if err != nil { + return nil, err + } + + newestObject := items[meta.LenList(listObj)-1] + obj, ok := newestObject.(client.Object) + if !ok { + return nil, fmt.Errorf("%T does not implement client.Object", newestObject) + } + + return obj, nil +} + +// NewestPodForDeployment returns the most recently created Pod object for the given deployment. +func NewestPodForDeployment(ctx context.Context, c client.Client, deployment *appsv1.Deployment) (*corev1.Pod, error) { + listOpts := []client.ListOption{client.InNamespace(deployment.Namespace)} + if deployment.Spec.Selector != nil { + listOpts = append(listOpts, client.MatchingLabels(deployment.Spec.Selector.MatchLabels)) + } + + replicaSet, err := NewestObject( + ctx, + c, + &appsv1.ReplicaSetList{}, + func(obj client.Object) bool { + return OwnedBy(obj, appsv1.SchemeGroupVersion.String(), "Deployment", deployment.Name, deployment.UID) + }, + listOpts..., + ) + if err != nil { + return nil, err + } + if replicaSet == nil { + return nil, nil + } + + newestReplicaSet, ok := replicaSet.(*appsv1.ReplicaSet) + if !ok { + return nil, fmt.Errorf("object is not of type *appsv1.ReplicaSet but %T", replicaSet) + } + + pod, err := NewestObject( + ctx, + c, + &corev1.PodList{}, + func(obj client.Object) bool { + return OwnedBy(obj, appsv1.SchemeGroupVersion.String(), "ReplicaSet", newestReplicaSet.Name, newestReplicaSet.UID) + }, + listOpts..., + ) + if err != nil { + return nil, err + } + if pod == nil { + return nil, nil + } + + newestPod, ok := pod.(*corev1.Pod) + if !ok { + return nil, fmt.Errorf("object is not of type *corev1.Pod but %T", pod) + } + + return newestPod, nil +} + +// MostRecentCompleteLogs returns the logs of the pod/container in case it is not running. If the pod/container is +// running then the logs of the previous pod/container are being returned. +func MostRecentCompleteLogs( + ctx context.Context, + podInterface corev1client.PodInterface, + pod *corev1.Pod, + containerName string, + tailLines *int64, +) ( + string, + error, +) { + previousLogs := false + for _, containerStatus := range pod.Status.ContainerStatuses { + if containerName == "" || containerStatus.Name == containerName { + previousLogs = containerStatus.State.Running != nil + break + } + } + + logs, err := kubernetes.GetPodLogs(ctx, podInterface, pod.Name, &corev1.PodLogOptions{ + Container: containerName, + TailLines: tailLines, + Previous: previousLogs, + }) + if err != nil { + return "", err + } + + return string(logs), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/managedseed.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/managedseed.go new file mode 100644 index 00000000..4a918170 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/managedseed.go @@ -0,0 +1,46 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package kubernetes + +import ( + "context" + "fmt" + + "github.com/gardener/gardener/pkg/apis/seedmanagement" + seedmanagementv1alpha1 "github.com/gardener/gardener/pkg/apis/seedmanagement/v1alpha1" + gardenseedmanagementclientset "github.com/gardener/gardener/pkg/client/seedmanagement/clientset/versioned" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" +) + +// GetManagedSeed gets the ManagedSeed resource for the given shoot namespace and name, +// by searching for all ManagedSeeds in the shoot namespace that have spec.shoot.name set to the shoot name. +// If no such ManagedSeeds are found, nil is returned. +func GetManagedSeed(ctx context.Context, seedManagementClient gardenseedmanagementclientset.Interface, shootNamespace, shootName string) (*seedmanagementv1alpha1.ManagedSeed, error) { + managedSeedList, err := seedManagementClient.SeedmanagementV1alpha1().ManagedSeeds(shootNamespace).List(ctx, metav1.ListOptions{ + FieldSelector: fields.SelectorFromSet(fields.Set{seedmanagement.ManagedSeedShootName: shootName}).String(), + }) + if err != nil { + return nil, err + } + if len(managedSeedList.Items) == 0 { + return nil, nil + } + if len(managedSeedList.Items) > 1 { + return nil, fmt.Errorf("found more than one ManagedSeed objects for shoot %s/%s", shootNamespace, shootName) + } + return &managedSeedList.Items[0], nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/namespace.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/namespace.go index 2d1f7c78..dec21a8e 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/namespace.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/namespace.go @@ -15,9 +15,10 @@ package kubernetes import ( + "context" + "github.com/gardener/gardener/pkg/client/kubernetes" "github.com/gardener/gardener/pkg/logger" - "github.com/gardener/gardener/pkg/mock/go/context" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/equality" diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/node.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/node.go deleted file mode 100644 index 84af36bb..00000000 --- a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/node.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package kubernetes - -import ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/labels" -) - -// NodeSource is a function that produces a slice of Nodes or an error. -type NodeSource func() ([]*corev1.Node, error) - -// NodeLister is a lister of Nodes. -type NodeLister interface { - // List lists all Nodes that match the given selector. - List(selector labels.Selector) ([]*corev1.Node, error) -} - -type nodeLister struct { - source NodeSource -} - -// NewNodeLister creates a new NodeLister from the given NodeSource. -func NewNodeLister(source NodeSource) NodeLister { - return &nodeLister{source: source} -} - -func filterNodes(source NodeSource, filter func(*corev1.Node) bool) ([]*corev1.Node, error) { - nodes, err := source() - if err != nil { - return nil, err - } - - var out []*corev1.Node - for _, node := range nodes { - if filter(node) { - out = append(out, node) - } - } - return out, nil -} - -func (d *nodeLister) List(selector labels.Selector) ([]*corev1.Node, error) { - return filterNodes(d.source, func(node *corev1.Node) bool { - return selector.Matches(labels.Set(node.Labels)) - }) -} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/object.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/object.go index 24cb0007..ff9b537c 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/object.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/object.go @@ -20,19 +20,17 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/gardener/gardener/pkg/utils/flow" ) // ObjectName returns the name of the given object in the format / -func ObjectName(obj runtime.Object) string { - k, err := client.ObjectKeyFromObject(obj) - if err != nil { - return "/" - } - return k.String() +func ObjectName(obj client.Object) string { + return client.ObjectKeyFromObject(obj).String() } // DeleteObjects deletes a list of Kubernetes objects. -func DeleteObjects(ctx context.Context, c client.Client, objects ...runtime.Object) error { +func DeleteObjects(ctx context.Context, c client.Client, objects ...client.Object) error { for _, obj := range objects { if err := DeleteObject(ctx, c, obj); err != nil { return err @@ -42,9 +40,28 @@ func DeleteObjects(ctx context.Context, c client.Client, objects ...runtime.Obje } // DeleteObject deletes a Kubernetes object. It ignores 'not found' and 'no match' errors. -func DeleteObject(ctx context.Context, c client.Client, object runtime.Object) error { +func DeleteObject(ctx context.Context, c client.Client, object client.Object) error { if err := c.Delete(ctx, object); client.IgnoreNotFound(err) != nil && !meta.IsNoMatchError(err) { return err } return nil } + +// DeleteObjectsFromListConditionally takes a Kubernetes List object. It iterates over its items and, if provided, +// executes the predicate function. If it evaluates to true then the object will be deleted. +func DeleteObjectsFromListConditionally(ctx context.Context, c client.Client, listObj client.ObjectList, predicateFn func(runtime.Object) bool) error { + fns := make([]flow.TaskFn, 0, meta.LenList(listObj)) + + if err := meta.EachListItem(listObj, func(obj runtime.Object) error { + if predicateFn == nil || predicateFn(obj) { + fns = append(fns, func(ctx context.Context) error { + return client.IgnoreNotFound(c.Delete(ctx, obj.(client.Object))) + }) + } + return nil + }); err != nil { + return err + } + + return flow.Parallel(fns...)(ctx) +} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/patch.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/patch.go index 351cf161..1bb9a658 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/patch.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/patch.go @@ -23,7 +23,6 @@ import ( jsoniter "github.com/json-iterator/go" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/apimachinery/pkg/util/wait" @@ -34,25 +33,20 @@ var json = jsoniter.ConfigFastest // TryPatch tries to apply the given transformation function onto the given object, and to patch it afterwards with optimistic locking. // It retries the patch with an exponential backoff. -func TryPatch(ctx context.Context, backoff wait.Backoff, c client.Client, obj runtime.Object, transform func() error) error { +func TryPatch(ctx context.Context, backoff wait.Backoff, c client.Client, obj client.Object, transform func() error) error { return tryPatch(ctx, backoff, c, obj, c.Patch, transform) } // TryPatchStatus tries to apply the given transformation function onto the given object, and to patch its // status afterwards with optimistic locking. It retries the status patch with an exponential backoff. -func TryPatchStatus(ctx context.Context, backoff wait.Backoff, c client.Client, obj runtime.Object, transform func() error) error { +func TryPatchStatus(ctx context.Context, backoff wait.Backoff, c client.Client, obj client.Object, transform func() error) error { return tryPatch(ctx, backoff, c, obj, c.Status().Patch, transform) } -func tryPatch(ctx context.Context, backoff wait.Backoff, c client.Client, obj runtime.Object, patchFunc func(context.Context, runtime.Object, client.Patch, ...client.PatchOption) error, transform func() error) error { - key, err := client.ObjectKeyFromObject(obj) - if err != nil { - return err - } - +func tryPatch(ctx context.Context, backoff wait.Backoff, c client.Client, obj client.Object, patchFunc func(context.Context, client.Object, client.Patch, ...client.PatchOption) error, transform func() error) error { resetCopy := obj.DeepCopyObject() return exponentialBackoff(ctx, backoff, func() (bool, error) { - if err := c.Get(ctx, key, obj); err != nil { + if err := c.Get(ctx, client.ObjectKeyFromObject(obj), obj); err != nil { return false, err } beforeTransform := obj.DeepCopyObject() @@ -120,6 +114,6 @@ func IsEmptyPatch(patch []byte) bool { } // SubmitEmptyPatch submits an empty patch to the given `obj` with the given `client` instance. -func SubmitEmptyPatch(ctx context.Context, c client.Client, obj runtime.Object) error { +func SubmitEmptyPatch(ctx context.Context, c client.Client, obj client.Object) error { return c.Patch(ctx, obj, client.RawPatch(types.StrategicMergePatchType, []byte("{}"))) } diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/secret.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/secret.go new file mode 100644 index 00000000..edd61cc6 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/secret.go @@ -0,0 +1,85 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package kubernetes + +import ( + "context" + + corev1 "k8s.io/api/core/v1" + + "github.com/gardener/gardener/pkg/client/kubernetes" + "github.com/gardener/gardener/pkg/logger" + + "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" + k8s "k8s.io/client-go/kubernetes" + "k8s.io/client-go/util/retry" +) + +func tryUpdateSecret( + ctx context.Context, + k k8s.Interface, + backoff wait.Backoff, + meta metav1.ObjectMeta, + transform func(*corev1.Secret) (*corev1.Secret, error), + updateFunc func(k k8s.Interface, secret *corev1.Secret) (*corev1.Secret, error), + equalFunc func(cur, updated *corev1.Secret) bool, +) (*corev1.Secret, error) { + + var ( + result *corev1.Secret + attempt int + ) + err := retry.RetryOnConflict(backoff, func() (err error) { + attempt++ + cur, err := k.CoreV1().Secrets(meta.Namespace).Get(ctx, meta.Name, kubernetes.DefaultGetOptions()) + if err != nil { + return err + } + + updated, err := transform(cur.DeepCopy()) + if err != nil { + return err + } + + if equalFunc(cur, updated) { + result = cur + return nil + } + + result, err = updateFunc(k, updated) + if err != nil { + logger.Logger.Errorf("Attempt %d failed to update Secret %s/%s due to %v", attempt, cur.Namespace, cur.Name, err) + } + return + }) + if err != nil { + logger.Logger.Errorf("Failed to update Secret %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) + } + return result, err +} + +// TryUpdateSecret tries to update the secret matching the given . +// It retries with the given characteristics as long as it gets Conflict errors. +// The transformation function is applied to the current state of the Secret object. If the transformation +// yields a semantically equal Secret, no update is done and the operation returns normally. +func TryUpdateSecret(ctx context.Context, k k8s.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*corev1.Secret) (*corev1.Secret, error)) (*corev1.Secret, error) { + return tryUpdateSecret(ctx, k, backoff, meta, transform, func(k k8s.Interface, secret *corev1.Secret) (*corev1.Secret, error) { + return k.CoreV1().Secrets(secret.Namespace).Update(ctx, secret, kubernetes.DefaultUpdateOptions()) + }, func(cur, updated *corev1.Secret) bool { + return equality.Semantic.DeepEqual(cur, updated) + }) +} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/secretref.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/secretref.go new file mode 100644 index 00000000..83af19a2 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/secretref.go @@ -0,0 +1,64 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package kubernetes + +import ( + "context" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" +) + +// GetSecretByReference returns the secret referenced by the given secret reference. +func GetSecretByReference(ctx context.Context, c client.Client, ref *corev1.SecretReference) (*corev1.Secret, error) { + secret := &corev1.Secret{} + if err := c.Get(ctx, Key(ref.Namespace, ref.Name), secret); err != nil { + return nil, err + } + return secret, nil +} + +// CreateOrUpdateSecretByReference creates or updates the secret referenced by the given secret reference +// with the given type, data, and owner references. +func CreateOrUpdateSecretByReference(ctx context.Context, c client.Client, ref *corev1.SecretReference, secretType corev1.SecretType, data map[string][]byte, ownerRefs []metav1.OwnerReference) error { + secret := &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: ref.Name, + Namespace: ref.Namespace, + }, + } + if _, err := controllerutil.CreateOrUpdate(ctx, c, secret, func() error { + secret.ObjectMeta.OwnerReferences = ownerRefs + secret.Type = secretType + secret.Data = data + return nil + }); err != nil { + return err + } + return nil +} + +// DeleteSecretByReference deletes the secret referenced by the given secret reference. +func DeleteSecretByReference(ctx context.Context, c client.Client, ref *corev1.SecretReference) error { + secret := &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: ref.Name, + Namespace: ref.Namespace, + }, + } + return client.IgnoreNotFound(c.Delete(ctx, secret)) +} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/shoot.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/shoot.go index 2aa3cd85..7b4be644 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/shoot.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/shoot.go @@ -106,27 +106,3 @@ func TryUpdateShootStatus(ctx context.Context, g gardencore.Interface, backoff w return equality.Semantic.DeepEqual(cur.Status, updated.Status) }) } - -// TryUpdateShootLabels tries to update the status of the shoot matching the given . -// It retries with the given characteristics as long as it gets Conflict errors. -// The transformation function is applied to the current state of the Shoot object. If the transformation -// yields a semantically equal Shoot (regarding labels), no update is done and the operation returns normally. -func TryUpdateShootLabels(ctx context.Context, g gardencore.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardencorev1beta1.Shoot) (*gardencorev1beta1.Shoot, error)) (*gardencorev1beta1.Shoot, error) { - return tryUpdateShoot(ctx, g, backoff, meta, transform, func(g gardencore.Interface, shoot *gardencorev1beta1.Shoot) (*gardencorev1beta1.Shoot, error) { - return g.CoreV1beta1().Shoots(shoot.Namespace).Update(ctx, shoot, kubernetes.DefaultUpdateOptions()) - }, func(cur, updated *gardencorev1beta1.Shoot) bool { - return equality.Semantic.DeepEqual(cur.Labels, updated.Labels) - }) -} - -// TryUpdateShootAnnotations tries to update the annotations of the shoot matching the given . -// It retries with the given characteristics as long as it gets Conflict errors. -// The transformation function is applied to the current state of the Shoot object. If the transformation -// yields a semantically equal Shoot (regarding conditions), no update is done and the operation returns normally. -func TryUpdateShootAnnotations(ctx context.Context, g gardencore.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardencorev1beta1.Shoot) (*gardencorev1beta1.Shoot, error)) (*gardencorev1beta1.Shoot, error) { - return tryUpdateShoot(ctx, g, backoff, meta, transform, func(g gardencore.Interface, shoot *gardencorev1beta1.Shoot) (*gardencorev1beta1.Shoot, error) { - return g.CoreV1beta1().Shoots(shoot.Namespace).Update(ctx, shoot, kubernetes.DefaultUpdateOptions()) - }, func(cur, updated *gardencorev1beta1.Shoot) bool { - return equality.Semantic.DeepEqual(cur.Annotations, updated.Annotations) - }) -} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/sorter.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/sorter.go index 2d67a200..26aeb9b1 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/sorter.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/sorter.go @@ -19,25 +19,25 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + "sigs.k8s.io/controller-runtime/pkg/client" ) // ByName returns a comparison function for sorting by name. func ByName() SortBy { - return func(o1, o2 controllerutil.Object) bool { + return func(o1, o2 client.Object) bool { return o1.GetName() < o2.GetName() } } // ByCreationTimestamp returns a comparison function for sorting by creation timestamp. func ByCreationTimestamp() SortBy { - return func(o1, o2 controllerutil.Object) bool { + return func(o1, o2 client.Object) bool { return o1.GetCreationTimestamp().Time.Before(o2.GetCreationTimestamp().Time) } } // SortBy the type of a "less" function that defines the ordering of its object arguments. -type SortBy func(o1, o2 controllerutil.Object) bool +type SortBy func(o1, o2 client.Object) bool // Sort sorts the items in the provided list objects according to the sort-by function. func (sortBy SortBy) Sort(objList runtime.Object) { @@ -73,7 +73,7 @@ func (s *objectSorter) Swap(i, j int) { func (s *objectSorter) Less(i, j int) bool { return s.compareFn( - s.objects[i].(controllerutil.Object), - s.objects[j].(controllerutil.Object), + s.objects[i].(client.Object), + s.objects[j].(client.Object), ) } diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/update.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/update.go index 698e138a..b209d3e9 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/update.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/update.go @@ -20,32 +20,26 @@ import ( "time" apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "sigs.k8s.io/controller-runtime/pkg/client" ) // TryUpdate tries to apply the given transformation function onto the given object, and to update it afterwards. // It retries the update with an exponential backoff. -func TryUpdate(ctx context.Context, backoff wait.Backoff, c client.Client, obj runtime.Object, transform func() error) error { +func TryUpdate(ctx context.Context, backoff wait.Backoff, c client.Client, obj client.Object, transform func() error) error { return tryUpdate(ctx, backoff, c, obj, c.Update, transform) } // TryUpdateStatus tries to apply the given transformation function onto the given object, and to update its // status afterwards. It retries the status update with an exponential backoff. -func TryUpdateStatus(ctx context.Context, backoff wait.Backoff, c client.Client, obj runtime.Object, transform func() error) error { +func TryUpdateStatus(ctx context.Context, backoff wait.Backoff, c client.Client, obj client.Object, transform func() error) error { return tryUpdate(ctx, backoff, c, obj, c.Status().Update, transform) } -func tryUpdate(ctx context.Context, backoff wait.Backoff, c client.Client, obj runtime.Object, updateFunc func(context.Context, runtime.Object, ...client.UpdateOption) error, transform func() error) error { - key, err := client.ObjectKeyFromObject(obj) - if err != nil { - return err - } - +func tryUpdate(ctx context.Context, backoff wait.Backoff, c client.Client, obj client.Object, updateFunc func(context.Context, client.Object, ...client.UpdateOption) error, transform func() error) error { resetCopy := obj.DeepCopyObject() return exponentialBackoff(ctx, backoff, func() (bool, error) { - if err := c.Get(ctx, key, obj); err != nil { + if err := c.Get(ctx, client.ObjectKeyFromObject(obj), obj); err != nil { return false, err } diff --git a/vendor/github.com/gardener/gardener/pkg/utils/managedresources/managedresources.go b/vendor/github.com/gardener/gardener/pkg/utils/managedresources/managedresources.go index 9f4ee39c..2e75ec25 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/managedresources/managedresources.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/managedresources/managedresources.go @@ -137,6 +137,7 @@ func KeepManagedResourceObjects(ctx context.Context, c client.Client, namespace, Namespace: namespace, }, } + if err := kutil.TryUpdate(ctx, k8sretry.DefaultBackoff, c, resource, func() error { resource.Spec.KeepObjects = &keepObjects return nil diff --git a/vendor/github.com/gardener/gardener/pkg/utils/managedresources/registry.go b/vendor/github.com/gardener/gardener/pkg/utils/managedresources/registry.go index b069e9d2..5bbd443a 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/managedresources/registry.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/managedresources/registry.go @@ -19,11 +19,11 @@ import ( "reflect" "strings" - "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/apimachinery/pkg/runtime/serializer/json" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/apiutil" ) @@ -36,7 +36,7 @@ type Registry struct { } type object struct { - obj runtime.Object + obj client.Object serialization []byte } @@ -57,7 +57,7 @@ func NewRegistry(scheme *runtime.Scheme, codec serializer.CodecFactory, serializ // Add adds the given object the registry. It computes a filename based on its type, namespace, and name. It serializes // the object to YAML and stores both representations (object and serialization) in the registry. -func (r *Registry) Add(obj runtime.Object) error { +func (r *Registry) Add(obj client.Object) error { if obj == nil || reflect.ValueOf(obj) == reflect.Zero(reflect.TypeOf(obj)) { return nil } @@ -95,7 +95,7 @@ func (r *Registry) SerializedObjects() map[string][]byte { } // AddAllAndSerialize calls Add() for all the given objects before calling SerializedObjects(). -func (r *Registry) AddAllAndSerialize(objects ...runtime.Object) (map[string][]byte, error) { +func (r *Registry) AddAllAndSerialize(objects ...client.Object) (map[string][]byte, error) { for _, resource := range objects { if err := r.Add(resource); err != nil { return nil, err @@ -105,8 +105,8 @@ func (r *Registry) AddAllAndSerialize(objects ...runtime.Object) (map[string][]b } // RegisteredObjects returns a map whose keys are filenames and whose values are objects. -func (r *Registry) RegisteredObjects() map[string]runtime.Object { - out := make(map[string]runtime.Object, len(r.nameToObject)) +func (r *Registry) RegisteredObjects() map[string]client.Object { + out := make(map[string]client.Object, len(r.nameToObject)) for name, object := range r.nameToObject { out[name] = object.obj } @@ -122,21 +122,16 @@ func (r *Registry) String() string { return strings.Join(out, "\n\n") } -func (r *Registry) objectName(obj runtime.Object) (string, error) { +func (r *Registry) objectName(obj client.Object) (string, error) { gvk, err := apiutil.GVKForObject(obj, r.scheme) if err != nil { return "", err } - acc, err := meta.Accessor(obj) - if err != nil { - return "", err - } - return fmt.Sprintf( "%s__%s__%s", strings.ToLower(gvk.Kind), - acc.GetNamespace(), - strings.Replace(acc.GetName(), ":", "_", -1), + obj.GetNamespace(), + strings.Replace(obj.GetName(), ":", "_", -1), ), nil } diff --git a/vendor/github.com/gardener/gardener/pkg/utils/miscellaneous.go b/vendor/github.com/gardener/gardener/pkg/utils/miscellaneous.go index 32a855ff..ef482e51 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/miscellaneous.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/miscellaneous.go @@ -139,7 +139,21 @@ func QuantityPtr(q resource.Quantity) *resource.Quantity { return &q } +// DurationPtr returns a time.Duration pointer to its argument. +func DurationPtr(d time.Duration) *time.Duration { + return &d +} + // Indent indents the given string with the given number of spaces. func Indent(str string, spaces int) string { return strings.ReplaceAll(str, "\n", "\n"+strings.Repeat(" ", spaces)) } + +// ShallowCopyMapStringInterface creates a shallow copy of the given map. +func ShallowCopyMapStringInterface(values map[string]interface{}) map[string]interface{} { + copiedValues := make(map[string]interface{}, len(values)) + for k, v := range values { + copiedValues[k] = v + } + return copiedValues +} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/retry/retry.go b/vendor/github.com/gardener/gardener/pkg/utils/retry/retry.go index b0ef8fe6..75502758 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/retry/retry.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/retry/retry.go @@ -107,36 +107,37 @@ func MinorOrSevereError(retryCountUntilSevere, threshold int, err error) (bool, return MinorError(err) } -type retryError struct { +// Error is an error that occurred during a retry operation. +type Error struct { ctxError error err error } // Cause implements Causer. -func (r *retryError) Cause() error { - if r.err != nil { - return r.err +func (e *Error) Cause() error { + if e.err != nil { + return e.err } - return r.ctxError + return e.ctxError } // Unwrap implements the Unwrap function // https://golang.org/pkg/errors/#Unwrap -func (r *retryError) Unwrap() error { - return r.err +func (e *Error) Unwrap() error { + return e.err } // Error implements error. -func (r *retryError) Error() string { - if r.err != nil { - return fmt.Sprintf("retry failed with %v, last error: %v", r.ctxError, r.err) +func (e *Error) Error() string { + if e.err != nil { + return fmt.Sprintf("retry failed with %v, last error: %v", e.ctxError, e.err) } - return fmt.Sprintf("retry failed with %v", r.ctxError) + return fmt.Sprintf("retry failed with %v", e.ctxError) } -// NewRetryError returns a new error with the given context error and error. The non-context error is optional. -func NewRetryError(ctxError, err error) error { - return &retryError{ctxError, err} +// NewError returns a new error with the given context error and error. The non-context error is optional. +func NewError(ctxError, err error) error { + return &Error{ctxError, err} } // UntilFor keeps retrying the given Func until it either errors severely or the context expires. @@ -166,12 +167,12 @@ func UntilFor(ctx context.Context, waitFunc WaitFunc, agg ErrorAggregator, f Fun case <-waitDone: select { case <-ctxDone: - return NewRetryError(ctx.Err(), agg.Error()) + return NewError(ctx.Err(), agg.Error()) default: return nil } case <-ctxDone: - return NewRetryError(ctx.Err(), agg.Error()) + return NewError(ctx.Err(), agg.Error()) } }(); err != nil { return err diff --git a/vendor/github.com/gardener/gardener/pkg/utils/secrets/basic_auth.go b/vendor/github.com/gardener/gardener/pkg/utils/secrets/basic_auth.go index 06d88bc9..8a60b984 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/secrets/basic_auth.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/secrets/basic_auth.go @@ -21,8 +21,6 @@ import ( "github.com/gardener/gardener/pkg/utils" "github.com/gardener/gardener/pkg/utils/infodata" "k8s.io/apiserver/pkg/authentication/user" - - "golang.org/x/crypto/bcrypt" ) type formatType string @@ -40,8 +38,6 @@ const ( DataKeyUserName = "username" // DataKeyPassword is the key in a secret data holding the password. DataKeyPassword = "password" - // DataKeyPasswordBcryptHash is the key in a secret data holding the bcrypt hash of the password. - DataKeyPasswordBcryptHash = "bcryptPasswordHash" ) // BasicAuthSecretConfig contains the specification for a to-be-generated basic authentication secret. @@ -49,9 +45,8 @@ type BasicAuthSecretConfig struct { Name string Format formatType - Username string - PasswordLength int - BcryptPasswordHashRequest bool + Username string + PasswordLength int } // BasicAuth contains the username, the password, optionally hash of the password and the format for serializing the basic authentication @@ -59,9 +54,8 @@ type BasicAuth struct { Name string Format formatType - Username string - Password string - BcryptPasswordHash string + Username string + Password string } // GetName returns the name of the secret. @@ -134,15 +128,6 @@ func (s *BasicAuthSecretConfig) generateWithPassword(password string) (*BasicAut Password: password, } - if s.BcryptPasswordHashRequest { - hashedPassword, err := bcrypt.GenerateFromPassword([]byte(password), 16) - if err != nil { - return nil, err - } - - basicAuth.BcryptPasswordHash = string(hashedPassword) - } - return basicAuth, nil } @@ -155,10 +140,6 @@ func (b *BasicAuth) SecretData() map[string][]byte { data[DataKeyUserName] = []byte(b.Username) data[DataKeyPassword] = []byte(b.Password) - if b.BcryptPasswordHash != "" { - data[DataKeyPasswordBcryptHash] = []byte(b.BcryptPasswordHash) - } - fallthrough case BasicAuthFormatCSV: diff --git a/vendor/github.com/gardener/gardener/pkg/utils/secrets/certificates.go b/vendor/github.com/gardener/gardener/pkg/utils/secrets/certificates.go index 462a6a01..0d2fd550 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/secrets/certificates.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/secrets/certificates.go @@ -265,9 +265,9 @@ func LoadCertificate(name string, privateKeyPEM, certificatePEM []byte) (*Certif } // LoadCAFromSecret loads a CA certificate from an existing Kubernetes secret object. It returns the secret, the Certificate and an error. -func LoadCAFromSecret(k8sClient client.Client, namespace, name string) (*corev1.Secret, *Certificate, error) { +func LoadCAFromSecret(ctx context.Context, k8sClient client.Client, namespace, name string) (*corev1.Secret, *Certificate, error) { secret := &corev1.Secret{} - if err := k8sClient.Get(context.TODO(), kutil.Key(namespace, name), secret); err != nil { + if err := k8sClient.Get(ctx, kutil.Key(namespace, name), secret); err != nil { return nil, nil, err } @@ -335,7 +335,7 @@ func signCertificate(certificateTemplate *x509.Certificate, privateKey *rsa.Priv return utils.EncodeCertificate(certificate), nil } -func generateCA(k8sClusterClient kubernetes.Interface, config *CertificateSecretConfig, namespace string) (*corev1.Secret, *Certificate, error) { +func generateCA(ctx context.Context, k8sClusterClient kubernetes.Interface, config *CertificateSecretConfig, namespace string) (*corev1.Secret, *Certificate, error) { certificate, err := config.GenerateCertificate() if err != nil { return nil, nil, err @@ -350,7 +350,7 @@ func generateCA(k8sClusterClient kubernetes.Interface, config *CertificateSecret Data: certificate.SecretData(), } - if err := k8sClusterClient.Client().Create(context.TODO(), secret); err != nil { + if err := k8sClusterClient.Client().Create(ctx, secret); err != nil { return nil, nil, err } return secret, certificate, nil @@ -367,7 +367,7 @@ func loadCA(name string, existingSecret *corev1.Secret) (*corev1.Secret, *Certif // GenerateCertificateAuthorities get a map of wanted certificates and check If they exist in the existingSecretsMap based on the keys in the map. If they exist it get only the certificate from the corresponding // existing secret and makes a certificate DataInterface from the existing secret. If there is no existing secret contaning the wanted certificate, we make one certificate and with it we deploy in K8s cluster // a secret with that certificate and then return the newly existing secret. The function returns a map of secrets contaning the wanted CA, a map with the wanted CA certificate and an error. -func GenerateCertificateAuthorities(k8sClusterClient kubernetes.Interface, existingSecretsMap map[string]*corev1.Secret, wantedCertificateAuthorities map[string]*CertificateSecretConfig, namespace string) (map[string]*corev1.Secret, map[string]*Certificate, error) { +func GenerateCertificateAuthorities(ctx context.Context, k8sClusterClient kubernetes.Interface, existingSecretsMap map[string]*corev1.Secret, wantedCertificateAuthorities map[string]*CertificateSecretConfig, namespace string) (map[string]*corev1.Secret, map[string]*Certificate, error) { type caOutput struct { secret *corev1.Secret certificate *Certificate @@ -388,7 +388,7 @@ func GenerateCertificateAuthorities(k8sClusterClient kubernetes.Interface, exist if existingSecret, ok := existingSecretsMap[name]; !ok { go func(config *CertificateSecretConfig) { defer wg.Done() - secret, certificate, err := generateCA(k8sClusterClient, config, namespace) + secret, certificate, err := generateCA(ctx, k8sClusterClient, config, namespace) results <- &caOutput{secret, certificate, err} }(config) } else { diff --git a/vendor/github.com/gardener/gardener/pkg/utils/secrets/secrets.go b/vendor/github.com/gardener/gardener/pkg/utils/secrets/secrets.go index a7cd7d08..1f12d1e5 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/secrets/secrets.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/secrets/secrets.go @@ -45,7 +45,10 @@ func (s *Secrets) Deploy( cs kubernetes.Interface, gcs gardenerkubernetes.Interface, namespace string, -) (map[string]*corev1.Secret, error) { +) ( + map[string]*corev1.Secret, + error, +) { // Get existing secrets in the namespace existingSecrets, err := getSecrets(ctx, cs, namespace) if err != nil { @@ -53,7 +56,7 @@ func (s *Secrets) Deploy( } // Generate CAs - _, cas, err := GenerateCertificateAuthorities(gcs, existingSecrets, s.CertificateSecretConfigs, namespace) + _, cas, err := GenerateCertificateAuthorities(ctx, gcs, existingSecrets, s.CertificateSecretConfigs, namespace) if err != nil { return nil, errors.Wrapf(err, "could not generate CA secrets in namespace '%s'", namespace) } diff --git a/vendor/github.com/gardener/gardener/pkg/utils/values.go b/vendor/github.com/gardener/gardener/pkg/utils/values.go new file mode 100644 index 00000000..76a4adc9 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/utils/values.go @@ -0,0 +1,266 @@ +// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package utils + +import ( + "encoding/json" + "fmt" +) + +// ToValuesMap converts the given value v to a values map, by first marshalling it to JSON, +// and then unmarshalling the result from JSON into a values map. +// If v cannot be marshalled to JSON, or if the result cannot be unmarshalled into a values map, an error is returned. +func ToValuesMap(v interface{}) (map[string]interface{}, error) { + var m map[string]interface{} + if err := convert(v, &m); err != nil { + return nil, err + } + return m, nil +} + +// FromValuesMap converts the given values map values to the given value v, by first marshalling it to JSON, +// and then unmarshalling the result from JSON into v. +// If values cannot be marshalled to JSON, or if the result cannot be unmarshalled into v, an error is returned. +func FromValuesMap(values map[string]interface{}, v interface{}) error { + return convert(values, v) +} + +// InitValuesMap returns the given values map if it is non-nil, or a newly allocated values map if it is nil. +func InitValuesMap(values map[string]interface{}) map[string]interface{} { + if values == nil { + values = make(map[string]interface{}) + } + return values +} + +// GetFromValuesMap returns the element at the specified location in the given values map, +// e.g. GetFromValuesMap(values, "a", 0, "b") returns values["a"][0]["b"], if such an element exists. +// If such an element does not exist, it returns nil. +// All keys must be of type either string (for map keys) or int (for slice indexes). +// If a key type doesn't match the corresponding element type (string for map, int for slice), an error is returned. +func GetFromValuesMap(values map[string]interface{}, keys ...interface{}) (interface{}, error) { + return getFromValues(fromMap(values), keys...) +} + +// SetToValuesMap sets the given element v to the specified location in the given values map, +// e.g. SetToValuesMap(values, v, "a", 0, "b") sets values["a"][0]["b"] = v. +// All map and slice elements along the way that don't exist are created and set at their corresponding locations. +// All keys must be of type either string (for map keys) or int (for slice indexes). +// Slice indexes must refer to existing slice elements or the first element beyond the end of a slice. +// If a key type doesn't match the corresponding element type (string for map, int for slice), an error is returned. +func SetToValuesMap(values map[string]interface{}, v interface{}, keys ...interface{}) (map[string]interface{}, error) { + x, err := setToValues(fromMap(values), v, keys...) + return toMap(x), err +} + +// DeleteFromValuesMap deletes the element at the specified location in the given values map, +// e.g. DeleteFromValuesMap(values, "a", 0, "b") deletes values["a"][0]["b"]. +// If such an element does not exist, it returns the given values map unmodified. +// All keys must be of type either string (for map keys) or int (for slice indexes). +// If a key type doesn't match the corresponding element type (string for map, int for slice), an error is returned. +func DeleteFromValuesMap(values map[string]interface{}, keys ...interface{}) (map[string]interface{}, error) { + x, err := deleteFromValues(fromMap(values), keys...) + return toMap(x), err +} + +// convert converts x to y by first marshalling x to JSON, and then unmarshalling the result from JSON into y. +// If x cannot be marshalled to JSON, or if the result cannot be unmarshalled into y, an error is returned. +func convert(x, y interface{}) error { + jsonBytes, err := json.Marshal(x) + if err != nil { + return err + } + if err := json.Unmarshal(jsonBytes, y); err != nil { + return err + } + return nil +} + +// getFromValues returns the element at the specified location in the given values (either map or slice), +// e.g. getFromValues(values, "a", 0, "b") returns values["a"][0]["b"], if such an element exists. +// If such an element does not exist, it returns nil. +// All keys must be of type either string (for map keys) or int (for slice indexes). +// If a key type doesn't match the corresponding element type (string for map, int for slice), an error is returned. +func getFromValues(values interface{}, keys ...interface{}) (interface{}, error) { + if values == nil { + return nil, nil + } + if len(keys) == 0 { + return values, nil + } + var ok bool + switch keys[0].(type) { + case string: + key := keys[0].(string) + var m map[string]interface{} + if m, ok = values.(map[string]interface{}); !ok { + return nil, fmt.Errorf("cannot use key '%s' with a non-map value", key) + } + if _, ok = m[key]; !ok { + return nil, nil + } + return getFromValues(m[key], keys[1:]...) + case int: + index := keys[0].(int) + var s []interface{} + if s, ok = values.([]interface{}); !ok { + return nil, fmt.Errorf("cannot use index '%d' with a non-slice value", index) + } + if index < 0 || index >= len(s) { + return nil, nil + } + return getFromValues(s[index], keys[1:]...) + default: + return nil, fmt.Errorf("key '%v' must be of type string or int", keys[0]) + } +} + +// setToValues sets the given element v to the specified location in the given values (either map or slice), +// e.g. setToValues(values, v, "a", 0, "b") sets values["a"][0]["b"] = v. +// All map and slice elements along the way that don't exist are created and set at their corresponding locations. +// All keys must be of type either string (for map keys) or int (for slice indexes). +// Slice indexes must refer to existing slice elements or the first element beyond the end of a slice. +// If a key type doesn't match the corresponding element type (string for map, int for slice), an error is returned. +func setToValues(values interface{}, v interface{}, keys ...interface{}) (interface{}, error) { + if len(keys) == 0 { + return values, nil + } + var ok bool + switch keys[0].(type) { + case string: + key := keys[0].(string) + if values == nil { + values = map[string]interface{}{} + } + var m map[string]interface{} + if m, ok = values.(map[string]interface{}); !ok { + return values, fmt.Errorf("cannot use key '%s' with a non-map value", key) + } + if len(keys) == 1 { + m[key] = v + } else { + x, err := setToValues(m[key], v, keys[1:]...) + if err != nil { + return m, err + } + m[key] = x + } + return m, nil + case int: + index := keys[0].(int) + if values == nil { + values = []interface{}{} + } + var s []interface{} + if s, ok = values.([]interface{}); !ok { + return values, fmt.Errorf("cannot use index '%d' with a non-slice value", index) + } + if index >= 0 && index < len(s) { + if len(keys) == 1 { + s[index] = v + } else { + x, err := setToValues(s[index], v, keys[1:]...) + if err != nil { + return s, err + } + s[index] = x + } + } else if index == len(s) { + if len(keys) == 1 { + s = append(s, v) + } else { + x, err := setToValues(nil, v, keys[1:]...) + if err != nil { + return s, err + } + s = append(s, x) + } + } else { + return s, fmt.Errorf("index '%d' out of range", index) + } + return s, nil + default: + return values, fmt.Errorf("key '%v' must be of type string or int", keys[0]) + } +} + +// deleteFromValues deletes the element at the specified location in the given values (either map or slice), +// e.g. deleteFromValues(values, "a", 0, "b") deletes values["a"][0]["b"]. +// If such an element does not exist, it returns the given values unmodified. +// All keys must be of type either string (for map keys) or int (for slice indexes). +// If a key type doesn't match the corresponding element type (string for map, int for slice), an error is returned. +func deleteFromValues(values interface{}, keys ...interface{}) (interface{}, error) { + if values == nil { + return nil, nil + } + if len(keys) == 0 { + return values, nil + } + var ok bool + switch keys[0].(type) { + case string: + key := keys[0].(string) + var m map[string]interface{} + if m, ok = values.(map[string]interface{}); !ok { + return values, fmt.Errorf("cannot use key '%s' with a non-map value", key) + } + if _, ok = m[key]; ok { + if len(keys) == 1 { + delete(m, key) + } else { + x, err := deleteFromValues(m[key], keys[1:]...) + if err != nil { + return m, err + } + m[key] = x + } + } + return m, nil + case int: + index := keys[0].(int) + var s []interface{} + if s, ok = values.([]interface{}); !ok { + return values, fmt.Errorf("cannot use index '%d' with a non-slice value", index) + } + if index >= 0 && index < len(s) { + if len(keys) == 1 { + s = append(s[:index], s[index+1:]...) + } else { + x, err := deleteFromValues(s[index], keys[1:]...) + if err != nil { + return s, err + } + s[index] = x + } + } + return s, nil + default: + return values, fmt.Errorf("key '%v' must be of type string or int", keys[0]) + } +} + +func fromMap(values map[string]interface{}) interface{} { + if values == nil { + return nil + } + return values +} + +func toMap(x interface{}) map[string]interface{} { + if x == nil { + return nil + } + return x.(map[string]interface{}) +} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/version/version.go b/vendor/github.com/gardener/gardener/pkg/utils/version/version.go index ebbd7ca0..77a60586 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/version/version.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/version/version.go @@ -50,7 +50,7 @@ func CheckVersionMeetsConstraint(version, constraint string) (bool, error) { return false, err } - v, err := semver.NewVersion(version) + v, err := semver.NewVersion(normalizeVersion(version)) if err != nil { return false, err } diff --git a/vendor/github.com/go-logr/logr/README.md b/vendor/github.com/go-logr/logr/README.md index 26296d02..e9b5520a 100644 --- a/vendor/github.com/go-logr/logr/README.md +++ b/vendor/github.com/go-logr/logr/README.md @@ -1,9 +1,9 @@ # A more minimal logging API for Go -Before you consider this package, please read [this blog post by the inimitable -Dave Cheney](http://dave.cheney.net/2015/11/05/lets-talk-about-logging). I -really appreciate what he has to say, and it largely aligns with my own -experiences. Too many choices of levels means inconsistent logs. +Before you consider this package, please read [this blog post by the +inimitable Dave Cheney][warning-makes-no-sense]. I really appreciate what +he has to say, and it largely aligns with my own experiences. Too many +choices of levels means inconsistent logs. This package offers a purely abstract interface, based on these ideas but with a few twists. Code can depend on just this interface and have the actual @@ -31,6 +31,153 @@ may feel very similar, but the primary difference is the lack of semantics. Because verbosity is a numerical value, it's safe to assume that an app running with higher verbosity means more (and less important) logs will be generated. -This is a BETA grade API. I have implemented it for -[glog](https://godoc.org/github.com/golang/glog). Until there is a significant -2nd implementation, I don't really know how it will change. +This is a BETA grade API. + +There are implementations for the following logging libraries: + +- **github.com/google/glog**: [glogr](https://github.com/go-logr/glogr) +- **k8s.io/klog**: [klogr](https://git.k8s.io/klog/klogr) +- **go.uber.org/zap**: [zapr](https://github.com/go-logr/zapr) +- **log** (the Go standard library logger): + [stdr](https://github.com/go-logr/stdr) +- **github.com/sirupsen/logrus**: [logrusr](https://github.com/bombsimon/logrusr) +- **github.com/wojas/genericr**: [genericr](https://github.com/wojas/genericr) (makes it easy to implement your own backend) +- **logfmt** (Heroku style [logging](https://www.brandur.org/logfmt)): [logfmtr](https://github.com/iand/logfmtr) + +# FAQ + +## Conceptual + +## Why structured logging? + +- **Structured logs are more easily queriable**: Since you've got + key-value pairs, it's much easier to query your structured logs for + particular values by filtering on the contents of a particular key -- + think searching request logs for error codes, Kubernetes reconcilers for + the name and namespace of the reconciled object, etc + +- **Structured logging makes it easier to have cross-referencable logs**: + Similarly to searchability, if you maintain conventions around your + keys, it becomes easy to gather all log lines related to a particular + concept. + +- **Structured logs allow better dimensions of filtering**: if you have + structure to your logs, you've got more precise control over how much + information is logged -- you might choose in a particular configuration + to log certain keys but not others, only log lines where a certain key + matches a certain value, etc, instead of just having v-levels and names + to key off of. + +- **Structured logs better represent structured data**: sometimes, the + data that you want to log is inherently structured (think tuple-link + objects). Structured logs allow you to preserve that structure when + outputting. + +## Why V-levels? + +**V-levels give operators an easy way to control the chattiness of log +operations**. V-levels provide a way for a given package to distinguish +the relative importance or verbosity of a given log message. Then, if +a particular logger or package is logging too many messages, the user +of the package can simply change the v-levels for that library. + +## Why not more named levels, like Warning? + +Read [Dave Cheney's post][warning-makes-no-sense]. Then read [Differences +from Dave's ideas](#differences-from-daves-ideas). + +## Why not allow format strings, too? + +**Format strings negate many of the benefits of structured logs**: + +- They're not easily searchable without resorting to fuzzy searching, + regular expressions, etc + +- They don't store structured data well, since contents are flattened into + a string + +- They're not cross-referencable + +- They don't compress easily, since the message is not constant + +(unless you turn positional parameters into key-value pairs with numerical +keys, at which point you've gotten key-value logging with meaningless +keys) + +## Practical + +## Why key-value pairs, and not a map? + +Key-value pairs are *much* easier to optimize, especially around +allocations. Zap (a structured logger that inspired logr's interface) has +[performance measurements](https://github.com/uber-go/zap#performance) +that show this quite nicely. + +While the interface ends up being a little less obvious, you get +potentially better performance, plus avoid making users type +`map[string]string{}` every time they want to log. + +## What if my V-levels differ between libraries? + +That's fine. Control your V-levels on a per-logger basis, and use the +`WithName` function to pass different loggers to different libraries. + +Generally, you should take care to ensure that you have relatively +consistent V-levels within a given logger, however, as this makes deciding +on what verbosity of logs to request easier. + +## But I *really* want to use a format string! + +That's not actually a question. Assuming your question is "how do +I convert my mental model of logging with format strings to logging with +constant messages": + +1. figure out what the error actually is, as you'd write in a TL;DR style, + and use that as a message + +2. For every place you'd write a format specifier, look to the word before + it, and add that as a key value pair + +For instance, consider the following examples (all taken from spots in the +Kubernetes codebase): + +- `klog.V(4).Infof("Client is returning errors: code %v, error %v", + responseCode, err)` becomes `logger.Error(err, "client returned an + error", "code", responseCode)` + +- `klog.V(4).Infof("Got a Retry-After %ds response for attempt %d to %v", + seconds, retries, url)` becomes `logger.V(4).Info("got a retry-after + response when requesting url", "attempt", retries, "after + seconds", seconds, "url", url)` + +If you *really* must use a format string, place it as a key value, and +call `fmt.Sprintf` yourself -- for instance, `log.Printf("unable to +reflect over type %T")` becomes `logger.Info("unable to reflect over +type", "type", fmt.Sprintf("%T"))`. In general though, the cases where +this is necessary should be few and far between. + +## How do I choose my V-levels? + +This is basically the only hard constraint: increase V-levels to denote +more verbose or more debug-y logs. + +Otherwise, you can start out with `0` as "you always want to see this", +`1` as "common logging that you might *possibly* want to turn off", and +`10` as "I would like to performance-test your log collection stack". + +Then gradually choose levels in between as you need them, working your way +down from 10 (for debug and trace style logs) and up from 1 (for chattier +info-type logs). + +## How do I choose my keys + +- make your keys human-readable +- constant keys are generally a good idea +- be consistent across your codebase +- keys should naturally match parts of the message string + +While key names are mostly unrestricted (and spaces are acceptable), +it's generally a good idea to stick to printable ascii characters, or at +least match the general character set of your log lines. + +[warning-makes-no-sense]: http://dave.cheney.net/2015/11/05/lets-talk-about-logging diff --git a/vendor/github.com/go-logr/logr/discard.go b/vendor/github.com/go-logr/logr/discard.go new file mode 100644 index 00000000..267c796c --- /dev/null +++ b/vendor/github.com/go-logr/logr/discard.go @@ -0,0 +1,35 @@ +package logr + +// Discard returns a valid Logger that discards all messages logged to it. +// It can be used whenever the caller is not interested in the logs. +func Discard() Logger { + return discardLogger{} +} + +// discardLogger is a Logger that discards all messages. +type discardLogger struct{} + +func (l discardLogger) Enabled() bool { + return false +} + +func (l discardLogger) Info(msg string, keysAndValues ...interface{}) { +} + +func (l discardLogger) Error(err error, msg string, keysAndValues ...interface{}) { +} + +func (l discardLogger) V(level int) Logger { + return l +} + +func (l discardLogger) WithValues(keysAndValues ...interface{}) Logger { + return l +} + +func (l discardLogger) WithName(name string) Logger { + return l +} + +// Verify that it actually implements the interface +var _ Logger = discardLogger{} diff --git a/vendor/github.com/go-logr/logr/go.mod b/vendor/github.com/go-logr/logr/go.mod new file mode 100644 index 00000000..591884e9 --- /dev/null +++ b/vendor/github.com/go-logr/logr/go.mod @@ -0,0 +1,3 @@ +module github.com/go-logr/logr + +go 1.14 diff --git a/vendor/github.com/go-logr/logr/logr.go b/vendor/github.com/go-logr/logr/logr.go index ad72e788..e86896c6 100644 --- a/vendor/github.com/go-logr/logr/logr.go +++ b/vendor/github.com/go-logr/logr/logr.go @@ -1,3 +1,19 @@ +/* +Copyright 2019 The logr Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + // Package logr defines abstract interfaces for logging. Packages can depend on // these interfaces and callers can implement logging in whatever way is // appropriate. @@ -13,95 +29,131 @@ // // Usage // -// Logging is done using a Logger. Loggers can have name prefixes and named values -// attached, so that all log messages logged with that Logger have some base context -// associated. +// Logging is done using a Logger. Loggers can have name prefixes and named +// values attached, so that all log messages logged with that Logger have some +// base context associated. // -// The term "key" is used to refer to the name associated with a particular value, to -// disambiguate it from the general Logger name. +// The term "key" is used to refer to the name associated with a particular +// value, to disambiguate it from the general Logger name. // -// For instance, suppose we're trying to reconcile the state of an object, and we want -// to log that we've made some decision. +// For instance, suppose we're trying to reconcile the state of an object, and +// we want to log that we've made some decision. // -// With the traditional log package, we might write -// log.Printf( -// "decided to set field foo to value %q for object %s/%s", +// With the traditional log package, we might write: +// log.Printf("decided to set field foo to value %q for object %s/%s", // targetValue, object.Namespace, object.Name) // -// With logr's structured logging, we'd write -// // elsewhere in the file, set up the logger to log with the prefix of "reconcilers", -// // and the named value target-type=Foo, for extra context. -// log := mainLogger.WithName("reconcilers").WithValues("target-type", "Foo") +// With logr's structured logging, we'd write: +// // elsewhere in the file, set up the logger to log with the prefix of +// // "reconcilers", and the named value target-type=Foo, for extra context. +// log := mainLogger.WithName("reconcilers").WithValues("target-type", "Foo") // -// // later on... -// log.Info("setting field foo on object", "value", targetValue, "object", object) +// // later on... +// log.Info("setting foo on object", "value", targetValue, "object", object) // -// Depending on our logging implementation, we could then make logging decisions based on field values -// (like only logging such events for objects in a certain namespace), or copy the structured -// information into a structured log store. +// Depending on our logging implementation, we could then make logging decisions +// based on field values (like only logging such events for objects in a certain +// namespace), or copy the structured information into a structured log store. // -// For logging errors, Logger has a method called Error. Suppose we wanted to log an -// error while reconciling. With the traditional log package, we might write +// For logging errors, Logger has a method called Error. Suppose we wanted to +// log an error while reconciling. With the traditional log package, we might +// write: // log.Errorf("unable to reconcile object %s/%s: %v", object.Namespace, object.Name, err) // -// With logr, we'd instead write +// With logr, we'd instead write: // // assuming the above setup for log // log.Error(err, "unable to reconcile object", "object", object) // // This functions similarly to: // log.Info("unable to reconcile object", "error", err, "object", object) // -// However, it ensures that a standard key for the error value ("error") is used across all -// error logging. Furthermore, certain implementations may choose to attach additional -// information (such as stack traces) on calls to Error, so it's preferred to use Error -// to log errors. +// However, it ensures that a standard key for the error value ("error") is used +// across all error logging. Furthermore, certain implementations may choose to +// attach additional information (such as stack traces) on calls to Error, so +// it's preferred to use Error to log errors. // // Parts of a log line // // Each log message from a Logger has four types of context: // logger name, log verbosity, log message, and the named values. // -// The Logger name constists of a series of name "segments" added by successive calls to WithName. -// These name segments will be joined in some way by the underlying implementation. It is strongly -// reccomended that name segements contain simple identifiers (letters, digits, and hyphen), and do -// not contain characters that could muddle the log output or confuse the joining operation (e.g. -// whitespace, commas, periods, slashes, brackets, quotes, etc). +// The Logger name consists of a series of name "segments" added by successive +// calls to WithName. These name segments will be joined in some way by the +// underlying implementation. It is strongly recommended that name segments +// contain simple identifiers (letters, digits, and hyphen), and do not contain +// characters that could muddle the log output or confuse the joining operation +// (e.g. whitespace, commas, periods, slashes, brackets, quotes, etc). // -// Log verbosity represents how little a log matters. Level zero, the default, matters most. -// Increasing levels matter less and less. Try to avoid lots of different verbosity levels, -// and instead provide useful keys, logger names, and log messages for users to filter on. -// It's illegal to pass a log level below zero. +// Log verbosity represents how little a log matters. Level zero, the default, +// matters most. Increasing levels matter less and less. Try to avoid lots of +// different verbosity levels, and instead provide useful keys, logger names, +// and log messages for users to filter on. It's illegal to pass a log level +// below zero. // -// The log message consists of a constant message attached to the the log line. This -// should generally be a simple description of what's occuring, and should never be a format string. +// The log message consists of a constant message attached to the log line. +// This should generally be a simple description of what's occurring, and should +// never be a format string. // -// Variable information can then be attached using named values (key/value pairs). Keys are arbitrary -// strings, while values may be any Go value. +// Variable information can then be attached using named values (key/value +// pairs). Keys are arbitrary strings, while values may be any Go value. // // Key Naming Conventions // -// While users are generally free to use key names of their choice, it's generally best to avoid -// using the following keys, as they're frequently used by implementations: +// Keys are not strictly required to conform to any specification or regex, but +// it is recommended that they: +// * be human-readable and meaningful (not auto-generated or simple ordinals) +// * be constant (not dependent on input data) +// * contain only printable characters +// * not contain whitespace or punctuation +// +// These guidelines help ensure that log data is processed properly regardless +// of the log implementation. For example, log implementations will try to +// output JSON data or will store data for later database (e.g. SQL) queries. +// +// While users are generally free to use key names of their choice, it's +// generally best to avoid using the following keys, as they're frequently used +// by implementations: // -// - `"error"`: the underlying error value in the `Error` method. -// - `"stacktrace"`: the stack trace associated with a particular log line or error -// (often from the `Error` message). // - `"caller"`: the calling information (file/line) of a particular log line. -// - `"msg"`: the log message. +// - `"error"`: the underlying error value in the `Error` method. // - `"level"`: the log level. +// - `"logger"`: the name of the associated logger. +// - `"msg"`: the log message. +// - `"stacktrace"`: the stack trace associated with a particular log line or +// error (often from the `Error` message). // - `"ts"`: the timestamp for a log line. // -// Implementations are encouraged to make use of these keys to represent the above -// concepts, when neccessary (for example, in a pure-JSON output form, it would be -// necessary to represent at least message and timestamp as ordinary named values). +// Implementations are encouraged to make use of these keys to represent the +// above concepts, when necessary (for example, in a pure-JSON output form, it +// would be necessary to represent at least message and timestamp as ordinary +// named values). +// +// Implementations may choose to give callers access to the underlying +// logging implementation. The recommended pattern for this is: +// // Underlier exposes access to the underlying logging implementation. +// // Since callers only have a logr.Logger, they have to know which +// // implementation is in use, so this interface is less of an abstraction +// // and more of way to test type conversion. +// type Underlier interface { +// GetUnderlying() +// } package logr +import ( + "context" +) + // TODO: consider adding back in format strings if they're really needed // TODO: consider other bits of zap/zapcore functionality like ObjectMarshaller (for arbitrary objects) // TODO: consider other bits of glog functionality like Flush, InfoDepth, OutputStats -// InfoLogger represents the ability to log non-error messages, at a particular verbosity. -type InfoLogger interface { +// Logger represents the ability to log messages, both errors and not. +type Logger interface { + // Enabled tests whether this Logger is enabled. For example, commandline + // flags might be used to set the logging verbosity and disable some info + // logs. + Enabled() bool + // Info logs a non-error message with the given key/value pairs as context. // // The msg argument should be used to add some constant description to @@ -110,19 +162,6 @@ type InfoLogger interface { // keys and arbitrary values. Info(msg string, keysAndValues ...interface{}) - // Enabled tests whether this InfoLogger is enabled. For example, - // commandline flags might be used to set the logging verbosity and disable - // some info logs. - Enabled() bool -} - -// Logger represents the ability to log messages, both errors and not. -type Logger interface { - // All Loggers implement InfoLogger. Calling InfoLogger methods directly on - // a Logger value is equivalent to calling them on a V(0) InfoLogger. For - // example, logger.Info() produces the same result as logger.V(0).Info. - InfoLogger - // Error logs an error, with the given message and key/value pairs as context. // It functions similarly to calling Info with the "error" named value, but may // have unique behavior, and should be preferred for logging errors (see the @@ -133,10 +172,11 @@ type Logger interface { // triggered this log line, if present. Error(err error, msg string, keysAndValues ...interface{}) - // V returns an InfoLogger value for a specific verbosity level. A higher - // verbosity level means a log message is less important. It's illegal to - // pass a log level less than zero. - V(level int) InfoLogger + // V returns an Logger value for a specific verbosity level, relative to + // this Logger. In other words, V values are additive. V higher verbosity + // level means a log message is less important. It's illegal to pass a log + // level less than zero. + V(level int) Logger // WithValues adds some key-value pairs of context to a logger. // See Info for documentation on how key/value pairs work. @@ -144,8 +184,39 @@ type Logger interface { // WithName adds a new element to the logger's name. // Successive calls with WithName continue to append - // suffixes to the logger's name. It's strongly reccomended + // suffixes to the logger's name. It's strongly recommended // that name segments contain only letters, digits, and hyphens // (see the package documentation for more information). WithName(name string) Logger } + +// InfoLogger provides compatibility with code that relies on the v0.1.0 interface +// Deprecated: use Logger instead. This will be removed in a future release. +type InfoLogger = Logger + +type contextKey struct{} + +// FromContext returns a Logger constructed from ctx or nil if no +// logger details are found. +func FromContext(ctx context.Context) Logger { + if v, ok := ctx.Value(contextKey{}).(Logger); ok { + return v + } + + return nil +} + +// FromContextOrDiscard returns a Logger constructed from ctx or a Logger +// that discards all messages if no logger details are found. +func FromContextOrDiscard(ctx context.Context) Logger { + if v, ok := ctx.Value(contextKey{}).(Logger); ok { + return v + } + + return discardLogger{} +} + +// NewContext returns a new context derived from ctx that embeds the Logger. +func NewContext(ctx context.Context, l Logger) context.Context { + return context.WithValue(ctx, contextKey{}, l) +} diff --git a/vendor/github.com/go-logr/zapr/README.md b/vendor/github.com/go-logr/zapr/README.md index 8472875f..548470ee 100644 --- a/vendor/github.com/go-logr/zapr/README.md +++ b/vendor/github.com/go-logr/zapr/README.md @@ -2,7 +2,7 @@ Zapr :zap: ========== A [logr](https://github.com/go-logr/logr) implementation using -[Zap](go.uber.org/zap). +[Zap](https://github.com/uber-go/zap). Usage ----- @@ -13,7 +13,7 @@ import ( "go.uber.org/zap" "github.com/go-logr/logr" - "github.com/directxman12/zapr" + "github.com/go-logr/zapr" ) func main() { diff --git a/vendor/github.com/go-logr/zapr/go.mod b/vendor/github.com/go-logr/zapr/go.mod new file mode 100644 index 00000000..f7d7e256 --- /dev/null +++ b/vendor/github.com/go-logr/zapr/go.mod @@ -0,0 +1,10 @@ +module github.com/go-logr/zapr + +go 1.12 + +require ( + github.com/go-logr/logr v0.2.0 + go.uber.org/atomic v1.3.2 + go.uber.org/multierr v1.1.0 + go.uber.org/zap v1.8.0 +) diff --git a/vendor/github.com/go-logr/zapr/zapr.go b/vendor/github.com/go-logr/zapr/zapr.go index a9a10ae2..09a074d0 100644 --- a/vendor/github.com/go-logr/zapr/zapr.go +++ b/vendor/github.com/go-logr/zapr/zapr.go @@ -1,3 +1,19 @@ +/* +Copyright 2019 The logr Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + // Copyright 2018 Solly Ross // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,7 +43,7 @@ // For the most part, concepts in Zap correspond directly with those in // logr. // -// Unlike Zap, all fields *must* be in the form of suggared fields -- +// Unlike Zap, all fields *must* be in the form of sugared fields -- // it's illegal to pass a strongly-typed Zap field in a key position // to any of the log methods. // @@ -43,40 +59,18 @@ import ( "go.uber.org/zap/zapcore" ) -// noopInfoLogger is a logr.InfoLogger that's always disabled, and does nothing. -type noopInfoLogger struct{} - -func (l *noopInfoLogger) Enabled() bool { return false } -func (l *noopInfoLogger) Info(_ string, _ ...interface{}) {} - -var disabledInfoLogger = &noopInfoLogger{} - // NB: right now, we always use the equivalent of sugared logging. // This is necessary, since logr doesn't define non-suggared types, // and using zap-specific non-suggared types would make uses tied // directly to Zap. -// infoLogger is a logr.InfoLogger that uses Zap to log at a particular -// level. The level has already been converted to a Zap level, which -// is to say that `logrLevel = -1*zapLevel`. -type infoLogger struct { - lvl zapcore.Level - l *zap.Logger -} - -func (l *infoLogger) Enabled() bool { return true } -func (l *infoLogger) Info(msg string, keysAndVals ...interface{}) { - if checkedEntry := l.l.Check(l.lvl, msg); checkedEntry != nil { - checkedEntry.Write(handleFields(l.l, keysAndVals)...) - } -} - -// zapLogger is a logr.Logger that uses Zap to log. +// zapLogger is a logr.Logger that uses Zap to log. The level has already been +// converted to a Zap level, which is to say that `logrLevel = -1*zapLevel`. type zapLogger struct { // NB: this looks very similar to zap.SugaredLogger, but // deals with our desire to have multiple verbosity levels. - l *zap.Logger - infoLogger + l *zap.Logger + lvl zapcore.Level } // handleFields converts a bunch of arbitrary key-value pairs into Zap fields. It takes @@ -124,40 +118,50 @@ func handleFields(l *zap.Logger, args []interface{}, additional ...zap.Field) [] return append(fields, additional...) } -func (l *zapLogger) Error(err error, msg string, keysAndVals ...interface{}) { - if checkedEntry := l.l.Check(zap.ErrorLevel, msg); checkedEntry != nil { - checkedEntry.Write(handleFields(l.l, keysAndVals, zap.Error(err))...) +func (zl *zapLogger) Enabled() bool { + return zl.l.Core().Enabled(zl.lvl) +} + +func (zl *zapLogger) Info(msg string, keysAndVals ...interface{}) { + if checkedEntry := zl.l.Check(zl.lvl, msg); checkedEntry != nil { + checkedEntry.Write(handleFields(zl.l, keysAndVals)...) } } -func (l *zapLogger) V(level int) logr.InfoLogger { - lvl := zapcore.Level(-1 * level) - if l.l.Core().Enabled(lvl) { - return &infoLogger{ - lvl: lvl, - l: l.l, - } +func (zl *zapLogger) Error(err error, msg string, keysAndVals ...interface{}) { + if checkedEntry := zl.l.Check(zap.ErrorLevel, msg); checkedEntry != nil { + checkedEntry.Write(handleFields(zl.l, keysAndVals, zap.Error(err))...) } - return disabledInfoLogger } -func (l *zapLogger) WithValues(keysAndValues ...interface{}) logr.Logger { - newLogger := l.l.With(handleFields(l.l, keysAndValues)...) - return NewLogger(newLogger) +func (zl *zapLogger) V(level int) logr.Logger { + return &zapLogger{ + lvl: zl.lvl - zapcore.Level(level), + l: zl.l, + } } -func (l *zapLogger) WithName(name string) logr.Logger { - newLogger := l.l.Named(name) - return NewLogger(newLogger) +func (zl *zapLogger) WithValues(keysAndValues ...interface{}) logr.Logger { + newLogger := zl.l.With(handleFields(zl.l, keysAndValues)...) + return newLoggerWithExtraSkip(newLogger, 0) } -// NewLogger creates a new logr.Logger using the given Zap Logger to log. -func NewLogger(l *zap.Logger) logr.Logger { +func (zl *zapLogger) WithName(name string) logr.Logger { + newLogger := zl.l.Named(name) + return newLoggerWithExtraSkip(newLogger, 0) +} + +// newLoggerWithExtraSkip allows creation of loggers with variable levels of callstack skipping +func newLoggerWithExtraSkip(l *zap.Logger, callerSkip int) logr.Logger { + log := l.WithOptions(zap.AddCallerSkip(callerSkip)) return &zapLogger{ - l: l, - infoLogger: infoLogger{ - l: l, - lvl: zap.InfoLevel, - }, + l: log, + lvl: zap.InfoLevel, } } + +// NewLogger creates a new logr.Logger using the given Zap Logger to log. +func NewLogger(l *zap.Logger) logr.Logger { + // creates a new logger skipping one level of callstack + return newLoggerWithExtraSkip(l, 1) +} diff --git a/vendor/github.com/gobuffalo/packr/v2/SHOULDERS.md b/vendor/github.com/gobuffalo/packr/v2/SHOULDERS.md index f48ec1d7..2f6f5c02 100644 --- a/vendor/github.com/gobuffalo/packr/v2/SHOULDERS.md +++ b/vendor/github.com/gobuffalo/packr/v2/SHOULDERS.md @@ -1,222 +1,32 @@ -# github.com/gobuffalo/packr/v2 Stands on the Shoulders of Giants +# /Users/smichalak/dev/packr/v2 Stands on the Shoulders of Giants -github.com/gobuffalo/packr/v2 does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants, this project would not be possible. Please make sure to check them out and thank them for all of their hard work. +/Users/smichalak/dev/packr/v2 does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants, this project would not be possible. Please make sure to check them out and thank them for all of their hard work. Thank you to the following **GIANTS**: -* [cloud.google.com/go](https://godoc.org/cloud.google.com/go) - -* [github.com/BurntSushi/toml](https://godoc.org/github.com/BurntSushi/toml) - -* [github.com/OneOfOne/xxhash](https://godoc.org/github.com/OneOfOne/xxhash) - -* [github.com/alecthomas/template](https://godoc.org/github.com/alecthomas/template) - -* [github.com/alecthomas/units](https://godoc.org/github.com/alecthomas/units) - -* [github.com/armon/consul-api](https://godoc.org/github.com/armon/consul-api) - -* [github.com/beorn7/perks](https://godoc.org/github.com/beorn7/perks) - -* [github.com/cespare/xxhash](https://godoc.org/github.com/cespare/xxhash) - -* [github.com/client9/misspell](https://godoc.org/github.com/client9/misspell) - -* [github.com/coreos/bbolt](https://godoc.org/github.com/coreos/bbolt) - -* [github.com/coreos/etcd](https://godoc.org/github.com/coreos/etcd) - -* [github.com/coreos/go-semver](https://godoc.org/github.com/coreos/go-semver) - -* [github.com/coreos/go-systemd](https://godoc.org/github.com/coreos/go-systemd) - -* [github.com/coreos/pkg](https://godoc.org/github.com/coreos/pkg) - -* [github.com/cpuguy83/go-md2man/v2](https://godoc.org/github.com/cpuguy83/go-md2man/v2) - -* [github.com/davecgh/go-spew](https://godoc.org/github.com/davecgh/go-spew) - -* [github.com/dgrijalva/jwt-go](https://godoc.org/github.com/dgrijalva/jwt-go) - -* [github.com/dgryski/go-sip13](https://godoc.org/github.com/dgryski/go-sip13) - -* [github.com/fsnotify/fsnotify](https://godoc.org/github.com/fsnotify/fsnotify) - -* [github.com/ghodss/yaml](https://godoc.org/github.com/ghodss/yaml) - -* [github.com/go-kit/kit](https://godoc.org/github.com/go-kit/kit) - -* [github.com/go-logfmt/logfmt](https://godoc.org/github.com/go-logfmt/logfmt) - -* [github.com/go-stack/stack](https://godoc.org/github.com/go-stack/stack) - * [github.com/gobuffalo/logger](https://godoc.org/github.com/gobuffalo/logger) * [github.com/gobuffalo/packd](https://godoc.org/github.com/gobuffalo/packd) -* [github.com/gogo/protobuf](https://godoc.org/github.com/gogo/protobuf) - -* [github.com/golang/glog](https://godoc.org/github.com/golang/glog) - -* [github.com/golang/groupcache](https://godoc.org/github.com/golang/groupcache) - -* [github.com/golang/mock](https://godoc.org/github.com/golang/mock) - -* [github.com/golang/protobuf](https://godoc.org/github.com/golang/protobuf) - -* [github.com/google/btree](https://godoc.org/github.com/google/btree) - -* [github.com/google/go-cmp](https://godoc.org/github.com/google/go-cmp) - -* [github.com/gorilla/websocket](https://godoc.org/github.com/gorilla/websocket) - -* [github.com/grpc-ecosystem/go-grpc-middleware](https://godoc.org/github.com/grpc-ecosystem/go-grpc-middleware) - -* [github.com/grpc-ecosystem/go-grpc-prometheus](https://godoc.org/github.com/grpc-ecosystem/go-grpc-prometheus) - -* [github.com/grpc-ecosystem/grpc-gateway](https://godoc.org/github.com/grpc-ecosystem/grpc-gateway) - -* [github.com/hashicorp/hcl](https://godoc.org/github.com/hashicorp/hcl) - -* [github.com/inconshreveable/mousetrap](https://godoc.org/github.com/inconshreveable/mousetrap) - -* [github.com/jonboulle/clockwork](https://godoc.org/github.com/jonboulle/clockwork) - -* [github.com/julienschmidt/httprouter](https://godoc.org/github.com/julienschmidt/httprouter) - * [github.com/karrick/godirwalk](https://godoc.org/github.com/karrick/godirwalk) -* [github.com/kisielk/errcheck](https://godoc.org/github.com/kisielk/errcheck) - -* [github.com/kisielk/gotool](https://godoc.org/github.com/kisielk/gotool) - * [github.com/konsorten/go-windows-terminal-sequences](https://godoc.org/github.com/konsorten/go-windows-terminal-sequences) -* [github.com/kr/logfmt](https://godoc.org/github.com/kr/logfmt) - -* [github.com/kr/pretty](https://godoc.org/github.com/kr/pretty) - -* [github.com/kr/pty](https://godoc.org/github.com/kr/pty) - -* [github.com/kr/text](https://godoc.org/github.com/kr/text) - -* [github.com/magiconair/properties](https://godoc.org/github.com/magiconair/properties) - * [github.com/markbates/errx](https://godoc.org/github.com/markbates/errx) * [github.com/markbates/oncer](https://godoc.org/github.com/markbates/oncer) * [github.com/markbates/safe](https://godoc.org/github.com/markbates/safe) -* [github.com/matttproud/golang_protobuf_extensions](https://godoc.org/github.com/matttproud/golang_protobuf_extensions) - -* [github.com/mitchellh/go-homedir](https://godoc.org/github.com/mitchellh/go-homedir) - -* [github.com/mitchellh/mapstructure](https://godoc.org/github.com/mitchellh/mapstructure) - -* [github.com/mwitkow/go-conntrack](https://godoc.org/github.com/mwitkow/go-conntrack) - -* [github.com/oklog/ulid](https://godoc.org/github.com/oklog/ulid) - -* [github.com/pelletier/go-toml](https://godoc.org/github.com/pelletier/go-toml) - -* [github.com/pkg/errors](https://godoc.org/github.com/pkg/errors) - -* [github.com/pmezard/go-difflib](https://godoc.org/github.com/pmezard/go-difflib) - -* [github.com/prometheus/client_golang](https://godoc.org/github.com/prometheus/client_golang) - -* [github.com/prometheus/client_model](https://godoc.org/github.com/prometheus/client_model) - -* [github.com/prometheus/common](https://godoc.org/github.com/prometheus/common) - -* [github.com/prometheus/procfs](https://godoc.org/github.com/prometheus/procfs) - -* [github.com/prometheus/tsdb](https://godoc.org/github.com/prometheus/tsdb) - -* [github.com/rogpeppe/fastuuid](https://godoc.org/github.com/rogpeppe/fastuuid) - * [github.com/rogpeppe/go-internal](https://godoc.org/github.com/rogpeppe/go-internal) -* [github.com/russross/blackfriday/v2](https://godoc.org/github.com/russross/blackfriday/v2) - -* [github.com/shurcooL/sanitized_anchor_name](https://godoc.org/github.com/shurcooL/sanitized_anchor_name) - * [github.com/sirupsen/logrus](https://godoc.org/github.com/sirupsen/logrus) -* [github.com/soheilhy/cmux](https://godoc.org/github.com/soheilhy/cmux) - -* [github.com/spaolacci/murmur3](https://godoc.org/github.com/spaolacci/murmur3) - -* [github.com/spf13/afero](https://godoc.org/github.com/spf13/afero) - -* [github.com/spf13/cast](https://godoc.org/github.com/spf13/cast) - * [github.com/spf13/cobra](https://godoc.org/github.com/spf13/cobra) -* [github.com/spf13/jwalterweatherman](https://godoc.org/github.com/spf13/jwalterweatherman) - -* [github.com/spf13/pflag](https://godoc.org/github.com/spf13/pflag) - -* [github.com/spf13/viper](https://godoc.org/github.com/spf13/viper) - -* [github.com/stretchr/objx](https://godoc.org/github.com/stretchr/objx) - * [github.com/stretchr/testify](https://godoc.org/github.com/stretchr/testify) -* [github.com/tmc/grpc-websocket-proxy](https://godoc.org/github.com/tmc/grpc-websocket-proxy) - -* [github.com/ugorji/go](https://godoc.org/github.com/ugorji/go) - -* [github.com/xiang90/probing](https://godoc.org/github.com/xiang90/probing) - -* [github.com/xordataexchange/crypt](https://godoc.org/github.com/xordataexchange/crypt) - -* [go.etcd.io/bbolt](https://godoc.org/go.etcd.io/bbolt) - -* [go.uber.org/atomic](https://godoc.org/go.uber.org/atomic) - -* [go.uber.org/multierr](https://godoc.org/go.uber.org/multierr) - -* [go.uber.org/zap](https://godoc.org/go.uber.org/zap) - -* [golang.org/x/crypto](https://godoc.org/golang.org/x/crypto) - -* [golang.org/x/lint](https://godoc.org/golang.org/x/lint) - -* [golang.org/x/mod](https://godoc.org/golang.org/x/mod) - -* [golang.org/x/net](https://godoc.org/golang.org/x/net) - -* [golang.org/x/oauth2](https://godoc.org/golang.org/x/oauth2) - * [golang.org/x/sync](https://godoc.org/golang.org/x/sync) -* [golang.org/x/sys](https://godoc.org/golang.org/x/sys) - -* [golang.org/x/text](https://godoc.org/golang.org/x/text) - -* [golang.org/x/time](https://godoc.org/golang.org/x/time) - * [golang.org/x/tools](https://godoc.org/golang.org/x/tools) - -* [golang.org/x/xerrors](https://godoc.org/golang.org/x/xerrors) - -* [google.golang.org/appengine](https://godoc.org/google.golang.org/appengine) - -* [google.golang.org/genproto](https://godoc.org/google.golang.org/genproto) - -* [google.golang.org/grpc](https://godoc.org/google.golang.org/grpc) - -* [gopkg.in/alecthomas/kingpin.v2](https://godoc.org/gopkg.in/alecthomas/kingpin.v2) - -* [gopkg.in/check.v1](https://godoc.org/gopkg.in/check.v1) - -* [gopkg.in/errgo.v2](https://godoc.org/gopkg.in/errgo.v2) - -* [gopkg.in/resty.v1](https://godoc.org/gopkg.in/resty.v1) - -* [gopkg.in/yaml.v2](https://godoc.org/gopkg.in/yaml.v2) - -* [honnef.co/go/tools](https://godoc.org/honnef.co/go/tools) diff --git a/vendor/github.com/gobuffalo/packr/v2/go.mod b/vendor/github.com/gobuffalo/packr/v2/go.mod index c8b2be44..82bf27a3 100644 --- a/vendor/github.com/gobuffalo/packr/v2/go.mod +++ b/vendor/github.com/gobuffalo/packr/v2/go.mod @@ -5,7 +5,7 @@ go 1.13 require ( github.com/gobuffalo/logger v1.0.3 github.com/gobuffalo/packd v1.0.0 - github.com/karrick/godirwalk v1.15.3 + github.com/karrick/godirwalk v1.15.8 github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect github.com/markbates/errx v1.1.0 github.com/markbates/oncer v1.0.0 diff --git a/vendor/github.com/gobuffalo/packr/v2/go.sum b/vendor/github.com/gobuffalo/packr/v2/go.sum index 4c6292e0..86abdab8 100644 --- a/vendor/github.com/gobuffalo/packr/v2/go.sum +++ b/vendor/github.com/gobuffalo/packr/v2/go.sum @@ -47,8 +47,8 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/karrick/godirwalk v1.15.3 h1:0a2pXOgtB16CqIqXTiT7+K9L73f74n/aNQUnH6Ortew= -github.com/karrick/godirwalk v1.15.3/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= +github.com/karrick/godirwalk v1.15.8 h1:7+rWAZPn9zuRxaIqqT8Ohs2Q2Ac0msBqwRdxNCr2VVs= +github.com/karrick/godirwalk v1.15.8/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= diff --git a/vendor/github.com/gobuffalo/packr/v2/version.go b/vendor/github.com/gobuffalo/packr/v2/version.go index 30d98dd4..58e00655 100644 --- a/vendor/github.com/gobuffalo/packr/v2/version.go +++ b/vendor/github.com/gobuffalo/packr/v2/version.go @@ -1,4 +1,4 @@ package packr // Version of Packr -const Version = "v2.8.0" +const Version = "v2.8.1" diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go new file mode 100644 index 00000000..e8134ec8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go @@ -0,0 +1,1435 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* +Package jsonpb provides marshaling and unmarshaling between protocol buffers and JSON. +It follows the specification at https://developers.google.com/protocol-buffers/docs/proto3#json. + +This package produces a different output than the standard "encoding/json" package, +which does not operate correctly on protocol buffers. +*/ +package jsonpb + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "math" + "reflect" + "sort" + "strconv" + "strings" + "time" + + "github.com/gogo/protobuf/proto" + "github.com/gogo/protobuf/types" +) + +const secondInNanos = int64(time.Second / time.Nanosecond) +const maxSecondsInDuration = 315576000000 + +// Marshaler is a configurable object for converting between +// protocol buffer objects and a JSON representation for them. +type Marshaler struct { + // Whether to render enum values as integers, as opposed to string values. + EnumsAsInts bool + + // Whether to render fields with zero values. + EmitDefaults bool + + // A string to indent each level by. The presence of this field will + // also cause a space to appear between the field separator and + // value, and for newlines to be appear between fields and array + // elements. + Indent string + + // Whether to use the original (.proto) name for fields. + OrigName bool + + // A custom URL resolver to use when marshaling Any messages to JSON. + // If unset, the default resolution strategy is to extract the + // fully-qualified type name from the type URL and pass that to + // proto.MessageType(string). + AnyResolver AnyResolver +} + +// AnyResolver takes a type URL, present in an Any message, and resolves it into +// an instance of the associated message. +type AnyResolver interface { + Resolve(typeUrl string) (proto.Message, error) +} + +func defaultResolveAny(typeUrl string) (proto.Message, error) { + // Only the part of typeUrl after the last slash is relevant. + mname := typeUrl + if slash := strings.LastIndex(mname, "/"); slash >= 0 { + mname = mname[slash+1:] + } + mt := proto.MessageType(mname) + if mt == nil { + return nil, fmt.Errorf("unknown message type %q", mname) + } + return reflect.New(mt.Elem()).Interface().(proto.Message), nil +} + +// JSONPBMarshaler is implemented by protobuf messages that customize the +// way they are marshaled to JSON. Messages that implement this should +// also implement JSONPBUnmarshaler so that the custom format can be +// parsed. +// +// The JSON marshaling must follow the proto to JSON specification: +// https://developers.google.com/protocol-buffers/docs/proto3#json +type JSONPBMarshaler interface { + MarshalJSONPB(*Marshaler) ([]byte, error) +} + +// JSONPBUnmarshaler is implemented by protobuf messages that customize +// the way they are unmarshaled from JSON. Messages that implement this +// should also implement JSONPBMarshaler so that the custom format can be +// produced. +// +// The JSON unmarshaling must follow the JSON to proto specification: +// https://developers.google.com/protocol-buffers/docs/proto3#json +type JSONPBUnmarshaler interface { + UnmarshalJSONPB(*Unmarshaler, []byte) error +} + +// Marshal marshals a protocol buffer into JSON. +func (m *Marshaler) Marshal(out io.Writer, pb proto.Message) error { + v := reflect.ValueOf(pb) + if pb == nil || (v.Kind() == reflect.Ptr && v.IsNil()) { + return errors.New("Marshal called with nil") + } + // Check for unset required fields first. + if err := checkRequiredFields(pb); err != nil { + return err + } + writer := &errWriter{writer: out} + return m.marshalObject(writer, pb, "", "") +} + +// MarshalToString converts a protocol buffer object to JSON string. +func (m *Marshaler) MarshalToString(pb proto.Message) (string, error) { + var buf bytes.Buffer + if err := m.Marshal(&buf, pb); err != nil { + return "", err + } + return buf.String(), nil +} + +type int32Slice []int32 + +var nonFinite = map[string]float64{ + `"NaN"`: math.NaN(), + `"Infinity"`: math.Inf(1), + `"-Infinity"`: math.Inf(-1), +} + +// For sorting extensions ids to ensure stable output. +func (s int32Slice) Len() int { return len(s) } +func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } +func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +type isWkt interface { + XXX_WellKnownType() string +} + +var ( + wktType = reflect.TypeOf((*isWkt)(nil)).Elem() + messageType = reflect.TypeOf((*proto.Message)(nil)).Elem() +) + +// marshalObject writes a struct to the Writer. +func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent, typeURL string) error { + if jsm, ok := v.(JSONPBMarshaler); ok { + b, err := jsm.MarshalJSONPB(m) + if err != nil { + return err + } + if typeURL != "" { + // we are marshaling this object to an Any type + var js map[string]*json.RawMessage + if err = json.Unmarshal(b, &js); err != nil { + return fmt.Errorf("type %T produced invalid JSON: %v", v, err) + } + turl, err := json.Marshal(typeURL) + if err != nil { + return fmt.Errorf("failed to marshal type URL %q to JSON: %v", typeURL, err) + } + js["@type"] = (*json.RawMessage)(&turl) + if m.Indent != "" { + b, err = json.MarshalIndent(js, indent, m.Indent) + } else { + b, err = json.Marshal(js) + } + if err != nil { + return err + } + } + + out.write(string(b)) + return out.err + } + + s := reflect.ValueOf(v).Elem() + + // Handle well-known types. + if wkt, ok := v.(isWkt); ok { + switch wkt.XXX_WellKnownType() { + case "DoubleValue", "FloatValue", "Int64Value", "UInt64Value", + "Int32Value", "UInt32Value", "BoolValue", "StringValue", "BytesValue": + // "Wrappers use the same representation in JSON + // as the wrapped primitive type, ..." + sprop := proto.GetProperties(s.Type()) + return m.marshalValue(out, sprop.Prop[0], s.Field(0), indent) + case "Any": + // Any is a bit more involved. + return m.marshalAny(out, v, indent) + case "Duration": + s, ns := s.Field(0).Int(), s.Field(1).Int() + if s < -maxSecondsInDuration || s > maxSecondsInDuration { + return fmt.Errorf("seconds out of range %v", s) + } + if ns <= -secondInNanos || ns >= secondInNanos { + return fmt.Errorf("ns out of range (%v, %v)", -secondInNanos, secondInNanos) + } + if (s > 0 && ns < 0) || (s < 0 && ns > 0) { + return errors.New("signs of seconds and nanos do not match") + } + // Generated output always contains 0, 3, 6, or 9 fractional digits, + // depending on required precision, followed by the suffix "s". + f := "%d.%09d" + if ns < 0 { + ns = -ns + if s == 0 { + f = "-%d.%09d" + } + } + x := fmt.Sprintf(f, s, ns) + x = strings.TrimSuffix(x, "000") + x = strings.TrimSuffix(x, "000") + x = strings.TrimSuffix(x, ".000") + out.write(`"`) + out.write(x) + out.write(`s"`) + return out.err + case "Struct", "ListValue": + // Let marshalValue handle the `Struct.fields` map or the `ListValue.values` slice. + // TODO: pass the correct Properties if needed. + return m.marshalValue(out, &proto.Properties{}, s.Field(0), indent) + case "Timestamp": + // "RFC 3339, where generated output will always be Z-normalized + // and uses 0, 3, 6 or 9 fractional digits." + s, ns := s.Field(0).Int(), s.Field(1).Int() + if ns < 0 || ns >= secondInNanos { + return fmt.Errorf("ns out of range [0, %v)", secondInNanos) + } + t := time.Unix(s, ns).UTC() + // time.RFC3339Nano isn't exactly right (we need to get 3/6/9 fractional digits). + x := t.Format("2006-01-02T15:04:05.000000000") + x = strings.TrimSuffix(x, "000") + x = strings.TrimSuffix(x, "000") + x = strings.TrimSuffix(x, ".000") + out.write(`"`) + out.write(x) + out.write(`Z"`) + return out.err + case "Value": + // Value has a single oneof. + kind := s.Field(0) + if kind.IsNil() { + // "absence of any variant indicates an error" + return errors.New("nil Value") + } + // oneof -> *T -> T -> T.F + x := kind.Elem().Elem().Field(0) + // TODO: pass the correct Properties if needed. + return m.marshalValue(out, &proto.Properties{}, x, indent) + } + } + + out.write("{") + if m.Indent != "" { + out.write("\n") + } + + firstField := true + + if typeURL != "" { + if err := m.marshalTypeURL(out, indent, typeURL); err != nil { + return err + } + firstField = false + } + + for i := 0; i < s.NumField(); i++ { + value := s.Field(i) + valueField := s.Type().Field(i) + if strings.HasPrefix(valueField.Name, "XXX_") { + continue + } + + //this is not a protobuf field + if valueField.Tag.Get("protobuf") == "" && valueField.Tag.Get("protobuf_oneof") == "" { + continue + } + + // IsNil will panic on most value kinds. + switch value.Kind() { + case reflect.Chan, reflect.Func, reflect.Interface: + if value.IsNil() { + continue + } + } + + if !m.EmitDefaults { + switch value.Kind() { + case reflect.Bool: + if !value.Bool() { + continue + } + case reflect.Int32, reflect.Int64: + if value.Int() == 0 { + continue + } + case reflect.Uint32, reflect.Uint64: + if value.Uint() == 0 { + continue + } + case reflect.Float32, reflect.Float64: + if value.Float() == 0 { + continue + } + case reflect.String: + if value.Len() == 0 { + continue + } + case reflect.Map, reflect.Ptr, reflect.Slice: + if value.IsNil() { + continue + } + } + } + + // Oneof fields need special handling. + if valueField.Tag.Get("protobuf_oneof") != "" { + // value is an interface containing &T{real_value}. + sv := value.Elem().Elem() // interface -> *T -> T + value = sv.Field(0) + valueField = sv.Type().Field(0) + } + prop := jsonProperties(valueField, m.OrigName) + if !firstField { + m.writeSep(out) + } + // If the map value is a cast type, it may not implement proto.Message, therefore + // allow the struct tag to declare the underlying message type. Change the property + // of the child types, use CustomType as a passer. CastType currently property is + // not used in json encoding. + if value.Kind() == reflect.Map { + if tag := valueField.Tag.Get("protobuf"); tag != "" { + for _, v := range strings.Split(tag, ",") { + if !strings.HasPrefix(v, "castvaluetype=") { + continue + } + v = strings.TrimPrefix(v, "castvaluetype=") + prop.MapValProp.CustomType = v + break + } + } + } + if err := m.marshalField(out, prop, value, indent); err != nil { + return err + } + firstField = false + } + + // Handle proto2 extensions. + if ep, ok := v.(proto.Message); ok { + extensions := proto.RegisteredExtensions(v) + // Sort extensions for stable output. + ids := make([]int32, 0, len(extensions)) + for id, desc := range extensions { + if !proto.HasExtension(ep, desc) { + continue + } + ids = append(ids, id) + } + sort.Sort(int32Slice(ids)) + for _, id := range ids { + desc := extensions[id] + if desc == nil { + // unknown extension + continue + } + ext, extErr := proto.GetExtension(ep, desc) + if extErr != nil { + return extErr + } + value := reflect.ValueOf(ext) + var prop proto.Properties + prop.Parse(desc.Tag) + prop.JSONName = fmt.Sprintf("[%s]", desc.Name) + if !firstField { + m.writeSep(out) + } + if err := m.marshalField(out, &prop, value, indent); err != nil { + return err + } + firstField = false + } + + } + + if m.Indent != "" { + out.write("\n") + out.write(indent) + } + out.write("}") + return out.err +} + +func (m *Marshaler) writeSep(out *errWriter) { + if m.Indent != "" { + out.write(",\n") + } else { + out.write(",") + } +} + +func (m *Marshaler) marshalAny(out *errWriter, any proto.Message, indent string) error { + // "If the Any contains a value that has a special JSON mapping, + // it will be converted as follows: {"@type": xxx, "value": yyy}. + // Otherwise, the value will be converted into a JSON object, + // and the "@type" field will be inserted to indicate the actual data type." + v := reflect.ValueOf(any).Elem() + turl := v.Field(0).String() + val := v.Field(1).Bytes() + + var msg proto.Message + var err error + if m.AnyResolver != nil { + msg, err = m.AnyResolver.Resolve(turl) + } else { + msg, err = defaultResolveAny(turl) + } + if err != nil { + return err + } + + if err := proto.Unmarshal(val, msg); err != nil { + return err + } + + if _, ok := msg.(isWkt); ok { + out.write("{") + if m.Indent != "" { + out.write("\n") + } + if err := m.marshalTypeURL(out, indent, turl); err != nil { + return err + } + m.writeSep(out) + if m.Indent != "" { + out.write(indent) + out.write(m.Indent) + out.write(`"value": `) + } else { + out.write(`"value":`) + } + if err := m.marshalObject(out, msg, indent+m.Indent, ""); err != nil { + return err + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + } + out.write("}") + return out.err + } + + return m.marshalObject(out, msg, indent, turl) +} + +func (m *Marshaler) marshalTypeURL(out *errWriter, indent, typeURL string) error { + if m.Indent != "" { + out.write(indent) + out.write(m.Indent) + } + out.write(`"@type":`) + if m.Indent != "" { + out.write(" ") + } + b, err := json.Marshal(typeURL) + if err != nil { + return err + } + out.write(string(b)) + return out.err +} + +// marshalField writes field description and value to the Writer. +func (m *Marshaler) marshalField(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error { + if m.Indent != "" { + out.write(indent) + out.write(m.Indent) + } + out.write(`"`) + out.write(prop.JSONName) + out.write(`":`) + if m.Indent != "" { + out.write(" ") + } + if err := m.marshalValue(out, prop, v, indent); err != nil { + return err + } + return nil +} + +// marshalValue writes the value to the Writer. +func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error { + + v = reflect.Indirect(v) + + // Handle nil pointer + if v.Kind() == reflect.Invalid { + out.write("null") + return out.err + } + + // Handle repeated elements. + if v.Kind() == reflect.Slice && v.Type().Elem().Kind() != reflect.Uint8 { + out.write("[") + comma := "" + for i := 0; i < v.Len(); i++ { + sliceVal := v.Index(i) + out.write(comma) + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + out.write(m.Indent) + } + if err := m.marshalValue(out, prop, sliceVal, indent+m.Indent); err != nil { + return err + } + comma = "," + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + } + out.write("]") + return out.err + } + + // Handle well-known types. + // Most are handled up in marshalObject (because 99% are messages). + if v.Type().Implements(wktType) { + wkt := v.Interface().(isWkt) + switch wkt.XXX_WellKnownType() { + case "NullValue": + out.write("null") + return out.err + } + } + + if t, ok := v.Interface().(time.Time); ok { + ts, err := types.TimestampProto(t) + if err != nil { + return err + } + return m.marshalValue(out, prop, reflect.ValueOf(ts), indent) + } + + if d, ok := v.Interface().(time.Duration); ok { + dur := types.DurationProto(d) + return m.marshalValue(out, prop, reflect.ValueOf(dur), indent) + } + + // Handle enumerations. + if !m.EnumsAsInts && prop.Enum != "" { + // Unknown enum values will are stringified by the proto library as their + // value. Such values should _not_ be quoted or they will be interpreted + // as an enum string instead of their value. + enumStr := v.Interface().(fmt.Stringer).String() + var valStr string + if v.Kind() == reflect.Ptr { + valStr = strconv.Itoa(int(v.Elem().Int())) + } else { + valStr = strconv.Itoa(int(v.Int())) + } + + if m, ok := v.Interface().(interface { + MarshalJSON() ([]byte, error) + }); ok { + data, err := m.MarshalJSON() + if err != nil { + return err + } + enumStr = string(data) + enumStr, err = strconv.Unquote(enumStr) + if err != nil { + return err + } + } + + isKnownEnum := enumStr != valStr + + if isKnownEnum { + out.write(`"`) + } + out.write(enumStr) + if isKnownEnum { + out.write(`"`) + } + return out.err + } + + // Handle nested messages. + if v.Kind() == reflect.Struct { + i := v + if v.CanAddr() { + i = v.Addr() + } else { + i = reflect.New(v.Type()) + i.Elem().Set(v) + } + iface := i.Interface() + if iface == nil { + out.write(`null`) + return out.err + } + + if m, ok := v.Interface().(interface { + MarshalJSON() ([]byte, error) + }); ok { + data, err := m.MarshalJSON() + if err != nil { + return err + } + out.write(string(data)) + return nil + } + + pm, ok := iface.(proto.Message) + if !ok { + if prop.CustomType == "" { + return fmt.Errorf("%v does not implement proto.Message", v.Type()) + } + t := proto.MessageType(prop.CustomType) + if t == nil || !i.Type().ConvertibleTo(t) { + return fmt.Errorf("%v declared custom type %s but it is not convertible to %v", v.Type(), prop.CustomType, t) + } + pm = i.Convert(t).Interface().(proto.Message) + } + return m.marshalObject(out, pm, indent+m.Indent, "") + } + + // Handle maps. + // Since Go randomizes map iteration, we sort keys for stable output. + if v.Kind() == reflect.Map { + out.write(`{`) + keys := v.MapKeys() + sort.Sort(mapKeys(keys)) + for i, k := range keys { + if i > 0 { + out.write(`,`) + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + out.write(m.Indent) + } + + // TODO handle map key prop properly + b, err := json.Marshal(k.Interface()) + if err != nil { + return err + } + s := string(b) + + // If the JSON is not a string value, encode it again to make it one. + if !strings.HasPrefix(s, `"`) { + b, err := json.Marshal(s) + if err != nil { + return err + } + s = string(b) + } + + out.write(s) + out.write(`:`) + if m.Indent != "" { + out.write(` `) + } + + vprop := prop + if prop != nil && prop.MapValProp != nil { + vprop = prop.MapValProp + } + if err := m.marshalValue(out, vprop, v.MapIndex(k), indent+m.Indent); err != nil { + return err + } + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + } + out.write(`}`) + return out.err + } + + // Handle non-finite floats, e.g. NaN, Infinity and -Infinity. + if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 { + f := v.Float() + var sval string + switch { + case math.IsInf(f, 1): + sval = `"Infinity"` + case math.IsInf(f, -1): + sval = `"-Infinity"` + case math.IsNaN(f): + sval = `"NaN"` + } + if sval != "" { + out.write(sval) + return out.err + } + } + + // Default handling defers to the encoding/json library. + b, err := json.Marshal(v.Interface()) + if err != nil { + return err + } + needToQuote := string(b[0]) != `"` && (v.Kind() == reflect.Int64 || v.Kind() == reflect.Uint64) + if needToQuote { + out.write(`"`) + } + out.write(string(b)) + if needToQuote { + out.write(`"`) + } + return out.err +} + +// Unmarshaler is a configurable object for converting from a JSON +// representation to a protocol buffer object. +type Unmarshaler struct { + // Whether to allow messages to contain unknown fields, as opposed to + // failing to unmarshal. + AllowUnknownFields bool + + // A custom URL resolver to use when unmarshaling Any messages from JSON. + // If unset, the default resolution strategy is to extract the + // fully-qualified type name from the type URL and pass that to + // proto.MessageType(string). + AnyResolver AnyResolver +} + +// UnmarshalNext unmarshals the next protocol buffer from a JSON object stream. +// This function is lenient and will decode any options permutations of the +// related Marshaler. +func (u *Unmarshaler) UnmarshalNext(dec *json.Decoder, pb proto.Message) error { + inputValue := json.RawMessage{} + if err := dec.Decode(&inputValue); err != nil { + return err + } + if err := u.unmarshalValue(reflect.ValueOf(pb).Elem(), inputValue, nil); err != nil { + return err + } + return checkRequiredFields(pb) +} + +// Unmarshal unmarshals a JSON object stream into a protocol +// buffer. This function is lenient and will decode any options +// permutations of the related Marshaler. +func (u *Unmarshaler) Unmarshal(r io.Reader, pb proto.Message) error { + dec := json.NewDecoder(r) + return u.UnmarshalNext(dec, pb) +} + +// UnmarshalNext unmarshals the next protocol buffer from a JSON object stream. +// This function is lenient and will decode any options permutations of the +// related Marshaler. +func UnmarshalNext(dec *json.Decoder, pb proto.Message) error { + return new(Unmarshaler).UnmarshalNext(dec, pb) +} + +// Unmarshal unmarshals a JSON object stream into a protocol +// buffer. This function is lenient and will decode any options +// permutations of the related Marshaler. +func Unmarshal(r io.Reader, pb proto.Message) error { + return new(Unmarshaler).Unmarshal(r, pb) +} + +// UnmarshalString will populate the fields of a protocol buffer based +// on a JSON string. This function is lenient and will decode any options +// permutations of the related Marshaler. +func UnmarshalString(str string, pb proto.Message) error { + return new(Unmarshaler).Unmarshal(strings.NewReader(str), pb) +} + +// unmarshalValue converts/copies a value into the target. +// prop may be nil. +func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMessage, prop *proto.Properties) error { + targetType := target.Type() + + // Allocate memory for pointer fields. + if targetType.Kind() == reflect.Ptr { + // If input value is "null" and target is a pointer type, then the field should be treated as not set + // UNLESS the target is structpb.Value, in which case it should be set to structpb.NullValue. + _, isJSONPBUnmarshaler := target.Interface().(JSONPBUnmarshaler) + if string(inputValue) == "null" && targetType != reflect.TypeOf(&types.Value{}) && !isJSONPBUnmarshaler { + return nil + } + target.Set(reflect.New(targetType.Elem())) + + return u.unmarshalValue(target.Elem(), inputValue, prop) + } + + if jsu, ok := target.Addr().Interface().(JSONPBUnmarshaler); ok { + return jsu.UnmarshalJSONPB(u, []byte(inputValue)) + } + + // Handle well-known types that are not pointers. + if w, ok := target.Addr().Interface().(isWkt); ok { + switch w.XXX_WellKnownType() { + case "DoubleValue", "FloatValue", "Int64Value", "UInt64Value", + "Int32Value", "UInt32Value", "BoolValue", "StringValue", "BytesValue": + return u.unmarshalValue(target.Field(0), inputValue, prop) + case "Any": + // Use json.RawMessage pointer type instead of value to support pre-1.8 version. + // 1.8 changed RawMessage.MarshalJSON from pointer type to value type, see + // https://github.com/golang/go/issues/14493 + var jsonFields map[string]*json.RawMessage + if err := json.Unmarshal(inputValue, &jsonFields); err != nil { + return err + } + + val, ok := jsonFields["@type"] + if !ok || val == nil { + return errors.New("Any JSON doesn't have '@type'") + } + + var turl string + if err := json.Unmarshal([]byte(*val), &turl); err != nil { + return fmt.Errorf("can't unmarshal Any's '@type': %q", *val) + } + target.Field(0).SetString(turl) + + var m proto.Message + var err error + if u.AnyResolver != nil { + m, err = u.AnyResolver.Resolve(turl) + } else { + m, err = defaultResolveAny(turl) + } + if err != nil { + return err + } + + if _, ok := m.(isWkt); ok { + val, ok := jsonFields["value"] + if !ok { + return errors.New("Any JSON doesn't have 'value'") + } + + if err = u.unmarshalValue(reflect.ValueOf(m).Elem(), *val, nil); err != nil { + return fmt.Errorf("can't unmarshal Any nested proto %T: %v", m, err) + } + } else { + delete(jsonFields, "@type") + nestedProto, uerr := json.Marshal(jsonFields) + if uerr != nil { + return fmt.Errorf("can't generate JSON for Any's nested proto to be unmarshaled: %v", uerr) + } + + if err = u.unmarshalValue(reflect.ValueOf(m).Elem(), nestedProto, nil); err != nil { + return fmt.Errorf("can't unmarshal Any nested proto %T: %v", m, err) + } + } + + b, err := proto.Marshal(m) + if err != nil { + return fmt.Errorf("can't marshal proto %T into Any.Value: %v", m, err) + } + target.Field(1).SetBytes(b) + + return nil + case "Duration": + unq, err := unquote(string(inputValue)) + if err != nil { + return err + } + + d, err := time.ParseDuration(unq) + if err != nil { + return fmt.Errorf("bad Duration: %v", err) + } + + ns := d.Nanoseconds() + s := ns / 1e9 + ns %= 1e9 + target.Field(0).SetInt(s) + target.Field(1).SetInt(ns) + return nil + case "Timestamp": + unq, err := unquote(string(inputValue)) + if err != nil { + return err + } + + t, err := time.Parse(time.RFC3339Nano, unq) + if err != nil { + return fmt.Errorf("bad Timestamp: %v", err) + } + + target.Field(0).SetInt(t.Unix()) + target.Field(1).SetInt(int64(t.Nanosecond())) + return nil + case "Struct": + var m map[string]json.RawMessage + if err := json.Unmarshal(inputValue, &m); err != nil { + return fmt.Errorf("bad StructValue: %v", err) + } + target.Field(0).Set(reflect.ValueOf(map[string]*types.Value{})) + for k, jv := range m { + pv := &types.Value{} + if err := u.unmarshalValue(reflect.ValueOf(pv).Elem(), jv, prop); err != nil { + return fmt.Errorf("bad value in StructValue for key %q: %v", k, err) + } + target.Field(0).SetMapIndex(reflect.ValueOf(k), reflect.ValueOf(pv)) + } + return nil + case "ListValue": + var s []json.RawMessage + if err := json.Unmarshal(inputValue, &s); err != nil { + return fmt.Errorf("bad ListValue: %v", err) + } + + target.Field(0).Set(reflect.ValueOf(make([]*types.Value, len(s)))) + for i, sv := range s { + if err := u.unmarshalValue(target.Field(0).Index(i), sv, prop); err != nil { + return err + } + } + return nil + case "Value": + ivStr := string(inputValue) + if ivStr == "null" { + target.Field(0).Set(reflect.ValueOf(&types.Value_NullValue{})) + } else if v, err := strconv.ParseFloat(ivStr, 0); err == nil { + target.Field(0).Set(reflect.ValueOf(&types.Value_NumberValue{NumberValue: v})) + } else if v, err := unquote(ivStr); err == nil { + target.Field(0).Set(reflect.ValueOf(&types.Value_StringValue{StringValue: v})) + } else if v, err := strconv.ParseBool(ivStr); err == nil { + target.Field(0).Set(reflect.ValueOf(&types.Value_BoolValue{BoolValue: v})) + } else if err := json.Unmarshal(inputValue, &[]json.RawMessage{}); err == nil { + lv := &types.ListValue{} + target.Field(0).Set(reflect.ValueOf(&types.Value_ListValue{ListValue: lv})) + return u.unmarshalValue(reflect.ValueOf(lv).Elem(), inputValue, prop) + } else if err := json.Unmarshal(inputValue, &map[string]json.RawMessage{}); err == nil { + sv := &types.Struct{} + target.Field(0).Set(reflect.ValueOf(&types.Value_StructValue{StructValue: sv})) + return u.unmarshalValue(reflect.ValueOf(sv).Elem(), inputValue, prop) + } else { + return fmt.Errorf("unrecognized type for Value %q", ivStr) + } + return nil + } + } + + if t, ok := target.Addr().Interface().(*time.Time); ok { + ts := &types.Timestamp{} + if err := u.unmarshalValue(reflect.ValueOf(ts).Elem(), inputValue, prop); err != nil { + return err + } + tt, err := types.TimestampFromProto(ts) + if err != nil { + return err + } + *t = tt + return nil + } + + if d, ok := target.Addr().Interface().(*time.Duration); ok { + dur := &types.Duration{} + if err := u.unmarshalValue(reflect.ValueOf(dur).Elem(), inputValue, prop); err != nil { + return err + } + dd, err := types.DurationFromProto(dur) + if err != nil { + return err + } + *d = dd + return nil + } + + // Handle enums, which have an underlying type of int32, + // and may appear as strings. + // The case of an enum appearing as a number is handled + // at the bottom of this function. + if inputValue[0] == '"' && prop != nil && prop.Enum != "" { + vmap := proto.EnumValueMap(prop.Enum) + // Don't need to do unquoting; valid enum names + // are from a limited character set. + s := inputValue[1 : len(inputValue)-1] + n, ok := vmap[string(s)] + if !ok { + return fmt.Errorf("unknown value %q for enum %s", s, prop.Enum) + } + if target.Kind() == reflect.Ptr { // proto2 + target.Set(reflect.New(targetType.Elem())) + target = target.Elem() + } + if targetType.Kind() != reflect.Int32 { + return fmt.Errorf("invalid target %q for enum %s", targetType.Kind(), prop.Enum) + } + target.SetInt(int64(n)) + return nil + } + + if prop != nil && len(prop.CustomType) > 0 && target.CanAddr() { + if m, ok := target.Addr().Interface().(interface { + UnmarshalJSON([]byte) error + }); ok { + return json.Unmarshal(inputValue, m) + } + } + + // Handle nested messages. + if targetType.Kind() == reflect.Struct { + var jsonFields map[string]json.RawMessage + if err := json.Unmarshal(inputValue, &jsonFields); err != nil { + return err + } + + consumeField := func(prop *proto.Properties) (json.RawMessage, bool) { + // Be liberal in what names we accept; both orig_name and camelName are okay. + fieldNames := acceptedJSONFieldNames(prop) + + vOrig, okOrig := jsonFields[fieldNames.orig] + vCamel, okCamel := jsonFields[fieldNames.camel] + if !okOrig && !okCamel { + return nil, false + } + // If, for some reason, both are present in the data, favour the camelName. + var raw json.RawMessage + if okOrig { + raw = vOrig + delete(jsonFields, fieldNames.orig) + } + if okCamel { + raw = vCamel + delete(jsonFields, fieldNames.camel) + } + return raw, true + } + + sprops := proto.GetProperties(targetType) + for i := 0; i < target.NumField(); i++ { + ft := target.Type().Field(i) + if strings.HasPrefix(ft.Name, "XXX_") { + continue + } + valueForField, ok := consumeField(sprops.Prop[i]) + if !ok { + continue + } + + if err := u.unmarshalValue(target.Field(i), valueForField, sprops.Prop[i]); err != nil { + return err + } + } + // Check for any oneof fields. + if len(jsonFields) > 0 { + for _, oop := range sprops.OneofTypes { + raw, ok := consumeField(oop.Prop) + if !ok { + continue + } + nv := reflect.New(oop.Type.Elem()) + target.Field(oop.Field).Set(nv) + if err := u.unmarshalValue(nv.Elem().Field(0), raw, oop.Prop); err != nil { + return err + } + } + } + // Handle proto2 extensions. + if len(jsonFields) > 0 { + if ep, ok := target.Addr().Interface().(proto.Message); ok { + for _, ext := range proto.RegisteredExtensions(ep) { + name := fmt.Sprintf("[%s]", ext.Name) + raw, ok := jsonFields[name] + if !ok { + continue + } + delete(jsonFields, name) + nv := reflect.New(reflect.TypeOf(ext.ExtensionType).Elem()) + if err := u.unmarshalValue(nv.Elem(), raw, nil); err != nil { + return err + } + if err := proto.SetExtension(ep, ext, nv.Interface()); err != nil { + return err + } + } + } + } + if !u.AllowUnknownFields && len(jsonFields) > 0 { + // Pick any field to be the scapegoat. + var f string + for fname := range jsonFields { + f = fname + break + } + return fmt.Errorf("unknown field %q in %v", f, targetType) + } + return nil + } + + // Handle arrays + if targetType.Kind() == reflect.Slice { + if targetType.Elem().Kind() == reflect.Uint8 { + outRef := reflect.New(targetType) + outVal := outRef.Interface() + //CustomType with underlying type []byte + if _, ok := outVal.(interface { + UnmarshalJSON([]byte) error + }); ok { + if err := json.Unmarshal(inputValue, outVal); err != nil { + return err + } + target.Set(outRef.Elem()) + return nil + } + // Special case for encoded bytes. Pre-go1.5 doesn't support unmarshalling + // strings into aliased []byte types. + // https://github.com/golang/go/commit/4302fd0409da5e4f1d71471a6770dacdc3301197 + // https://github.com/golang/go/commit/c60707b14d6be26bf4213114d13070bff00d0b0a + var out []byte + if err := json.Unmarshal(inputValue, &out); err != nil { + return err + } + target.SetBytes(out) + return nil + } + + var slc []json.RawMessage + if err := json.Unmarshal(inputValue, &slc); err != nil { + return err + } + if slc != nil { + l := len(slc) + target.Set(reflect.MakeSlice(targetType, l, l)) + for i := 0; i < l; i++ { + if err := u.unmarshalValue(target.Index(i), slc[i], prop); err != nil { + return err + } + } + } + return nil + } + + // Handle maps (whose keys are always strings) + if targetType.Kind() == reflect.Map { + var mp map[string]json.RawMessage + if err := json.Unmarshal(inputValue, &mp); err != nil { + return err + } + if mp != nil { + target.Set(reflect.MakeMap(targetType)) + for ks, raw := range mp { + // Unmarshal map key. The core json library already decoded the key into a + // string, so we handle that specially. Other types were quoted post-serialization. + var k reflect.Value + if targetType.Key().Kind() == reflect.String { + k = reflect.ValueOf(ks) + } else { + k = reflect.New(targetType.Key()).Elem() + var kprop *proto.Properties + if prop != nil && prop.MapKeyProp != nil { + kprop = prop.MapKeyProp + } + if err := u.unmarshalValue(k, json.RawMessage(ks), kprop); err != nil { + return err + } + } + + if !k.Type().AssignableTo(targetType.Key()) { + k = k.Convert(targetType.Key()) + } + + // Unmarshal map value. + v := reflect.New(targetType.Elem()).Elem() + var vprop *proto.Properties + if prop != nil && prop.MapValProp != nil { + vprop = prop.MapValProp + } + if err := u.unmarshalValue(v, raw, vprop); err != nil { + return err + } + target.SetMapIndex(k, v) + } + } + return nil + } + + // Non-finite numbers can be encoded as strings. + isFloat := targetType.Kind() == reflect.Float32 || targetType.Kind() == reflect.Float64 + if isFloat { + if num, ok := nonFinite[string(inputValue)]; ok { + target.SetFloat(num) + return nil + } + } + + // integers & floats can be encoded as strings. In this case we drop + // the quotes and proceed as normal. + isNum := targetType.Kind() == reflect.Int64 || targetType.Kind() == reflect.Uint64 || + targetType.Kind() == reflect.Int32 || targetType.Kind() == reflect.Uint32 || + targetType.Kind() == reflect.Float32 || targetType.Kind() == reflect.Float64 + if isNum && strings.HasPrefix(string(inputValue), `"`) { + inputValue = inputValue[1 : len(inputValue)-1] + } + + // Use the encoding/json for parsing other value types. + return json.Unmarshal(inputValue, target.Addr().Interface()) +} + +func unquote(s string) (string, error) { + var ret string + err := json.Unmarshal([]byte(s), &ret) + return ret, err +} + +// jsonProperties returns parsed proto.Properties for the field and corrects JSONName attribute. +func jsonProperties(f reflect.StructField, origName bool) *proto.Properties { + var prop proto.Properties + prop.Init(f.Type, f.Name, f.Tag.Get("protobuf"), &f) + if origName || prop.JSONName == "" { + prop.JSONName = prop.OrigName + } + return &prop +} + +type fieldNames struct { + orig, camel string +} + +func acceptedJSONFieldNames(prop *proto.Properties) fieldNames { + opts := fieldNames{orig: prop.OrigName, camel: prop.OrigName} + if prop.JSONName != "" { + opts.camel = prop.JSONName + } + return opts +} + +// Writer wrapper inspired by https://blog.golang.org/errors-are-values +type errWriter struct { + writer io.Writer + err error +} + +func (w *errWriter) write(str string) { + if w.err != nil { + return + } + _, w.err = w.writer.Write([]byte(str)) +} + +// Map fields may have key types of non-float scalars, strings and enums. +// The easiest way to sort them in some deterministic order is to use fmt. +// If this turns out to be inefficient we can always consider other options, +// such as doing a Schwartzian transform. +// +// Numeric keys are sorted in numeric order per +// https://developers.google.com/protocol-buffers/docs/proto#maps. +type mapKeys []reflect.Value + +func (s mapKeys) Len() int { return len(s) } +func (s mapKeys) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s mapKeys) Less(i, j int) bool { + if k := s[i].Kind(); k == s[j].Kind() { + switch k { + case reflect.String: + return s[i].String() < s[j].String() + case reflect.Int32, reflect.Int64: + return s[i].Int() < s[j].Int() + case reflect.Uint32, reflect.Uint64: + return s[i].Uint() < s[j].Uint() + } + } + return fmt.Sprint(s[i].Interface()) < fmt.Sprint(s[j].Interface()) +} + +// checkRequiredFields returns an error if any required field in the given proto message is not set. +// This function is used by both Marshal and Unmarshal. While required fields only exist in a +// proto2 message, a proto3 message can contain proto2 message(s). +func checkRequiredFields(pb proto.Message) error { + // Most well-known type messages do not contain required fields. The "Any" type may contain + // a message that has required fields. + // + // When an Any message is being marshaled, the code will invoked proto.Unmarshal on Any.Value + // field in order to transform that into JSON, and that should have returned an error if a + // required field is not set in the embedded message. + // + // When an Any message is being unmarshaled, the code will have invoked proto.Marshal on the + // embedded message to store the serialized message in Any.Value field, and that should have + // returned an error if a required field is not set. + if _, ok := pb.(isWkt); ok { + return nil + } + + v := reflect.ValueOf(pb) + // Skip message if it is not a struct pointer. + if v.Kind() != reflect.Ptr { + return nil + } + v = v.Elem() + if v.Kind() != reflect.Struct { + return nil + } + + for i := 0; i < v.NumField(); i++ { + field := v.Field(i) + sfield := v.Type().Field(i) + + if sfield.PkgPath != "" { + // blank PkgPath means the field is exported; skip if not exported + continue + } + + if strings.HasPrefix(sfield.Name, "XXX_") { + continue + } + + // Oneof field is an interface implemented by wrapper structs containing the actual oneof + // field, i.e. an interface containing &T{real_value}. + if sfield.Tag.Get("protobuf_oneof") != "" { + if field.Kind() != reflect.Interface { + continue + } + v := field.Elem() + if v.Kind() != reflect.Ptr || v.IsNil() { + continue + } + v = v.Elem() + if v.Kind() != reflect.Struct || v.NumField() < 1 { + continue + } + field = v.Field(0) + sfield = v.Type().Field(0) + } + + protoTag := sfield.Tag.Get("protobuf") + if protoTag == "" { + continue + } + var prop proto.Properties + prop.Init(sfield.Type, sfield.Name, protoTag, &sfield) + + switch field.Kind() { + case reflect.Map: + if field.IsNil() { + continue + } + // Check each map value. + keys := field.MapKeys() + for _, k := range keys { + v := field.MapIndex(k) + if err := checkRequiredFieldsInValue(v); err != nil { + return err + } + } + case reflect.Slice: + // Handle non-repeated type, e.g. bytes. + if !prop.Repeated { + if prop.Required && field.IsNil() { + return fmt.Errorf("required field %q is not set", prop.Name) + } + continue + } + + // Handle repeated type. + if field.IsNil() { + continue + } + // Check each slice item. + for i := 0; i < field.Len(); i++ { + v := field.Index(i) + if err := checkRequiredFieldsInValue(v); err != nil { + return err + } + } + case reflect.Ptr: + if field.IsNil() { + if prop.Required { + return fmt.Errorf("required field %q is not set", prop.Name) + } + continue + } + if err := checkRequiredFieldsInValue(field); err != nil { + return err + } + } + } + + // Handle proto2 extensions. + for _, ext := range proto.RegisteredExtensions(pb) { + if !proto.HasExtension(pb, ext) { + continue + } + ep, err := proto.GetExtension(pb, ext) + if err != nil { + return err + } + err = checkRequiredFieldsInValue(reflect.ValueOf(ep)) + if err != nil { + return err + } + } + + return nil +} + +func checkRequiredFieldsInValue(v reflect.Value) error { + if v.Type().Implements(messageType) { + return checkRequiredFields(v.Interface().(proto.Message)) + } + return nil +} diff --git a/vendor/github.com/gogo/protobuf/types/any.go b/vendor/github.com/gogo/protobuf/types/any.go new file mode 100644 index 00000000..df4787de --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/any.go @@ -0,0 +1,140 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +// This file implements functions to marshal proto.Message to/from +// google.protobuf.Any message. + +import ( + "fmt" + "reflect" + "strings" + + "github.com/gogo/protobuf/proto" +) + +const googleApis = "type.googleapis.com/" + +// AnyMessageName returns the name of the message contained in a google.protobuf.Any message. +// +// Note that regular type assertions should be done using the Is +// function. AnyMessageName is provided for less common use cases like filtering a +// sequence of Any messages based on a set of allowed message type names. +func AnyMessageName(any *Any) (string, error) { + if any == nil { + return "", fmt.Errorf("message is nil") + } + slash := strings.LastIndex(any.TypeUrl, "/") + if slash < 0 { + return "", fmt.Errorf("message type url %q is invalid", any.TypeUrl) + } + return any.TypeUrl[slash+1:], nil +} + +// MarshalAny takes the protocol buffer and encodes it into google.protobuf.Any. +func MarshalAny(pb proto.Message) (*Any, error) { + value, err := proto.Marshal(pb) + if err != nil { + return nil, err + } + return &Any{TypeUrl: googleApis + proto.MessageName(pb), Value: value}, nil +} + +// DynamicAny is a value that can be passed to UnmarshalAny to automatically +// allocate a proto.Message for the type specified in a google.protobuf.Any +// message. The allocated message is stored in the embedded proto.Message. +// +// Example: +// +// var x ptypes.DynamicAny +// if err := ptypes.UnmarshalAny(a, &x); err != nil { ... } +// fmt.Printf("unmarshaled message: %v", x.Message) +type DynamicAny struct { + proto.Message +} + +// Empty returns a new proto.Message of the type specified in a +// google.protobuf.Any message. It returns an error if corresponding message +// type isn't linked in. +func EmptyAny(any *Any) (proto.Message, error) { + aname, err := AnyMessageName(any) + if err != nil { + return nil, err + } + + t := proto.MessageType(aname) + if t == nil { + return nil, fmt.Errorf("any: message type %q isn't linked in", aname) + } + return reflect.New(t.Elem()).Interface().(proto.Message), nil +} + +// UnmarshalAny parses the protocol buffer representation in a google.protobuf.Any +// message and places the decoded result in pb. It returns an error if type of +// contents of Any message does not match type of pb message. +// +// pb can be a proto.Message, or a *DynamicAny. +func UnmarshalAny(any *Any, pb proto.Message) error { + if d, ok := pb.(*DynamicAny); ok { + if d.Message == nil { + var err error + d.Message, err = EmptyAny(any) + if err != nil { + return err + } + } + return UnmarshalAny(any, d.Message) + } + + aname, err := AnyMessageName(any) + if err != nil { + return err + } + + mname := proto.MessageName(pb) + if aname != mname { + return fmt.Errorf("mismatched message type: got %q want %q", aname, mname) + } + return proto.Unmarshal(any.Value, pb) +} + +// Is returns true if any value contains a given message type. +func Is(any *Any, pb proto.Message) bool { + // The following is equivalent to AnyMessageName(any) == proto.MessageName(pb), + // but it avoids scanning TypeUrl for the slash. + if any == nil { + return false + } + name := proto.MessageName(pb) + prefix := len(any.TypeUrl) - len(name) + return prefix >= 1 && any.TypeUrl[prefix-1] == '/' && any.TypeUrl[prefix:] == name +} diff --git a/vendor/github.com/gogo/protobuf/types/any.pb.go b/vendor/github.com/gogo/protobuf/types/any.pb.go new file mode 100644 index 00000000..98e269d5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/any.pb.go @@ -0,0 +1,697 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/any.proto + +package types + +import ( + bytes "bytes" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := ptypes.MarshalAny(foo) +// ... +// foo := &pb.Foo{} +// if err := ptypes.UnmarshalAny(any, foo); err != nil { +// ... +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// +type Any struct { + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + // + TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` + // Must be a valid serialized protocol buffer of the above specified type. + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Any) Reset() { *m = Any{} } +func (*Any) ProtoMessage() {} +func (*Any) Descriptor() ([]byte, []int) { + return fileDescriptor_b53526c13ae22eb4, []int{0} +} +func (*Any) XXX_WellKnownType() string { return "Any" } +func (m *Any) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Any) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Any.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Any) XXX_Merge(src proto.Message) { + xxx_messageInfo_Any.Merge(m, src) +} +func (m *Any) XXX_Size() int { + return m.Size() +} +func (m *Any) XXX_DiscardUnknown() { + xxx_messageInfo_Any.DiscardUnknown(m) +} + +var xxx_messageInfo_Any proto.InternalMessageInfo + +func (m *Any) GetTypeUrl() string { + if m != nil { + return m.TypeUrl + } + return "" +} + +func (m *Any) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (*Any) XXX_MessageName() string { + return "google.protobuf.Any" +} +func init() { + proto.RegisterType((*Any)(nil), "google.protobuf.Any") +} + +func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor_b53526c13ae22eb4) } + +var fileDescriptor_b53526c13ae22eb4 = []byte{ + // 211 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcc, 0xab, 0xd4, + 0x03, 0x73, 0x84, 0xf8, 0x21, 0x52, 0x7a, 0x30, 0x29, 0x25, 0x33, 0x2e, 0x66, 0xc7, 0xbc, 0x4a, + 0x21, 0x49, 0x2e, 0x8e, 0x92, 0xca, 0x82, 0xd4, 0xf8, 0xd2, 0xa2, 0x1c, 0x09, 0x46, 0x05, 0x46, + 0x0d, 0xce, 0x20, 0x76, 0x10, 0x3f, 0xb4, 0x28, 0x47, 0x48, 0x84, 0x8b, 0xb5, 0x2c, 0x31, 0xa7, + 0x34, 0x55, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, 0x08, 0xc2, 0x71, 0xaa, 0xbf, 0xf1, 0x50, 0x8e, + 0xe1, 0xc3, 0x43, 0x39, 0xc6, 0x1f, 0x0f, 0xe5, 0x18, 0x1b, 0x1e, 0xc9, 0x31, 0xae, 0x78, 0x24, + 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0xbe, 0x78, + 0x24, 0xc7, 0xf0, 0x01, 0x24, 0xfe, 0x58, 0x8e, 0xf1, 0xc4, 0x63, 0x39, 0x46, 0x2e, 0xe1, 0xe4, + 0xfc, 0x5c, 0x3d, 0x34, 0xeb, 0x9d, 0x38, 0x1c, 0xf3, 0x2a, 0x03, 0x40, 0x9c, 0x00, 0xc6, 0x28, + 0x56, 0x90, 0x8d, 0xc5, 0x8b, 0x98, 0x98, 0xdd, 0x03, 0x9c, 0x56, 0x31, 0xc9, 0xb9, 0x43, 0x94, + 0x06, 0x40, 0x95, 0xea, 0x85, 0xa7, 0xe6, 0xe4, 0x78, 0xe7, 0xe5, 0x97, 0xe7, 0x85, 0x80, 0x94, + 0x25, 0xb1, 0x81, 0xcd, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x81, 0x82, 0xd3, 0xed, + 0x00, 0x00, 0x00, +} + +func (this *Any) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Any) + if !ok { + that2, ok := that.(Any) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.TypeUrl != that1.TypeUrl { + if this.TypeUrl < that1.TypeUrl { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Value, that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Any) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Any) + if !ok { + that2, ok := that.(Any) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.TypeUrl != that1.TypeUrl { + return false + } + if !bytes.Equal(this.Value, that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Any) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&types.Any{") + s = append(s, "TypeUrl: "+fmt.Sprintf("%#v", this.TypeUrl)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringAny(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Any) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Any) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Any) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintAny(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.TypeUrl) > 0 { + i -= len(m.TypeUrl) + copy(dAtA[i:], m.TypeUrl) + i = encodeVarintAny(dAtA, i, uint64(len(m.TypeUrl))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintAny(dAtA []byte, offset int, v uint64) int { + offset -= sovAny(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func NewPopulatedAny(r randyAny, easy bool) *Any { + this := &Any{} + this.TypeUrl = string(randStringAny(r)) + v1 := r.Intn(100) + this.Value = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Value[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedAny(r, 3) + } + return this +} + +type randyAny interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneAny(r randyAny) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringAny(r randyAny) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneAny(r) + } + return string(tmps) +} +func randUnrecognizedAny(r randyAny, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldAny(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldAny(dAtA []byte, r randyAny, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateAny(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateAny(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateAny(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Any) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TypeUrl) + if l > 0 { + n += 1 + l + sovAny(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovAny(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovAny(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAny(x uint64) (n int) { + return sovAny(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Any) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Any{`, + `TypeUrl:` + fmt.Sprintf("%v", this.TypeUrl) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringAny(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Any) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAny + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Any: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Any: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAny + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAny + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAny + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAny + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAny + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthAny + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAny(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAny + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthAny + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAny(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAny + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAny + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAny + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthAny + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAny + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAny + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAny = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAny = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAny = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/github.com/gogo/protobuf/types/api.pb.go b/vendor/github.com/gogo/protobuf/types/api.pb.go new file mode 100644 index 00000000..58bf4b53 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/api.pb.go @@ -0,0 +1,2143 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/api.proto + +package types + +import ( + bytes "bytes" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Api is a light-weight descriptor for an API Interface. +// +// Interfaces are also described as "protocol buffer services" in some contexts, +// such as by the "service" keyword in a .proto file, but they are different +// from API Services, which represent a concrete implementation of an interface +// as opposed to simply a description of methods and bindings. They are also +// sometimes simply referred to as "APIs" in other contexts, such as the name of +// this message itself. See https://cloud.google.com/apis/design/glossary for +// detailed terminology. +type Api struct { + // The fully qualified name of this interface, including package name + // followed by the interface's simple name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The methods of this interface, in unspecified order. + Methods []*Method `protobuf:"bytes,2,rep,name=methods,proto3" json:"methods,omitempty"` + // Any metadata attached to the interface. + Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"` + // A version string for this interface. If specified, must have the form + // `major-version.minor-version`, as in `1.10`. If the minor version is + // omitted, it defaults to zero. If the entire version field is empty, the + // major version is derived from the package name, as outlined below. If the + // field is not empty, the version in the package name will be verified to be + // consistent with what is provided here. + // + // The versioning schema uses [semantic + // versioning](http://semver.org) where the major version number + // indicates a breaking change and the minor version an additive, + // non-breaking change. Both version numbers are signals to users + // what to expect from different versions, and should be carefully + // chosen based on the product plan. + // + // The major version is also reflected in the package name of the + // interface, which must end in `v`, as in + // `google.feature.v1`. For major versions 0 and 1, the suffix can + // be omitted. Zero major versions must only be used for + // experimental, non-GA interfaces. + // + // + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + // Source context for the protocol buffer service represented by this + // message. + SourceContext *SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty"` + // Included interfaces. See [Mixin][]. + Mixins []*Mixin `protobuf:"bytes,6,rep,name=mixins,proto3" json:"mixins,omitempty"` + // The source syntax of the service. + Syntax Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Api) Reset() { *m = Api{} } +func (*Api) ProtoMessage() {} +func (*Api) Descriptor() ([]byte, []int) { + return fileDescriptor_a2ec32096296c143, []int{0} +} +func (m *Api) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Api) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Api.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Api) XXX_Merge(src proto.Message) { + xxx_messageInfo_Api.Merge(m, src) +} +func (m *Api) XXX_Size() int { + return m.Size() +} +func (m *Api) XXX_DiscardUnknown() { + xxx_messageInfo_Api.DiscardUnknown(m) +} + +var xxx_messageInfo_Api proto.InternalMessageInfo + +func (m *Api) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Api) GetMethods() []*Method { + if m != nil { + return m.Methods + } + return nil +} + +func (m *Api) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (m *Api) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *Api) GetSourceContext() *SourceContext { + if m != nil { + return m.SourceContext + } + return nil +} + +func (m *Api) GetMixins() []*Mixin { + if m != nil { + return m.Mixins + } + return nil +} + +func (m *Api) GetSyntax() Syntax { + if m != nil { + return m.Syntax + } + return Syntax_SYNTAX_PROTO2 +} + +func (*Api) XXX_MessageName() string { + return "google.protobuf.Api" +} + +// Method represents a method of an API interface. +type Method struct { + // The simple name of this method. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A URL of the input message type. + RequestTypeUrl string `protobuf:"bytes,2,opt,name=request_type_url,json=requestTypeUrl,proto3" json:"request_type_url,omitempty"` + // If true, the request is streamed. + RequestStreaming bool `protobuf:"varint,3,opt,name=request_streaming,json=requestStreaming,proto3" json:"request_streaming,omitempty"` + // The URL of the output message type. + ResponseTypeUrl string `protobuf:"bytes,4,opt,name=response_type_url,json=responseTypeUrl,proto3" json:"response_type_url,omitempty"` + // If true, the response is streamed. + ResponseStreaming bool `protobuf:"varint,5,opt,name=response_streaming,json=responseStreaming,proto3" json:"response_streaming,omitempty"` + // Any metadata attached to the method. + Options []*Option `protobuf:"bytes,6,rep,name=options,proto3" json:"options,omitempty"` + // The source syntax of this method. + Syntax Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Method) Reset() { *m = Method{} } +func (*Method) ProtoMessage() {} +func (*Method) Descriptor() ([]byte, []int) { + return fileDescriptor_a2ec32096296c143, []int{1} +} +func (m *Method) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Method) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Method.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Method) XXX_Merge(src proto.Message) { + xxx_messageInfo_Method.Merge(m, src) +} +func (m *Method) XXX_Size() int { + return m.Size() +} +func (m *Method) XXX_DiscardUnknown() { + xxx_messageInfo_Method.DiscardUnknown(m) +} + +var xxx_messageInfo_Method proto.InternalMessageInfo + +func (m *Method) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Method) GetRequestTypeUrl() string { + if m != nil { + return m.RequestTypeUrl + } + return "" +} + +func (m *Method) GetRequestStreaming() bool { + if m != nil { + return m.RequestStreaming + } + return false +} + +func (m *Method) GetResponseTypeUrl() string { + if m != nil { + return m.ResponseTypeUrl + } + return "" +} + +func (m *Method) GetResponseStreaming() bool { + if m != nil { + return m.ResponseStreaming + } + return false +} + +func (m *Method) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (m *Method) GetSyntax() Syntax { + if m != nil { + return m.Syntax + } + return Syntax_SYNTAX_PROTO2 +} + +func (*Method) XXX_MessageName() string { + return "google.protobuf.Method" +} + +// Declares an API Interface to be included in this interface. The including +// interface must redeclare all the methods from the included interface, but +// documentation and options are inherited as follows: +// +// - If after comment and whitespace stripping, the documentation +// string of the redeclared method is empty, it will be inherited +// from the original method. +// +// - Each annotation belonging to the service config (http, +// visibility) which is not set in the redeclared method will be +// inherited. +// +// - If an http annotation is inherited, the path pattern will be +// modified as follows. Any version prefix will be replaced by the +// version of the including interface plus the [root][] path if +// specified. +// +// Example of a simple mixin: +// +// package google.acl.v1; +// service AccessControl { +// // Get the underlying ACL object. +// rpc GetAcl(GetAclRequest) returns (Acl) { +// option (google.api.http).get = "/v1/{resource=**}:getAcl"; +// } +// } +// +// package google.storage.v2; +// service Storage { +// rpc GetAcl(GetAclRequest) returns (Acl); +// +// // Get a data record. +// rpc GetData(GetDataRequest) returns (Data) { +// option (google.api.http).get = "/v2/{resource=**}"; +// } +// } +// +// Example of a mixin configuration: +// +// apis: +// - name: google.storage.v2.Storage +// mixins: +// - name: google.acl.v1.AccessControl +// +// The mixin construct implies that all methods in `AccessControl` are +// also declared with same name and request/response types in +// `Storage`. A documentation generator or annotation processor will +// see the effective `Storage.GetAcl` method after inherting +// documentation and annotations as follows: +// +// service Storage { +// // Get the underlying ACL object. +// rpc GetAcl(GetAclRequest) returns (Acl) { +// option (google.api.http).get = "/v2/{resource=**}:getAcl"; +// } +// ... +// } +// +// Note how the version in the path pattern changed from `v1` to `v2`. +// +// If the `root` field in the mixin is specified, it should be a +// relative path under which inherited HTTP paths are placed. Example: +// +// apis: +// - name: google.storage.v2.Storage +// mixins: +// - name: google.acl.v1.AccessControl +// root: acls +// +// This implies the following inherited HTTP annotation: +// +// service Storage { +// // Get the underlying ACL object. +// rpc GetAcl(GetAclRequest) returns (Acl) { +// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; +// } +// ... +// } +type Mixin struct { + // The fully qualified name of the interface which is included. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // If non-empty specifies a path under which inherited HTTP paths + // are rooted. + Root string `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Mixin) Reset() { *m = Mixin{} } +func (*Mixin) ProtoMessage() {} +func (*Mixin) Descriptor() ([]byte, []int) { + return fileDescriptor_a2ec32096296c143, []int{2} +} +func (m *Mixin) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Mixin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Mixin.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Mixin) XXX_Merge(src proto.Message) { + xxx_messageInfo_Mixin.Merge(m, src) +} +func (m *Mixin) XXX_Size() int { + return m.Size() +} +func (m *Mixin) XXX_DiscardUnknown() { + xxx_messageInfo_Mixin.DiscardUnknown(m) +} + +var xxx_messageInfo_Mixin proto.InternalMessageInfo + +func (m *Mixin) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Mixin) GetRoot() string { + if m != nil { + return m.Root + } + return "" +} + +func (*Mixin) XXX_MessageName() string { + return "google.protobuf.Mixin" +} +func init() { + proto.RegisterType((*Api)(nil), "google.protobuf.Api") + proto.RegisterType((*Method)(nil), "google.protobuf.Method") + proto.RegisterType((*Mixin)(nil), "google.protobuf.Mixin") +} + +func init() { proto.RegisterFile("google/protobuf/api.proto", fileDescriptor_a2ec32096296c143) } + +var fileDescriptor_a2ec32096296c143 = []byte{ + // 467 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0x31, 0x6f, 0x13, 0x31, + 0x14, 0xc7, 0xeb, 0xbb, 0xe4, 0x52, 0x5c, 0x91, 0x82, 0x91, 0xc0, 0x64, 0xb0, 0x4e, 0x15, 0xc3, + 0x09, 0xc4, 0x45, 0x94, 0x4f, 0xd0, 0x20, 0xd4, 0x01, 0x21, 0xa2, 0x0b, 0x08, 0x89, 0x25, 0x4a, + 0x83, 0x09, 0x96, 0xee, 0x6c, 0x63, 0x3b, 0x90, 0x4c, 0xf0, 0x59, 0x98, 0x10, 0x23, 0xdf, 0x80, + 0xad, 0x23, 0x23, 0x23, 0xb9, 0x2e, 0x8c, 0x1d, 0x19, 0x91, 0x7d, 0xe7, 0xa6, 0x5c, 0x83, 0x04, + 0x9b, 0xdf, 0xfb, 0xff, 0xfc, 0xf7, 0x7b, 0x7f, 0xc3, 0x9b, 0x33, 0x21, 0x66, 0x39, 0xed, 0x4b, + 0x25, 0x8c, 0x38, 0x9a, 0xbf, 0xea, 0x4f, 0x24, 0x4b, 0x5d, 0x81, 0x76, 0x2b, 0x29, 0xf5, 0x52, + 0xef, 0x56, 0x93, 0xd5, 0x62, 0xae, 0xa6, 0x74, 0x3c, 0x15, 0xdc, 0xd0, 0x85, 0xa9, 0xc0, 0x5e, + 0xaf, 0x49, 0x99, 0xa5, 0xac, 0x4d, 0xf6, 0xbe, 0x06, 0x30, 0x3c, 0x90, 0x0c, 0x21, 0xd8, 0xe2, + 0x93, 0x82, 0x62, 0x10, 0x83, 0xe4, 0x52, 0xe6, 0xce, 0xe8, 0x1e, 0xec, 0x14, 0xd4, 0xbc, 0x16, + 0x2f, 0x35, 0x0e, 0xe2, 0x30, 0xd9, 0xd9, 0xbf, 0x91, 0x36, 0x06, 0x48, 0x1f, 0x3b, 0x3d, 0xf3, + 0x9c, 0xbd, 0x22, 0xa4, 0x61, 0x82, 0x6b, 0x1c, 0xfe, 0xe5, 0xca, 0x13, 0xa7, 0x67, 0x9e, 0x43, + 0x18, 0x76, 0xde, 0x52, 0xa5, 0x99, 0xe0, 0xb8, 0xe5, 0x1e, 0xf7, 0x25, 0x7a, 0x08, 0xbb, 0x7f, + 0xee, 0x83, 0xdb, 0x31, 0x48, 0x76, 0xf6, 0xc9, 0x05, 0xcf, 0x91, 0xc3, 0x1e, 0x54, 0x54, 0x76, + 0x59, 0x9f, 0x2f, 0x51, 0x0a, 0xa3, 0x82, 0x2d, 0x18, 0xd7, 0x38, 0x72, 0x23, 0x5d, 0xbf, 0xb8, + 0x85, 0x95, 0xb3, 0x9a, 0x42, 0x7d, 0x18, 0xe9, 0x25, 0x37, 0x93, 0x05, 0xee, 0xc4, 0x20, 0xe9, + 0x6e, 0x58, 0x61, 0xe4, 0xe4, 0xac, 0xc6, 0xf6, 0xbe, 0x04, 0x30, 0xaa, 0x82, 0xd8, 0x18, 0x63, + 0x02, 0xaf, 0x28, 0xfa, 0x66, 0x4e, 0xb5, 0x19, 0xdb, 0xe0, 0xc7, 0x73, 0x95, 0xe3, 0xc0, 0xe9, + 0xdd, 0xba, 0xff, 0x74, 0x29, 0xe9, 0x33, 0x95, 0xa3, 0x3b, 0xf0, 0xaa, 0x27, 0xb5, 0x51, 0x74, + 0x52, 0x30, 0x3e, 0xc3, 0x61, 0x0c, 0x92, 0xed, 0xcc, 0x5b, 0x8c, 0x7c, 0x1f, 0xdd, 0xb6, 0xb0, + 0x96, 0x82, 0x6b, 0xba, 0xf6, 0xad, 0x12, 0xdc, 0xf5, 0x82, 0x37, 0xbe, 0x0b, 0xd1, 0x19, 0xbb, + 0x76, 0x6e, 0x3b, 0xe7, 0x33, 0x97, 0xb5, 0xf5, 0xb9, 0x5f, 0x8c, 0xfe, 0xf1, 0x17, 0xff, 0x3b, + 0xb4, 0x3e, 0x6c, 0xbb, 0xd8, 0x37, 0x46, 0x86, 0x60, 0x4b, 0x09, 0x61, 0xea, 0x98, 0xdc, 0x79, + 0xf0, 0xfe, 0xfb, 0x8a, 0x6c, 0x9d, 0xae, 0x08, 0xf8, 0xb5, 0x22, 0xe0, 0x43, 0x49, 0xc0, 0xa7, + 0x92, 0x80, 0xe3, 0x92, 0x80, 0x6f, 0x25, 0x01, 0x3f, 0x4a, 0x02, 0x7e, 0x96, 0x64, 0xeb, 0xd4, + 0xf6, 0x4f, 0x08, 0x38, 0x3e, 0x21, 0x00, 0x5e, 0x9b, 0x8a, 0xa2, 0x39, 0xc6, 0x60, 0xfb, 0x40, + 0xb2, 0xa1, 0x2d, 0x86, 0xe0, 0x45, 0xdb, 0xe6, 0xa6, 0x3f, 0x06, 0xe1, 0xe1, 0x70, 0xf0, 0x39, + 0x20, 0x87, 0x15, 0x3a, 0xf4, 0x13, 0x3f, 0xa7, 0x79, 0xfe, 0x88, 0x8b, 0x77, 0xdc, 0xc6, 0xa8, + 0x8f, 0x22, 0xe7, 0x71, 0xff, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x64, 0x40, 0x40, 0xa1, + 0x03, 0x00, 0x00, +} + +func (this *Api) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Api) + if !ok { + that2, ok := that.(Api) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if len(this.Methods) != len(that1.Methods) { + if len(this.Methods) < len(that1.Methods) { + return -1 + } + return 1 + } + for i := range this.Methods { + if c := this.Methods[i].Compare(that1.Methods[i]); c != 0 { + return c + } + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if this.Version != that1.Version { + if this.Version < that1.Version { + return -1 + } + return 1 + } + if c := this.SourceContext.Compare(that1.SourceContext); c != 0 { + return c + } + if len(this.Mixins) != len(that1.Mixins) { + if len(this.Mixins) < len(that1.Mixins) { + return -1 + } + return 1 + } + for i := range this.Mixins { + if c := this.Mixins[i].Compare(that1.Mixins[i]); c != 0 { + return c + } + } + if this.Syntax != that1.Syntax { + if this.Syntax < that1.Syntax { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Method) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Method) + if !ok { + that2, ok := that.(Method) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if this.RequestTypeUrl != that1.RequestTypeUrl { + if this.RequestTypeUrl < that1.RequestTypeUrl { + return -1 + } + return 1 + } + if this.RequestStreaming != that1.RequestStreaming { + if !this.RequestStreaming { + return -1 + } + return 1 + } + if this.ResponseTypeUrl != that1.ResponseTypeUrl { + if this.ResponseTypeUrl < that1.ResponseTypeUrl { + return -1 + } + return 1 + } + if this.ResponseStreaming != that1.ResponseStreaming { + if !this.ResponseStreaming { + return -1 + } + return 1 + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if this.Syntax != that1.Syntax { + if this.Syntax < that1.Syntax { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Mixin) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Mixin) + if !ok { + that2, ok := that.(Mixin) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if this.Root != that1.Root { + if this.Root < that1.Root { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Api) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Api) + if !ok { + that2, ok := that.(Api) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if len(this.Methods) != len(that1.Methods) { + return false + } + for i := range this.Methods { + if !this.Methods[i].Equal(that1.Methods[i]) { + return false + } + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if this.Version != that1.Version { + return false + } + if !this.SourceContext.Equal(that1.SourceContext) { + return false + } + if len(this.Mixins) != len(that1.Mixins) { + return false + } + for i := range this.Mixins { + if !this.Mixins[i].Equal(that1.Mixins[i]) { + return false + } + } + if this.Syntax != that1.Syntax { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Method) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Method) + if !ok { + that2, ok := that.(Method) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.RequestTypeUrl != that1.RequestTypeUrl { + return false + } + if this.RequestStreaming != that1.RequestStreaming { + return false + } + if this.ResponseTypeUrl != that1.ResponseTypeUrl { + return false + } + if this.ResponseStreaming != that1.ResponseStreaming { + return false + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if this.Syntax != that1.Syntax { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Mixin) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Mixin) + if !ok { + that2, ok := that.(Mixin) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Root != that1.Root { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Api) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 11) + s = append(s, "&types.Api{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Methods != nil { + s = append(s, "Methods: "+fmt.Sprintf("%#v", this.Methods)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + s = append(s, "Version: "+fmt.Sprintf("%#v", this.Version)+",\n") + if this.SourceContext != nil { + s = append(s, "SourceContext: "+fmt.Sprintf("%#v", this.SourceContext)+",\n") + } + if this.Mixins != nil { + s = append(s, "Mixins: "+fmt.Sprintf("%#v", this.Mixins)+",\n") + } + s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Method) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 11) + s = append(s, "&types.Method{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "RequestTypeUrl: "+fmt.Sprintf("%#v", this.RequestTypeUrl)+",\n") + s = append(s, "RequestStreaming: "+fmt.Sprintf("%#v", this.RequestStreaming)+",\n") + s = append(s, "ResponseTypeUrl: "+fmt.Sprintf("%#v", this.ResponseTypeUrl)+",\n") + s = append(s, "ResponseStreaming: "+fmt.Sprintf("%#v", this.ResponseStreaming)+",\n") + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Mixin) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&types.Mixin{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Root: "+fmt.Sprintf("%#v", this.Root)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringApi(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Api) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Api) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Api) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Syntax != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.Syntax)) + i-- + dAtA[i] = 0x38 + } + if len(m.Mixins) > 0 { + for iNdEx := len(m.Mixins) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Mixins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if m.SourceContext != nil { + { + size, err := m.SourceContext.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintApi(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.Options) > 0 { + for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Options[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Methods) > 0 { + for iNdEx := len(m.Methods) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Methods[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintApi(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Method) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Method) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Method) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Syntax != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.Syntax)) + i-- + dAtA[i] = 0x38 + } + if len(m.Options) > 0 { + for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Options[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if m.ResponseStreaming { + i-- + if m.ResponseStreaming { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.ResponseTypeUrl) > 0 { + i -= len(m.ResponseTypeUrl) + copy(dAtA[i:], m.ResponseTypeUrl) + i = encodeVarintApi(dAtA, i, uint64(len(m.ResponseTypeUrl))) + i-- + dAtA[i] = 0x22 + } + if m.RequestStreaming { + i-- + if m.RequestStreaming { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.RequestTypeUrl) > 0 { + i -= len(m.RequestTypeUrl) + copy(dAtA[i:], m.RequestTypeUrl) + i = encodeVarintApi(dAtA, i, uint64(len(m.RequestTypeUrl))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintApi(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Mixin) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Mixin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Mixin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Root) > 0 { + i -= len(m.Root) + copy(dAtA[i:], m.Root) + i = encodeVarintApi(dAtA, i, uint64(len(m.Root))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintApi(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintApi(dAtA []byte, offset int, v uint64) int { + offset -= sovApi(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func NewPopulatedApi(r randyApi, easy bool) *Api { + this := &Api{} + this.Name = string(randStringApi(r)) + if r.Intn(5) != 0 { + v1 := r.Intn(5) + this.Methods = make([]*Method, v1) + for i := 0; i < v1; i++ { + this.Methods[i] = NewPopulatedMethod(r, easy) + } + } + if r.Intn(5) != 0 { + v2 := r.Intn(5) + this.Options = make([]*Option, v2) + for i := 0; i < v2; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + this.Version = string(randStringApi(r)) + if r.Intn(5) != 0 { + this.SourceContext = NewPopulatedSourceContext(r, easy) + } + if r.Intn(5) != 0 { + v3 := r.Intn(5) + this.Mixins = make([]*Mixin, v3) + for i := 0; i < v3; i++ { + this.Mixins[i] = NewPopulatedMixin(r, easy) + } + } + this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedApi(r, 8) + } + return this +} + +func NewPopulatedMethod(r randyApi, easy bool) *Method { + this := &Method{} + this.Name = string(randStringApi(r)) + this.RequestTypeUrl = string(randStringApi(r)) + this.RequestStreaming = bool(bool(r.Intn(2) == 0)) + this.ResponseTypeUrl = string(randStringApi(r)) + this.ResponseStreaming = bool(bool(r.Intn(2) == 0)) + if r.Intn(5) != 0 { + v4 := r.Intn(5) + this.Options = make([]*Option, v4) + for i := 0; i < v4; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedApi(r, 8) + } + return this +} + +func NewPopulatedMixin(r randyApi, easy bool) *Mixin { + this := &Mixin{} + this.Name = string(randStringApi(r)) + this.Root = string(randStringApi(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedApi(r, 3) + } + return this +} + +type randyApi interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneApi(r randyApi) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringApi(r randyApi) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneApi(r) + } + return string(tmps) +} +func randUnrecognizedApi(r randyApi, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldApi(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldApi(dAtA []byte, r randyApi, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateApi(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateApi(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateApi(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateApi(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateApi(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateApi(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateApi(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Api) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Methods) > 0 { + for _, e := range m.Methods { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.SourceContext != nil { + l = m.SourceContext.Size() + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Mixins) > 0 { + for _, e := range m.Mixins { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + if m.Syntax != 0 { + n += 1 + sovApi(uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Method) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.RequestTypeUrl) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.RequestStreaming { + n += 2 + } + l = len(m.ResponseTypeUrl) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.ResponseStreaming { + n += 2 + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + if m.Syntax != 0 { + n += 1 + sovApi(uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Mixin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Root) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovApi(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozApi(x uint64) (n int) { + return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Api) String() string { + if this == nil { + return "nil" + } + repeatedStringForMethods := "[]*Method{" + for _, f := range this.Methods { + repeatedStringForMethods += strings.Replace(f.String(), "Method", "Method", 1) + "," + } + repeatedStringForMethods += "}" + repeatedStringForOptions := "[]*Option{" + for _, f := range this.Options { + repeatedStringForOptions += strings.Replace(fmt.Sprintf("%v", f), "Option", "Option", 1) + "," + } + repeatedStringForOptions += "}" + repeatedStringForMixins := "[]*Mixin{" + for _, f := range this.Mixins { + repeatedStringForMixins += strings.Replace(f.String(), "Mixin", "Mixin", 1) + "," + } + repeatedStringForMixins += "}" + s := strings.Join([]string{`&Api{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Methods:` + repeatedStringForMethods + `,`, + `Options:` + repeatedStringForOptions + `,`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `SourceContext:` + strings.Replace(fmt.Sprintf("%v", this.SourceContext), "SourceContext", "SourceContext", 1) + `,`, + `Mixins:` + repeatedStringForMixins + `,`, + `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Method) String() string { + if this == nil { + return "nil" + } + repeatedStringForOptions := "[]*Option{" + for _, f := range this.Options { + repeatedStringForOptions += strings.Replace(fmt.Sprintf("%v", f), "Option", "Option", 1) + "," + } + repeatedStringForOptions += "}" + s := strings.Join([]string{`&Method{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `RequestTypeUrl:` + fmt.Sprintf("%v", this.RequestTypeUrl) + `,`, + `RequestStreaming:` + fmt.Sprintf("%v", this.RequestStreaming) + `,`, + `ResponseTypeUrl:` + fmt.Sprintf("%v", this.ResponseTypeUrl) + `,`, + `ResponseStreaming:` + fmt.Sprintf("%v", this.ResponseStreaming) + `,`, + `Options:` + repeatedStringForOptions + `,`, + `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Mixin) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Mixin{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Root:` + fmt.Sprintf("%v", this.Root) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringApi(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Api) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Api: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Api: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Methods", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Methods = append(m.Methods, &Method{}) + if err := m.Methods[len(m.Methods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceContext", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SourceContext == nil { + m.SourceContext = &SourceContext{} + } + if err := m.SourceContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mixins", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mixins = append(m.Mixins, &Mixin{}) + if err := m.Mixins[len(m.Mixins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType) + } + m.Syntax = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Syntax |= Syntax(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Method) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Method: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Method: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestTypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestTypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestStreaming", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RequestStreaming = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseTypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResponseTypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseStreaming", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ResponseStreaming = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType) + } + m.Syntax = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Syntax |= Syntax(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Mixin) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Mixin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Mixin: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Root", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Root = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipApi(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowApi + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowApi + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowApi + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthApi + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupApi + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthApi + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupApi = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/github.com/gogo/protobuf/types/doc.go b/vendor/github.com/gogo/protobuf/types/doc.go new file mode 100644 index 00000000..ff2810af --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/doc.go @@ -0,0 +1,35 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* +Package types contains code for interacting with well-known types. +*/ +package types diff --git a/vendor/github.com/gogo/protobuf/types/duration.go b/vendor/github.com/gogo/protobuf/types/duration.go new file mode 100644 index 00000000..979b8e78 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/duration.go @@ -0,0 +1,100 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +// This file implements conversions between google.protobuf.Duration +// and time.Duration. + +import ( + "errors" + "fmt" + "time" +) + +const ( + // Range of a Duration in seconds, as specified in + // google/protobuf/duration.proto. This is about 10,000 years in seconds. + maxSeconds = int64(10000 * 365.25 * 24 * 60 * 60) + minSeconds = -maxSeconds +) + +// validateDuration determines whether the Duration is valid according to the +// definition in google/protobuf/duration.proto. A valid Duration +// may still be too large to fit into a time.Duration (the range of Duration +// is about 10,000 years, and the range of time.Duration is about 290). +func validateDuration(d *Duration) error { + if d == nil { + return errors.New("duration: nil Duration") + } + if d.Seconds < minSeconds || d.Seconds > maxSeconds { + return fmt.Errorf("duration: %#v: seconds out of range", d) + } + if d.Nanos <= -1e9 || d.Nanos >= 1e9 { + return fmt.Errorf("duration: %#v: nanos out of range", d) + } + // Seconds and Nanos must have the same sign, unless d.Nanos is zero. + if (d.Seconds < 0 && d.Nanos > 0) || (d.Seconds > 0 && d.Nanos < 0) { + return fmt.Errorf("duration: %#v: seconds and nanos have different signs", d) + } + return nil +} + +// DurationFromProto converts a Duration to a time.Duration. DurationFromProto +// returns an error if the Duration is invalid or is too large to be +// represented in a time.Duration. +func DurationFromProto(p *Duration) (time.Duration, error) { + if err := validateDuration(p); err != nil { + return 0, err + } + d := time.Duration(p.Seconds) * time.Second + if int64(d/time.Second) != p.Seconds { + return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p) + } + if p.Nanos != 0 { + d += time.Duration(p.Nanos) * time.Nanosecond + if (d < 0) != (p.Nanos < 0) { + return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p) + } + } + return d, nil +} + +// DurationProto converts a time.Duration to a Duration. +func DurationProto(d time.Duration) *Duration { + nanos := d.Nanoseconds() + secs := nanos / 1e9 + nanos -= secs * 1e9 + return &Duration{ + Seconds: secs, + Nanos: int32(nanos), + } +} diff --git a/vendor/github.com/gogo/protobuf/types/duration.pb.go b/vendor/github.com/gogo/protobuf/types/duration.pb.go new file mode 100644 index 00000000..3959f066 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/duration.pb.go @@ -0,0 +1,520 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/duration.proto + +package types + +import ( + bytes "bytes" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// A Duration represents a signed, fixed-length span of time represented +// as a count of seconds and fractions of seconds at nanosecond +// resolution. It is independent of any calendar and concepts like "day" +// or "month". It is related to Timestamp in that the difference between +// two Timestamp values is a Duration and it can be added or subtracted +// from a Timestamp. Range is approximately +-10,000 years. +// +// # Examples +// +// Example 1: Compute Duration from two Timestamps in pseudo code. +// +// Timestamp start = ...; +// Timestamp end = ...; +// Duration duration = ...; +// +// duration.seconds = end.seconds - start.seconds; +// duration.nanos = end.nanos - start.nanos; +// +// if (duration.seconds < 0 && duration.nanos > 0) { +// duration.seconds += 1; +// duration.nanos -= 1000000000; +// } else if (durations.seconds > 0 && duration.nanos < 0) { +// duration.seconds -= 1; +// duration.nanos += 1000000000; +// } +// +// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. +// +// Timestamp start = ...; +// Duration duration = ...; +// Timestamp end = ...; +// +// end.seconds = start.seconds + duration.seconds; +// end.nanos = start.nanos + duration.nanos; +// +// if (end.nanos < 0) { +// end.seconds -= 1; +// end.nanos += 1000000000; +// } else if (end.nanos >= 1000000000) { +// end.seconds += 1; +// end.nanos -= 1000000000; +// } +// +// Example 3: Compute Duration from datetime.timedelta in Python. +// +// td = datetime.timedelta(days=3, minutes=10) +// duration = Duration() +// duration.FromTimedelta(td) +// +// # JSON Mapping +// +// In JSON format, the Duration type is encoded as a string rather than an +// object, where the string ends in the suffix "s" (indicating seconds) and +// is preceded by the number of seconds, with nanoseconds expressed as +// fractional seconds. For example, 3 seconds with 0 nanoseconds should be +// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should +// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 +// microsecond should be expressed in JSON format as "3.000001s". +// +// +type Duration struct { + // Signed seconds of the span of time. Must be from -315,576,000,000 + // to +315,576,000,000 inclusive. Note: these bounds are computed from: + // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` + // Signed fractions of a second at nanosecond resolution of the span + // of time. Durations less than one second are represented with a 0 + // `seconds` field and a positive or negative `nanos` field. For durations + // of one second or more, a non-zero value for the `nanos` field must be + // of the same sign as the `seconds` field. Must be from -999,999,999 + // to +999,999,999 inclusive. + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Duration) Reset() { *m = Duration{} } +func (*Duration) ProtoMessage() {} +func (*Duration) Descriptor() ([]byte, []int) { + return fileDescriptor_23597b2ebd7ac6c5, []int{0} +} +func (*Duration) XXX_WellKnownType() string { return "Duration" } +func (m *Duration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Duration.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Duration) XXX_Merge(src proto.Message) { + xxx_messageInfo_Duration.Merge(m, src) +} +func (m *Duration) XXX_Size() int { + return m.Size() +} +func (m *Duration) XXX_DiscardUnknown() { + xxx_messageInfo_Duration.DiscardUnknown(m) +} + +var xxx_messageInfo_Duration proto.InternalMessageInfo + +func (m *Duration) GetSeconds() int64 { + if m != nil { + return m.Seconds + } + return 0 +} + +func (m *Duration) GetNanos() int32 { + if m != nil { + return m.Nanos + } + return 0 +} + +func (*Duration) XXX_MessageName() string { + return "google.protobuf.Duration" +} +func init() { + proto.RegisterType((*Duration)(nil), "google.protobuf.Duration") +} + +func init() { proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor_23597b2ebd7ac6c5) } + +var fileDescriptor_23597b2ebd7ac6c5 = []byte{ + // 209 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0x29, 0x2d, 0x4a, + 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x03, 0x8b, 0x08, 0xf1, 0x43, 0xe4, 0xf5, 0x60, 0xf2, 0x4a, 0x56, + 0x5c, 0x1c, 0x2e, 0x50, 0x25, 0x42, 0x12, 0x5c, 0xec, 0xc5, 0xa9, 0xc9, 0xf9, 0x79, 0x29, 0xc5, + 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x30, 0xae, 0x90, 0x08, 0x17, 0x6b, 0x5e, 0x62, 0x5e, + 0x7e, 0xb1, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x6b, 0x10, 0x84, 0xe3, 0x54, 0x7f, 0xe3, 0xa1, 0x1c, + 0xc3, 0x87, 0x87, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, + 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x2f, 0x1e, 0xc9, 0x31, 0x7c, 0x78, 0x24, 0xc7, 0xb8, 0xe2, + 0xb1, 0x1c, 0xe3, 0x89, 0xc7, 0x72, 0x8c, 0x5c, 0xc2, 0xc9, 0xf9, 0xb9, 0x7a, 0x68, 0x56, 0x3b, + 0xf1, 0xc2, 0x2c, 0x0e, 0x00, 0x89, 0x04, 0x30, 0x46, 0xb1, 0x96, 0x54, 0x16, 0xa4, 0x16, 0xff, + 0x60, 0x64, 0x5c, 0xc4, 0xc4, 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, 0xce, 0x1d, 0xa2, 0x25, 0x00, + 0xaa, 0x45, 0x2f, 0x3c, 0x35, 0x27, 0xc7, 0x3b, 0x2f, 0xbf, 0x3c, 0x2f, 0x04, 0xa4, 0x32, 0x89, + 0x0d, 0x6c, 0x96, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x8a, 0x1c, 0x64, 0x4e, 0xf6, 0x00, 0x00, + 0x00, +} + +func (this *Duration) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Duration) + if !ok { + that2, ok := that.(Duration) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Seconds != that1.Seconds { + if this.Seconds < that1.Seconds { + return -1 + } + return 1 + } + if this.Nanos != that1.Nanos { + if this.Nanos < that1.Nanos { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Duration) + if !ok { + that2, ok := that.(Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Seconds != that1.Seconds { + return false + } + if this.Nanos != that1.Nanos { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Duration) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&types.Duration{") + s = append(s, "Seconds: "+fmt.Sprintf("%#v", this.Seconds)+",\n") + s = append(s, "Nanos: "+fmt.Sprintf("%#v", this.Nanos)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringDuration(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Duration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Duration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Duration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Nanos != 0 { + i = encodeVarintDuration(dAtA, i, uint64(m.Nanos)) + i-- + dAtA[i] = 0x10 + } + if m.Seconds != 0 { + i = encodeVarintDuration(dAtA, i, uint64(m.Seconds)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintDuration(dAtA []byte, offset int, v uint64) int { + offset -= sovDuration(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Duration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seconds != 0 { + n += 1 + sovDuration(uint64(m.Seconds)) + } + if m.Nanos != 0 { + n += 1 + sovDuration(uint64(m.Nanos)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovDuration(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozDuration(x uint64) (n int) { + return sovDuration(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Duration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDuration + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Duration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Duration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType) + } + m.Seconds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDuration + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seconds |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType) + } + m.Nanos = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDuration + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nanos |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDuration(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDuration + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthDuration + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDuration(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDuration + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDuration + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDuration + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthDuration + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupDuration + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthDuration + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthDuration = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDuration = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupDuration = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/github.com/gogo/protobuf/types/duration_gogo.go b/vendor/github.com/gogo/protobuf/types/duration_gogo.go new file mode 100644 index 00000000..90e7670e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/duration_gogo.go @@ -0,0 +1,100 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +import ( + "fmt" + "time" +) + +func NewPopulatedDuration(r interface { + Int63() int64 +}, easy bool) *Duration { + this := &Duration{} + maxSecs := time.Hour.Nanoseconds() / 1e9 + max := 2 * maxSecs + s := int64(r.Int63()) % max + s -= maxSecs + neg := int64(1) + if s < 0 { + neg = -1 + } + this.Seconds = s + this.Nanos = int32(neg * (r.Int63() % 1e9)) + return this +} + +func (d *Duration) String() string { + td, err := DurationFromProto(d) + if err != nil { + return fmt.Sprintf("(%v)", err) + } + return td.String() +} + +func NewPopulatedStdDuration(r interface { + Int63() int64 +}, easy bool) *time.Duration { + dur := NewPopulatedDuration(r, easy) + d, err := DurationFromProto(dur) + if err != nil { + return nil + } + return &d +} + +func SizeOfStdDuration(d time.Duration) int { + dur := DurationProto(d) + return dur.Size() +} + +func StdDurationMarshal(d time.Duration) ([]byte, error) { + size := SizeOfStdDuration(d) + buf := make([]byte, size) + _, err := StdDurationMarshalTo(d, buf) + return buf, err +} + +func StdDurationMarshalTo(d time.Duration, data []byte) (int, error) { + dur := DurationProto(d) + return dur.MarshalTo(data) +} + +func StdDurationUnmarshal(d *time.Duration, data []byte) error { + dur := &Duration{} + if err := dur.Unmarshal(data); err != nil { + return err + } + dd, err := DurationFromProto(dur) + if err != nil { + return err + } + *d = dd + return nil +} diff --git a/vendor/github.com/gogo/protobuf/types/empty.pb.go b/vendor/github.com/gogo/protobuf/types/empty.pb.go new file mode 100644 index 00000000..17e3aa55 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/empty.pb.go @@ -0,0 +1,465 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/empty.proto + +package types + +import ( + bytes "bytes" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// A generic empty message that you can re-use to avoid defining duplicated +// empty messages in your APIs. A typical example is to use it as the request +// or the response type of an API method. For instance: +// +// service Foo { +// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); +// } +// +// The JSON representation for `Empty` is empty JSON object `{}`. +type Empty struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Empty) Reset() { *m = Empty{} } +func (*Empty) ProtoMessage() {} +func (*Empty) Descriptor() ([]byte, []int) { + return fileDescriptor_900544acb223d5b8, []int{0} +} +func (*Empty) XXX_WellKnownType() string { return "Empty" } +func (m *Empty) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Empty.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Empty) XXX_Merge(src proto.Message) { + xxx_messageInfo_Empty.Merge(m, src) +} +func (m *Empty) XXX_Size() int { + return m.Size() +} +func (m *Empty) XXX_DiscardUnknown() { + xxx_messageInfo_Empty.DiscardUnknown(m) +} + +var xxx_messageInfo_Empty proto.InternalMessageInfo + +func (*Empty) XXX_MessageName() string { + return "google.protobuf.Empty" +} +func init() { + proto.RegisterType((*Empty)(nil), "google.protobuf.Empty") +} + +func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor_900544acb223d5b8) } + +var fileDescriptor_900544acb223d5b8 = []byte{ + // 176 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcd, 0x2d, 0x28, + 0xa9, 0xd4, 0x03, 0x73, 0x85, 0xf8, 0x21, 0x92, 0x7a, 0x30, 0x49, 0x25, 0x76, 0x2e, 0x56, 0x57, + 0x90, 0xbc, 0x53, 0x0b, 0xe3, 0x8d, 0x87, 0x72, 0x0c, 0x1f, 0x1e, 0xca, 0x31, 0xfe, 0x78, 0x28, + 0xc7, 0xd8, 0xf0, 0x48, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, + 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0xf1, 0xc5, 0x23, 0x39, 0x86, 0x0f, 0x20, 0xf1, 0xc7, 0x72, + 0x8c, 0x27, 0x1e, 0xcb, 0x31, 0x72, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, 0x19, 0xe8, 0xc4, 0x05, + 0x36, 0x2e, 0x00, 0xc4, 0x0d, 0x60, 0x8c, 0x62, 0x2d, 0xa9, 0x2c, 0x48, 0x2d, 0xfe, 0xc1, 0xc8, + 0xb8, 0x88, 0x89, 0xd9, 0x3d, 0xc0, 0x69, 0x15, 0x93, 0x9c, 0x3b, 0x44, 0x7d, 0x00, 0x54, 0xbd, + 0x5e, 0x78, 0x6a, 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0x48, 0x65, 0x12, 0x1b, 0xd8, + 0x20, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x21, 0xbe, 0xb6, 0x31, 0xc6, 0x00, 0x00, 0x00, +} + +func (this *Empty) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Empty) + if !ok { + that2, ok := that.(Empty) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Empty) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Empty) + if !ok { + that2, ok := that.(Empty) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Empty) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&types.Empty{") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringEmpty(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Empty) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Empty) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Empty) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + return len(dAtA) - i, nil +} + +func encodeVarintEmpty(dAtA []byte, offset int, v uint64) int { + offset -= sovEmpty(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func NewPopulatedEmpty(r randyEmpty, easy bool) *Empty { + this := &Empty{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEmpty(r, 1) + } + return this +} + +type randyEmpty interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneEmpty(r randyEmpty) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringEmpty(r randyEmpty) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneEmpty(r) + } + return string(tmps) +} +func randUnrecognizedEmpty(r randyEmpty, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldEmpty(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldEmpty(dAtA []byte, r randyEmpty, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateEmpty(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Empty) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovEmpty(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEmpty(x uint64) (n int) { + return sovEmpty(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Empty) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Empty{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringEmpty(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Empty) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEmpty + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Empty: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Empty: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipEmpty(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEmpty + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthEmpty + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEmpty(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEmpty + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEmpty + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEmpty + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEmpty + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEmpty + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEmpty + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEmpty = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEmpty = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEmpty = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/github.com/gogo/protobuf/types/field_mask.pb.go b/vendor/github.com/gogo/protobuf/types/field_mask.pb.go new file mode 100644 index 00000000..7226b57f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/field_mask.pb.go @@ -0,0 +1,741 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/field_mask.proto + +package types + +import ( + bytes "bytes" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// `FieldMask` represents a set of symbolic field paths, for example: +// +// paths: "f.a" +// paths: "f.b.d" +// +// Here `f` represents a field in some root message, `a` and `b` +// fields in the message found in `f`, and `d` a field found in the +// message in `f.b`. +// +// Field masks are used to specify a subset of fields that should be +// returned by a get operation or modified by an update operation. +// Field masks also have a custom JSON encoding (see below). +// +// # Field Masks in Projections +// +// When used in the context of a projection, a response message or +// sub-message is filtered by the API to only contain those fields as +// specified in the mask. For example, if the mask in the previous +// example is applied to a response message as follows: +// +// f { +// a : 22 +// b { +// d : 1 +// x : 2 +// } +// y : 13 +// } +// z: 8 +// +// The result will not contain specific values for fields x,y and z +// (their value will be set to the default, and omitted in proto text +// output): +// +// +// f { +// a : 22 +// b { +// d : 1 +// } +// } +// +// A repeated field is not allowed except at the last position of a +// paths string. +// +// If a FieldMask object is not present in a get operation, the +// operation applies to all fields (as if a FieldMask of all fields +// had been specified). +// +// Note that a field mask does not necessarily apply to the +// top-level response message. In case of a REST get operation, the +// field mask applies directly to the response, but in case of a REST +// list operation, the mask instead applies to each individual message +// in the returned resource list. In case of a REST custom method, +// other definitions may be used. Where the mask applies will be +// clearly documented together with its declaration in the API. In +// any case, the effect on the returned resource/resources is required +// behavior for APIs. +// +// # Field Masks in Update Operations +// +// A field mask in update operations specifies which fields of the +// targeted resource are going to be updated. The API is required +// to only change the values of the fields as specified in the mask +// and leave the others untouched. If a resource is passed in to +// describe the updated values, the API ignores the values of all +// fields not covered by the mask. +// +// If a repeated field is specified for an update operation, new values will +// be appended to the existing repeated field in the target resource. Note that +// a repeated field is only allowed in the last position of a `paths` string. +// +// If a sub-message is specified in the last position of the field mask for an +// update operation, then new value will be merged into the existing sub-message +// in the target resource. +// +// For example, given the target message: +// +// f { +// b { +// d: 1 +// x: 2 +// } +// c: [1] +// } +// +// And an update message: +// +// f { +// b { +// d: 10 +// } +// c: [2] +// } +// +// then if the field mask is: +// +// paths: ["f.b", "f.c"] +// +// then the result will be: +// +// f { +// b { +// d: 10 +// x: 2 +// } +// c: [1, 2] +// } +// +// An implementation may provide options to override this default behavior for +// repeated and message fields. +// +// In order to reset a field's value to the default, the field must +// be in the mask and set to the default value in the provided resource. +// Hence, in order to reset all fields of a resource, provide a default +// instance of the resource and set all fields in the mask, or do +// not provide a mask as described below. +// +// If a field mask is not present on update, the operation applies to +// all fields (as if a field mask of all fields has been specified). +// Note that in the presence of schema evolution, this may mean that +// fields the client does not know and has therefore not filled into +// the request will be reset to their default. If this is unwanted +// behavior, a specific service may require a client to always specify +// a field mask, producing an error if not. +// +// As with get operations, the location of the resource which +// describes the updated values in the request message depends on the +// operation kind. In any case, the effect of the field mask is +// required to be honored by the API. +// +// ## Considerations for HTTP REST +// +// The HTTP kind of an update operation which uses a field mask must +// be set to PATCH instead of PUT in order to satisfy HTTP semantics +// (PUT must only be used for full updates). +// +// # JSON Encoding of Field Masks +// +// In JSON, a field mask is encoded as a single string where paths are +// separated by a comma. Fields name in each path are converted +// to/from lower-camel naming conventions. +// +// As an example, consider the following message declarations: +// +// message Profile { +// User user = 1; +// Photo photo = 2; +// } +// message User { +// string display_name = 1; +// string address = 2; +// } +// +// In proto a field mask for `Profile` may look as such: +// +// mask { +// paths: "user.display_name" +// paths: "photo" +// } +// +// In JSON, the same mask is represented as below: +// +// { +// mask: "user.displayName,photo" +// } +// +// # Field Masks and Oneof Fields +// +// Field masks treat fields in oneofs just as regular fields. Consider the +// following message: +// +// message SampleMessage { +// oneof test_oneof { +// string name = 4; +// SubMessage sub_message = 9; +// } +// } +// +// The field mask can be: +// +// mask { +// paths: "name" +// } +// +// Or: +// +// mask { +// paths: "sub_message" +// } +// +// Note that oneof type names ("test_oneof" in this case) cannot be used in +// paths. +// +// ## Field Mask Verification +// +// The implementation of any API method which has a FieldMask type field in the +// request should verify the included field paths, and return an +// `INVALID_ARGUMENT` error if any path is duplicated or unmappable. +type FieldMask struct { + // The set of field mask paths. + Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FieldMask) Reset() { *m = FieldMask{} } +func (*FieldMask) ProtoMessage() {} +func (*FieldMask) Descriptor() ([]byte, []int) { + return fileDescriptor_5158202634f0da48, []int{0} +} +func (m *FieldMask) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FieldMask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FieldMask.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FieldMask) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldMask.Merge(m, src) +} +func (m *FieldMask) XXX_Size() int { + return m.Size() +} +func (m *FieldMask) XXX_DiscardUnknown() { + xxx_messageInfo_FieldMask.DiscardUnknown(m) +} + +var xxx_messageInfo_FieldMask proto.InternalMessageInfo + +func (m *FieldMask) GetPaths() []string { + if m != nil { + return m.Paths + } + return nil +} + +func (*FieldMask) XXX_MessageName() string { + return "google.protobuf.FieldMask" +} +func init() { + proto.RegisterType((*FieldMask)(nil), "google.protobuf.FieldMask") +} + +func init() { proto.RegisterFile("google/protobuf/field_mask.proto", fileDescriptor_5158202634f0da48) } + +var fileDescriptor_5158202634f0da48 = []byte{ + // 203 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcb, 0x4c, 0xcd, + 0x49, 0x89, 0xcf, 0x4d, 0x2c, 0xce, 0xd6, 0x03, 0x8b, 0x09, 0xf1, 0x43, 0x54, 0xe8, 0xc1, 0x54, + 0x28, 0x29, 0x72, 0x71, 0xba, 0x81, 0x14, 0xf9, 0x26, 0x16, 0x67, 0x0b, 0x89, 0x70, 0xb1, 0x16, + 0x24, 0x96, 0x64, 0x14, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x06, 0x41, 0x38, 0x4e, 0x1d, 0x8c, + 0x37, 0x1e, 0xca, 0x31, 0x7c, 0x78, 0x28, 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, + 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, + 0x39, 0xc6, 0x17, 0x8f, 0xe4, 0x18, 0x3e, 0x80, 0xc4, 0x1f, 0xcb, 0x31, 0x9e, 0x78, 0x2c, 0xc7, + 0xc8, 0x25, 0x9c, 0x9c, 0x9f, 0xab, 0x87, 0x66, 0x95, 0x13, 0x1f, 0xdc, 0xa2, 0x00, 0x90, 0x50, + 0x00, 0x63, 0x14, 0x6b, 0x49, 0x65, 0x41, 0x6a, 0xf1, 0x0f, 0x46, 0xc6, 0x45, 0x4c, 0xcc, 0xee, + 0x01, 0x4e, 0xab, 0x98, 0xe4, 0xdc, 0x21, 0x7a, 0x02, 0xa0, 0x7a, 0xf4, 0xc2, 0x53, 0x73, 0x72, + 0xbc, 0xf3, 0xf2, 0xcb, 0xf3, 0x42, 0x40, 0x2a, 0x93, 0xd8, 0xc0, 0x86, 0x19, 0x03, 0x02, 0x00, + 0x00, 0xff, 0xff, 0x43, 0xa0, 0x83, 0xd0, 0xe9, 0x00, 0x00, 0x00, +} + +func (this *FieldMask) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*FieldMask) + if !ok { + that2, ok := that.(FieldMask) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Paths) != len(that1.Paths) { + if len(this.Paths) < len(that1.Paths) { + return -1 + } + return 1 + } + for i := range this.Paths { + if this.Paths[i] != that1.Paths[i] { + if this.Paths[i] < that1.Paths[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *FieldMask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FieldMask) + if !ok { + that2, ok := that.(FieldMask) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Paths) != len(that1.Paths) { + return false + } + for i := range this.Paths { + if this.Paths[i] != that1.Paths[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FieldMask) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.FieldMask{") + s = append(s, "Paths: "+fmt.Sprintf("%#v", this.Paths)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringFieldMask(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *FieldMask) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FieldMask) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FieldMask) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Paths) > 0 { + for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Paths[iNdEx]) + copy(dAtA[i:], m.Paths[iNdEx]) + i = encodeVarintFieldMask(dAtA, i, uint64(len(m.Paths[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintFieldMask(dAtA []byte, offset int, v uint64) int { + offset -= sovFieldMask(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func NewPopulatedFieldMask(r randyFieldMask, easy bool) *FieldMask { + this := &FieldMask{} + v1 := r.Intn(10) + this.Paths = make([]string, v1) + for i := 0; i < v1; i++ { + this.Paths[i] = string(randStringFieldMask(r)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedFieldMask(r, 2) + } + return this +} + +type randyFieldMask interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneFieldMask(r randyFieldMask) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringFieldMask(r randyFieldMask) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneFieldMask(r) + } + return string(tmps) +} +func randUnrecognizedFieldMask(r randyFieldMask, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldFieldMask(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldFieldMask(dAtA []byte, r randyFieldMask, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateFieldMask(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *FieldMask) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Paths) > 0 { + for _, s := range m.Paths { + l = len(s) + n += 1 + l + sovFieldMask(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovFieldMask(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozFieldMask(x uint64) (n int) { + return sovFieldMask(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FieldMask) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FieldMask{`, + `Paths:` + fmt.Sprintf("%v", this.Paths) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringFieldMask(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *FieldMask) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFieldMask + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FieldMask: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FieldMask: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFieldMask + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthFieldMask + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFieldMask + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFieldMask(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthFieldMask + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthFieldMask + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFieldMask(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFieldMask + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFieldMask + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFieldMask + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthFieldMask + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupFieldMask + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthFieldMask + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthFieldMask = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFieldMask = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupFieldMask = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/github.com/gogo/protobuf/types/protosize.go b/vendor/github.com/gogo/protobuf/types/protosize.go new file mode 100644 index 00000000..3a2d1b7e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/protosize.go @@ -0,0 +1,34 @@ +package types + +func (m *Any) ProtoSize() (n int) { return m.Size() } +func (m *Api) ProtoSize() (n int) { return m.Size() } +func (m *Method) ProtoSize() (n int) { return m.Size() } +func (m *Mixin) ProtoSize() (n int) { return m.Size() } +func (m *Duration) ProtoSize() (n int) { return m.Size() } +func (m *Empty) ProtoSize() (n int) { return m.Size() } +func (m *FieldMask) ProtoSize() (n int) { return m.Size() } +func (m *SourceContext) ProtoSize() (n int) { return m.Size() } +func (m *Struct) ProtoSize() (n int) { return m.Size() } +func (m *Value) ProtoSize() (n int) { return m.Size() } +func (m *Value_NullValue) ProtoSize() (n int) { return m.Size() } +func (m *Value_NumberValue) ProtoSize() (n int) { return m.Size() } +func (m *Value_StringValue) ProtoSize() (n int) { return m.Size() } +func (m *Value_BoolValue) ProtoSize() (n int) { return m.Size() } +func (m *Value_StructValue) ProtoSize() (n int) { return m.Size() } +func (m *Value_ListValue) ProtoSize() (n int) { return m.Size() } +func (m *ListValue) ProtoSize() (n int) { return m.Size() } +func (m *Timestamp) ProtoSize() (n int) { return m.Size() } +func (m *Type) ProtoSize() (n int) { return m.Size() } +func (m *Field) ProtoSize() (n int) { return m.Size() } +func (m *Enum) ProtoSize() (n int) { return m.Size() } +func (m *EnumValue) ProtoSize() (n int) { return m.Size() } +func (m *Option) ProtoSize() (n int) { return m.Size() } +func (m *DoubleValue) ProtoSize() (n int) { return m.Size() } +func (m *FloatValue) ProtoSize() (n int) { return m.Size() } +func (m *Int64Value) ProtoSize() (n int) { return m.Size() } +func (m *UInt64Value) ProtoSize() (n int) { return m.Size() } +func (m *Int32Value) ProtoSize() (n int) { return m.Size() } +func (m *UInt32Value) ProtoSize() (n int) { return m.Size() } +func (m *BoolValue) ProtoSize() (n int) { return m.Size() } +func (m *StringValue) ProtoSize() (n int) { return m.Size() } +func (m *BytesValue) ProtoSize() (n int) { return m.Size() } diff --git a/vendor/github.com/gogo/protobuf/types/source_context.pb.go b/vendor/github.com/gogo/protobuf/types/source_context.pb.go new file mode 100644 index 00000000..61045ce1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/source_context.pb.go @@ -0,0 +1,527 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/source_context.proto + +package types + +import ( + bytes "bytes" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// `SourceContext` represents information about the source of a +// protobuf element, like the file in which it is defined. +type SourceContext struct { + // The path-qualified name of the .proto file that contained the associated + // protobuf element. For example: `"google/protobuf/source_context.proto"`. + FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SourceContext) Reset() { *m = SourceContext{} } +func (*SourceContext) ProtoMessage() {} +func (*SourceContext) Descriptor() ([]byte, []int) { + return fileDescriptor_b686cdb126d509db, []int{0} +} +func (m *SourceContext) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SourceContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SourceContext.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SourceContext) XXX_Merge(src proto.Message) { + xxx_messageInfo_SourceContext.Merge(m, src) +} +func (m *SourceContext) XXX_Size() int { + return m.Size() +} +func (m *SourceContext) XXX_DiscardUnknown() { + xxx_messageInfo_SourceContext.DiscardUnknown(m) +} + +var xxx_messageInfo_SourceContext proto.InternalMessageInfo + +func (m *SourceContext) GetFileName() string { + if m != nil { + return m.FileName + } + return "" +} + +func (*SourceContext) XXX_MessageName() string { + return "google.protobuf.SourceContext" +} +func init() { + proto.RegisterType((*SourceContext)(nil), "google.protobuf.SourceContext") +} + +func init() { + proto.RegisterFile("google/protobuf/source_context.proto", fileDescriptor_b686cdb126d509db) +} + +var fileDescriptor_b686cdb126d509db = []byte{ + // 212 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xce, 0x2f, 0x2d, + 0x4a, 0x4e, 0x8d, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xad, 0x28, 0xd1, 0x03, 0x8b, 0x0b, 0xf1, 0x43, + 0x54, 0xe9, 0xc1, 0x54, 0x29, 0xe9, 0x70, 0xf1, 0x06, 0x83, 0x15, 0x3a, 0x43, 0xd4, 0x09, 0x49, + 0x73, 0x71, 0xa6, 0x65, 0xe6, 0xa4, 0xc6, 0xe7, 0x25, 0xe6, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x6a, + 0x70, 0x06, 0x71, 0x80, 0x04, 0xfc, 0x12, 0x73, 0x53, 0x9d, 0x3a, 0x19, 0x6f, 0x3c, 0x94, 0x63, + 0xf8, 0xf0, 0x50, 0x8e, 0xf1, 0xc7, 0x43, 0x39, 0xc6, 0x86, 0x47, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, + 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x2f, 0x1e, + 0xc9, 0x31, 0x7c, 0x00, 0x89, 0x3f, 0x96, 0x63, 0x3c, 0xf1, 0x58, 0x8e, 0x91, 0x4b, 0x38, 0x39, + 0x3f, 0x57, 0x0f, 0xcd, 0x56, 0x27, 0x21, 0x14, 0x3b, 0x03, 0x40, 0xc2, 0x01, 0x8c, 0x51, 0xac, + 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x8b, 0x98, 0x98, 0xdd, 0x03, 0x9c, 0x56, 0x31, 0xc9, 0xb9, 0x43, + 0x34, 0x05, 0x40, 0x35, 0xe9, 0x85, 0xa7, 0xe6, 0xe4, 0x78, 0xe7, 0xe5, 0x97, 0xe7, 0x85, 0x80, + 0x94, 0x25, 0xb1, 0x81, 0x4d, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x37, 0x2a, 0xa1, + 0xf9, 0x00, 0x00, 0x00, +} + +func (this *SourceContext) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*SourceContext) + if !ok { + that2, ok := that.(SourceContext) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FileName != that1.FileName { + if this.FileName < that1.FileName { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *SourceContext) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SourceContext) + if !ok { + that2, ok := that.(SourceContext) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FileName != that1.FileName { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SourceContext) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.SourceContext{") + s = append(s, "FileName: "+fmt.Sprintf("%#v", this.FileName)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringSourceContext(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *SourceContext) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SourceContext) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SourceContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.FileName) > 0 { + i -= len(m.FileName) + copy(dAtA[i:], m.FileName) + i = encodeVarintSourceContext(dAtA, i, uint64(len(m.FileName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintSourceContext(dAtA []byte, offset int, v uint64) int { + offset -= sovSourceContext(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func NewPopulatedSourceContext(r randySourceContext, easy bool) *SourceContext { + this := &SourceContext{} + this.FileName = string(randStringSourceContext(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedSourceContext(r, 2) + } + return this +} + +type randySourceContext interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneSourceContext(r randySourceContext) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringSourceContext(r randySourceContext) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneSourceContext(r) + } + return string(tmps) +} +func randUnrecognizedSourceContext(r randySourceContext, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldSourceContext(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldSourceContext(dAtA []byte, r randySourceContext, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateSourceContext(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *SourceContext) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FileName) + if l > 0 { + n += 1 + l + sovSourceContext(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovSourceContext(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozSourceContext(x uint64) (n int) { + return sovSourceContext(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *SourceContext) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SourceContext{`, + `FileName:` + fmt.Sprintf("%v", this.FileName) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringSourceContext(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *SourceContext) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSourceContext + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SourceContext: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SourceContext: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSourceContext + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSourceContext + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSourceContext + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSourceContext(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSourceContext + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthSourceContext + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipSourceContext(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSourceContext + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSourceContext + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSourceContext + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthSourceContext + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupSourceContext + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthSourceContext + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthSourceContext = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSourceContext = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupSourceContext = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/github.com/gogo/protobuf/types/struct.pb.go b/vendor/github.com/gogo/protobuf/types/struct.pb.go new file mode 100644 index 00000000..cea553ee --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/struct.pb.go @@ -0,0 +1,2280 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/struct.proto + +package types + +import ( + bytes "bytes" + encoding_binary "encoding/binary" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strconv "strconv" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// `NullValue` is a singleton enumeration to represent the null value for the +// `Value` type union. +// +// The JSON representation for `NullValue` is JSON `null`. +type NullValue int32 + +const ( + // Null value. + NullValue_NULL_VALUE NullValue = 0 +) + +var NullValue_name = map[int32]string{ + 0: "NULL_VALUE", +} + +var NullValue_value = map[string]int32{ + "NULL_VALUE": 0, +} + +func (NullValue) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_df322afd6c9fb402, []int{0} +} + +func (NullValue) XXX_WellKnownType() string { return "NullValue" } + +// `Struct` represents a structured data value, consisting of fields +// which map to dynamically typed values. In some languages, `Struct` +// might be supported by a native representation. For example, in +// scripting languages like JS a struct is represented as an +// object. The details of that representation are described together +// with the proto support for the language. +// +// The JSON representation for `Struct` is JSON object. +type Struct struct { + // Unordered map of dynamically typed values. + Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Struct) Reset() { *m = Struct{} } +func (*Struct) ProtoMessage() {} +func (*Struct) Descriptor() ([]byte, []int) { + return fileDescriptor_df322afd6c9fb402, []int{0} +} +func (*Struct) XXX_WellKnownType() string { return "Struct" } +func (m *Struct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Struct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Struct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Struct) XXX_Merge(src proto.Message) { + xxx_messageInfo_Struct.Merge(m, src) +} +func (m *Struct) XXX_Size() int { + return m.Size() +} +func (m *Struct) XXX_DiscardUnknown() { + xxx_messageInfo_Struct.DiscardUnknown(m) +} + +var xxx_messageInfo_Struct proto.InternalMessageInfo + +func (m *Struct) GetFields() map[string]*Value { + if m != nil { + return m.Fields + } + return nil +} + +func (*Struct) XXX_MessageName() string { + return "google.protobuf.Struct" +} + +// `Value` represents a dynamically typed value which can be either +// null, a number, a string, a boolean, a recursive struct value, or a +// list of values. A producer of value is expected to set one of that +// variants, absence of any variant indicates an error. +// +// The JSON representation for `Value` is JSON value. +type Value struct { + // The kind of value. + // + // Types that are valid to be assigned to Kind: + // *Value_NullValue + // *Value_NumberValue + // *Value_StringValue + // *Value_BoolValue + // *Value_StructValue + // *Value_ListValue + Kind isValue_Kind `protobuf_oneof:"kind"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Value) Reset() { *m = Value{} } +func (*Value) ProtoMessage() {} +func (*Value) Descriptor() ([]byte, []int) { + return fileDescriptor_df322afd6c9fb402, []int{1} +} +func (*Value) XXX_WellKnownType() string { return "Value" } +func (m *Value) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Value.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_Value.Merge(m, src) +} +func (m *Value) XXX_Size() int { + return m.Size() +} +func (m *Value) XXX_DiscardUnknown() { + xxx_messageInfo_Value.DiscardUnknown(m) +} + +var xxx_messageInfo_Value proto.InternalMessageInfo + +type isValue_Kind interface { + isValue_Kind() + Equal(interface{}) bool + MarshalTo([]byte) (int, error) + Size() int + Compare(interface{}) int +} + +type Value_NullValue struct { + NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue,oneof" json:"null_value,omitempty"` +} +type Value_NumberValue struct { + NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,proto3,oneof" json:"number_value,omitempty"` +} +type Value_StringValue struct { + StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof" json:"string_value,omitempty"` +} +type Value_BoolValue struct { + BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof" json:"bool_value,omitempty"` +} +type Value_StructValue struct { + StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,proto3,oneof" json:"struct_value,omitempty"` +} +type Value_ListValue struct { + ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,proto3,oneof" json:"list_value,omitempty"` +} + +func (*Value_NullValue) isValue_Kind() {} +func (*Value_NumberValue) isValue_Kind() {} +func (*Value_StringValue) isValue_Kind() {} +func (*Value_BoolValue) isValue_Kind() {} +func (*Value_StructValue) isValue_Kind() {} +func (*Value_ListValue) isValue_Kind() {} + +func (m *Value) GetKind() isValue_Kind { + if m != nil { + return m.Kind + } + return nil +} + +func (m *Value) GetNullValue() NullValue { + if x, ok := m.GetKind().(*Value_NullValue); ok { + return x.NullValue + } + return NullValue_NULL_VALUE +} + +func (m *Value) GetNumberValue() float64 { + if x, ok := m.GetKind().(*Value_NumberValue); ok { + return x.NumberValue + } + return 0 +} + +func (m *Value) GetStringValue() string { + if x, ok := m.GetKind().(*Value_StringValue); ok { + return x.StringValue + } + return "" +} + +func (m *Value) GetBoolValue() bool { + if x, ok := m.GetKind().(*Value_BoolValue); ok { + return x.BoolValue + } + return false +} + +func (m *Value) GetStructValue() *Struct { + if x, ok := m.GetKind().(*Value_StructValue); ok { + return x.StructValue + } + return nil +} + +func (m *Value) GetListValue() *ListValue { + if x, ok := m.GetKind().(*Value_ListValue); ok { + return x.ListValue + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Value) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Value_NullValue)(nil), + (*Value_NumberValue)(nil), + (*Value_StringValue)(nil), + (*Value_BoolValue)(nil), + (*Value_StructValue)(nil), + (*Value_ListValue)(nil), + } +} + +func (*Value) XXX_MessageName() string { + return "google.protobuf.Value" +} + +// `ListValue` is a wrapper around a repeated field of values. +// +// The JSON representation for `ListValue` is JSON array. +type ListValue struct { + // Repeated field of dynamically typed values. + Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListValue) Reset() { *m = ListValue{} } +func (*ListValue) ProtoMessage() {} +func (*ListValue) Descriptor() ([]byte, []int) { + return fileDescriptor_df322afd6c9fb402, []int{2} +} +func (*ListValue) XXX_WellKnownType() string { return "ListValue" } +func (m *ListValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListValue.Merge(m, src) +} +func (m *ListValue) XXX_Size() int { + return m.Size() +} +func (m *ListValue) XXX_DiscardUnknown() { + xxx_messageInfo_ListValue.DiscardUnknown(m) +} + +var xxx_messageInfo_ListValue proto.InternalMessageInfo + +func (m *ListValue) GetValues() []*Value { + if m != nil { + return m.Values + } + return nil +} + +func (*ListValue) XXX_MessageName() string { + return "google.protobuf.ListValue" +} +func init() { + proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value) + proto.RegisterType((*Struct)(nil), "google.protobuf.Struct") + proto.RegisterMapType((map[string]*Value)(nil), "google.protobuf.Struct.FieldsEntry") + proto.RegisterType((*Value)(nil), "google.protobuf.Value") + proto.RegisterType((*ListValue)(nil), "google.protobuf.ListValue") +} + +func init() { proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor_df322afd6c9fb402) } + +var fileDescriptor_df322afd6c9fb402 = []byte{ + // 443 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xb1, 0x6f, 0xd3, 0x40, + 0x14, 0xc6, 0xfd, 0x9c, 0xc6, 0x22, 0xcf, 0xa8, 0x54, 0x87, 0x04, 0x51, 0x41, 0x47, 0x94, 0x2e, + 0x11, 0x42, 0xae, 0x14, 0x16, 0x44, 0x58, 0x88, 0x54, 0x5a, 0x89, 0xa8, 0x32, 0x86, 0x16, 0x89, + 0x25, 0xc2, 0xae, 0x1b, 0x59, 0xbd, 0xde, 0x55, 0xf6, 0x1d, 0x28, 0x1b, 0x0b, 0xff, 0x03, 0x33, + 0x13, 0x62, 0xe4, 0xaf, 0xe8, 0xc8, 0xc8, 0x48, 0xdc, 0x85, 0xb1, 0x63, 0x47, 0x74, 0x77, 0xb6, + 0x41, 0x8d, 0xb2, 0xf9, 0x7d, 0xf7, 0x7b, 0xdf, 0x7b, 0xdf, 0x33, 0xde, 0x9f, 0x09, 0x31, 0x63, + 0xe9, 0xf6, 0x59, 0x2e, 0xa4, 0x88, 0xd5, 0xf1, 0x76, 0x21, 0x73, 0x95, 0xc8, 0xc0, 0xd4, 0xe4, + 0x96, 0x7d, 0x0d, 0xea, 0xd7, 0xfe, 0x17, 0x40, 0xef, 0xb5, 0x21, 0xc8, 0x08, 0xbd, 0xe3, 0x2c, + 0x65, 0x47, 0x45, 0x17, 0x7a, 0xad, 0x81, 0x3f, 0xdc, 0x0a, 0xae, 0xc1, 0x81, 0x05, 0x83, 0x17, + 0x86, 0xda, 0xe1, 0x32, 0x9f, 0x47, 0x55, 0xcb, 0xe6, 0x2b, 0xf4, 0xff, 0x93, 0xc9, 0x06, 0xb6, + 0x4e, 0xd2, 0x79, 0x17, 0x7a, 0x30, 0xe8, 0x44, 0xfa, 0x93, 0x3c, 0xc2, 0xf6, 0x87, 0xf7, 0x4c, + 0xa5, 0x5d, 0xb7, 0x07, 0x03, 0x7f, 0x78, 0x67, 0xc9, 0xfc, 0x50, 0xbf, 0x46, 0x16, 0x7a, 0xea, + 0x3e, 0x81, 0xfe, 0x0f, 0x17, 0xdb, 0x46, 0x24, 0x23, 0x44, 0xae, 0x18, 0x9b, 0x5a, 0x03, 0x6d, + 0xba, 0x3e, 0xdc, 0x5c, 0x32, 0xd8, 0x57, 0x8c, 0x19, 0x7e, 0xcf, 0x89, 0x3a, 0xbc, 0x2e, 0xc8, + 0x16, 0xde, 0xe4, 0xea, 0x34, 0x4e, 0xf3, 0xe9, 0xbf, 0xf9, 0xb0, 0xe7, 0x44, 0xbe, 0x55, 0x1b, + 0xa8, 0x90, 0x79, 0xc6, 0x67, 0x15, 0xd4, 0xd2, 0x8b, 0x6b, 0xc8, 0xaa, 0x16, 0x7a, 0x80, 0x18, + 0x0b, 0x51, 0xaf, 0xb1, 0xd6, 0x83, 0xc1, 0x0d, 0x3d, 0x4a, 0x6b, 0x16, 0x78, 0x66, 0x5c, 0x54, + 0x22, 0x2b, 0xa4, 0x6d, 0xa2, 0xde, 0x5d, 0x71, 0xc7, 0xca, 0x5e, 0x25, 0xb2, 0x49, 0xc9, 0xb2, + 0xa2, 0xee, 0xf5, 0x4c, 0xef, 0x72, 0xca, 0x49, 0x56, 0xc8, 0x26, 0x25, 0xab, 0x8b, 0xb1, 0x87, + 0x6b, 0x27, 0x19, 0x3f, 0xea, 0x8f, 0xb0, 0xd3, 0x10, 0x24, 0x40, 0xcf, 0x98, 0xd5, 0x7f, 0x74, + 0xd5, 0xd1, 0x2b, 0xea, 0xe1, 0x3d, 0xec, 0x34, 0x47, 0x24, 0xeb, 0x88, 0xfb, 0x07, 0x93, 0xc9, + 0xf4, 0xf0, 0xf9, 0xe4, 0x60, 0x67, 0xc3, 0x19, 0x7f, 0x86, 0x5f, 0x0b, 0xea, 0x5c, 0x2e, 0x28, + 0x5c, 0x2d, 0x28, 0x7c, 0x2a, 0x29, 0x7c, 0x2b, 0x29, 0x9c, 0x97, 0x14, 0x7e, 0x96, 0x14, 0x7e, + 0x97, 0x14, 0xfe, 0x94, 0xd4, 0xb9, 0xd4, 0xfa, 0x05, 0x85, 0xf3, 0x0b, 0x0a, 0x78, 0x3b, 0x11, + 0xa7, 0xd7, 0x47, 0x8e, 0x7d, 0x9b, 0x3e, 0xd4, 0x75, 0x08, 0xef, 0xda, 0x72, 0x7e, 0x96, 0x16, + 0x57, 0x00, 0x5f, 0xdd, 0xd6, 0x6e, 0x38, 0xfe, 0xee, 0xd2, 0x5d, 0xdb, 0x10, 0xd6, 0x3b, 0xbe, + 0x4d, 0x19, 0x7b, 0xc9, 0xc5, 0x47, 0xfe, 0x46, 0x93, 0xb1, 0x67, 0x9c, 0x1e, 0xff, 0x0d, 0x00, + 0x00, 0xff, 0xff, 0x26, 0x30, 0xdb, 0xbe, 0xe9, 0x02, 0x00, 0x00, +} + +func (this *Struct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Struct) + if !ok { + that2, ok := that.(Struct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Fields) != len(that1.Fields) { + if len(this.Fields) < len(that1.Fields) { + return -1 + } + return 1 + } + for i := range this.Fields { + if c := this.Fields[i].Compare(that1.Fields[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Value) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Value) + if !ok { + that2, ok := that.(Value) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Kind == nil { + if this.Kind != nil { + return 1 + } + } else if this.Kind == nil { + return -1 + } else { + thisType := -1 + switch this.Kind.(type) { + case *Value_NullValue: + thisType = 0 + case *Value_NumberValue: + thisType = 1 + case *Value_StringValue: + thisType = 2 + case *Value_BoolValue: + thisType = 3 + case *Value_StructValue: + thisType = 4 + case *Value_ListValue: + thisType = 5 + default: + panic(fmt.Sprintf("compare: unexpected type %T in oneof", this.Kind)) + } + that1Type := -1 + switch that1.Kind.(type) { + case *Value_NullValue: + that1Type = 0 + case *Value_NumberValue: + that1Type = 1 + case *Value_StringValue: + that1Type = 2 + case *Value_BoolValue: + that1Type = 3 + case *Value_StructValue: + that1Type = 4 + case *Value_ListValue: + that1Type = 5 + default: + panic(fmt.Sprintf("compare: unexpected type %T in oneof", that1.Kind)) + } + if thisType == that1Type { + if c := this.Kind.Compare(that1.Kind); c != 0 { + return c + } + } else if thisType < that1Type { + return -1 + } else if thisType > that1Type { + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Value_NullValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Value_NullValue) + if !ok { + that2, ok := that.(Value_NullValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NullValue != that1.NullValue { + if this.NullValue < that1.NullValue { + return -1 + } + return 1 + } + return 0 +} +func (this *Value_NumberValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Value_NumberValue) + if !ok { + that2, ok := that.(Value_NumberValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NumberValue != that1.NumberValue { + if this.NumberValue < that1.NumberValue { + return -1 + } + return 1 + } + return 0 +} +func (this *Value_StringValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Value_StringValue) + if !ok { + that2, ok := that.(Value_StringValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.StringValue != that1.StringValue { + if this.StringValue < that1.StringValue { + return -1 + } + return 1 + } + return 0 +} +func (this *Value_BoolValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Value_BoolValue) + if !ok { + that2, ok := that.(Value_BoolValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.BoolValue != that1.BoolValue { + if !this.BoolValue { + return -1 + } + return 1 + } + return 0 +} +func (this *Value_StructValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Value_StructValue) + if !ok { + that2, ok := that.(Value_StructValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.StructValue.Compare(that1.StructValue); c != 0 { + return c + } + return 0 +} +func (this *Value_ListValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Value_ListValue) + if !ok { + that2, ok := that.(Value_ListValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.ListValue.Compare(that1.ListValue); c != 0 { + return c + } + return 0 +} +func (this *ListValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ListValue) + if !ok { + that2, ok := that.(ListValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Values) != len(that1.Values) { + if len(this.Values) < len(that1.Values) { + return -1 + } + return 1 + } + for i := range this.Values { + if c := this.Values[i].Compare(that1.Values[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (x NullValue) String() string { + s, ok := NullValue_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Struct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Struct) + if !ok { + that2, ok := that.(Struct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Fields) != len(that1.Fields) { + return false + } + for i := range this.Fields { + if !this.Fields[i].Equal(that1.Fields[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Value) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value) + if !ok { + that2, ok := that.(Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Kind == nil { + if this.Kind != nil { + return false + } + } else if this.Kind == nil { + return false + } else if !this.Kind.Equal(that1.Kind) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Value_NullValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_NullValue) + if !ok { + that2, ok := that.(Value_NullValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NullValue != that1.NullValue { + return false + } + return true +} +func (this *Value_NumberValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_NumberValue) + if !ok { + that2, ok := that.(Value_NumberValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NumberValue != that1.NumberValue { + return false + } + return true +} +func (this *Value_StringValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_StringValue) + if !ok { + that2, ok := that.(Value_StringValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.StringValue != that1.StringValue { + return false + } + return true +} +func (this *Value_BoolValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_BoolValue) + if !ok { + that2, ok := that.(Value_BoolValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.BoolValue != that1.BoolValue { + return false + } + return true +} +func (this *Value_StructValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_StructValue) + if !ok { + that2, ok := that.(Value_StructValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.StructValue.Equal(that1.StructValue) { + return false + } + return true +} +func (this *Value_ListValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_ListValue) + if !ok { + that2, ok := that.(Value_ListValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.ListValue.Equal(that1.ListValue) { + return false + } + return true +} +func (this *ListValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ListValue) + if !ok { + that2, ok := that.(ListValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Values) != len(that1.Values) { + return false + } + for i := range this.Values { + if !this.Values[i].Equal(that1.Values[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Struct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.Struct{") + keysForFields := make([]string, 0, len(this.Fields)) + for k := range this.Fields { + keysForFields = append(keysForFields, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForFields) + mapStringForFields := "map[string]*Value{" + for _, k := range keysForFields { + mapStringForFields += fmt.Sprintf("%#v: %#v,", k, this.Fields[k]) + } + mapStringForFields += "}" + if this.Fields != nil { + s = append(s, "Fields: "+mapStringForFields+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&types.Value{") + if this.Kind != nil { + s = append(s, "Kind: "+fmt.Sprintf("%#v", this.Kind)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Value_NullValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_NullValue{` + + `NullValue:` + fmt.Sprintf("%#v", this.NullValue) + `}`}, ", ") + return s +} +func (this *Value_NumberValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_NumberValue{` + + `NumberValue:` + fmt.Sprintf("%#v", this.NumberValue) + `}`}, ", ") + return s +} +func (this *Value_StringValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_StringValue{` + + `StringValue:` + fmt.Sprintf("%#v", this.StringValue) + `}`}, ", ") + return s +} +func (this *Value_BoolValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_BoolValue{` + + `BoolValue:` + fmt.Sprintf("%#v", this.BoolValue) + `}`}, ", ") + return s +} +func (this *Value_StructValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_StructValue{` + + `StructValue:` + fmt.Sprintf("%#v", this.StructValue) + `}`}, ", ") + return s +} +func (this *Value_ListValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_ListValue{` + + `ListValue:` + fmt.Sprintf("%#v", this.ListValue) + `}`}, ", ") + return s +} +func (this *ListValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.ListValue{") + if this.Values != nil { + s = append(s, "Values: "+fmt.Sprintf("%#v", this.Values)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringStruct(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Struct) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Struct) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Struct) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Fields) > 0 { + for k := range m.Fields { + v := m.Fields[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStruct(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintStruct(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintStruct(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Value) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Value) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Value) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Kind != nil { + { + size := m.Kind.Size() + i -= size + if _, err := m.Kind.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *Value_NullValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Value_NullValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintStruct(dAtA, i, uint64(m.NullValue)) + i-- + dAtA[i] = 0x8 + return len(dAtA) - i, nil +} +func (m *Value_NumberValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Value_NumberValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.NumberValue)))) + i-- + dAtA[i] = 0x11 + return len(dAtA) - i, nil +} +func (m *Value_StringValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Value_StringValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.StringValue) + copy(dAtA[i:], m.StringValue) + i = encodeVarintStruct(dAtA, i, uint64(len(m.StringValue))) + i-- + dAtA[i] = 0x1a + return len(dAtA) - i, nil +} +func (m *Value_BoolValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Value_BoolValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i-- + if m.BoolValue { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + return len(dAtA) - i, nil +} +func (m *Value_StructValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Value_StructValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.StructValue != nil { + { + size, err := m.StructValue.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStruct(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + return len(dAtA) - i, nil +} +func (m *Value_ListValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Value_ListValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ListValue != nil { + { + size, err := m.ListValue.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStruct(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + return len(dAtA) - i, nil +} +func (m *ListValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Values) > 0 { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStruct(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintStruct(dAtA []byte, offset int, v uint64) int { + offset -= sovStruct(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func NewPopulatedStruct(r randyStruct, easy bool) *Struct { + this := &Struct{} + if r.Intn(5) == 0 { + v1 := r.Intn(10) + this.Fields = make(map[string]*Value) + for i := 0; i < v1; i++ { + this.Fields[randStringStruct(r)] = NewPopulatedValue(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedStruct(r, 2) + } + return this +} + +func NewPopulatedValue(r randyStruct, easy bool) *Value { + this := &Value{} + oneofNumber_Kind := []int32{1, 2, 3, 4, 5, 6}[r.Intn(6)] + switch oneofNumber_Kind { + case 1: + this.Kind = NewPopulatedValue_NullValue(r, easy) + case 2: + this.Kind = NewPopulatedValue_NumberValue(r, easy) + case 3: + this.Kind = NewPopulatedValue_StringValue(r, easy) + case 4: + this.Kind = NewPopulatedValue_BoolValue(r, easy) + case 5: + this.Kind = NewPopulatedValue_StructValue(r, easy) + case 6: + this.Kind = NewPopulatedValue_ListValue(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedStruct(r, 7) + } + return this +} + +func NewPopulatedValue_NullValue(r randyStruct, easy bool) *Value_NullValue { + this := &Value_NullValue{} + this.NullValue = NullValue([]int32{0}[r.Intn(1)]) + return this +} +func NewPopulatedValue_NumberValue(r randyStruct, easy bool) *Value_NumberValue { + this := &Value_NumberValue{} + this.NumberValue = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NumberValue *= -1 + } + return this +} +func NewPopulatedValue_StringValue(r randyStruct, easy bool) *Value_StringValue { + this := &Value_StringValue{} + this.StringValue = string(randStringStruct(r)) + return this +} +func NewPopulatedValue_BoolValue(r randyStruct, easy bool) *Value_BoolValue { + this := &Value_BoolValue{} + this.BoolValue = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedValue_StructValue(r randyStruct, easy bool) *Value_StructValue { + this := &Value_StructValue{} + this.StructValue = NewPopulatedStruct(r, easy) + return this +} +func NewPopulatedValue_ListValue(r randyStruct, easy bool) *Value_ListValue { + this := &Value_ListValue{} + this.ListValue = NewPopulatedListValue(r, easy) + return this +} +func NewPopulatedListValue(r randyStruct, easy bool) *ListValue { + this := &ListValue{} + if r.Intn(5) == 0 { + v2 := r.Intn(5) + this.Values = make([]*Value, v2) + for i := 0; i < v2; i++ { + this.Values[i] = NewPopulatedValue(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedStruct(r, 2) + } + return this +} + +type randyStruct interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneStruct(r randyStruct) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringStruct(r randyStruct) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneStruct(r) + } + return string(tmps) +} +func randUnrecognizedStruct(r randyStruct, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldStruct(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldStruct(dAtA []byte, r randyStruct, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateStruct(dAtA, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + dAtA = encodeVarintPopulateStruct(dAtA, uint64(v4)) + case 1: + dAtA = encodeVarintPopulateStruct(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateStruct(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateStruct(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateStruct(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateStruct(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Struct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Fields) > 0 { + for k, v := range m.Fields { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovStruct(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovStruct(uint64(len(k))) + l + n += mapEntrySize + 1 + sovStruct(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Value) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Kind != nil { + n += m.Kind.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Value_NullValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovStruct(uint64(m.NullValue)) + return n +} +func (m *Value_NumberValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *Value_StringValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StringValue) + n += 1 + l + sovStruct(uint64(l)) + return n +} +func (m *Value_BoolValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *Value_StructValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StructValue != nil { + l = m.StructValue.Size() + n += 1 + l + sovStruct(uint64(l)) + } + return n +} +func (m *Value_ListValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ListValue != nil { + l = m.ListValue.Size() + n += 1 + l + sovStruct(uint64(l)) + } + return n +} +func (m *ListValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Values) > 0 { + for _, e := range m.Values { + l = e.Size() + n += 1 + l + sovStruct(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovStruct(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozStruct(x uint64) (n int) { + return sovStruct(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Struct) String() string { + if this == nil { + return "nil" + } + keysForFields := make([]string, 0, len(this.Fields)) + for k := range this.Fields { + keysForFields = append(keysForFields, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForFields) + mapStringForFields := "map[string]*Value{" + for _, k := range keysForFields { + mapStringForFields += fmt.Sprintf("%v: %v,", k, this.Fields[k]) + } + mapStringForFields += "}" + s := strings.Join([]string{`&Struct{`, + `Fields:` + mapStringForFields + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value{`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Value_NullValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_NullValue{`, + `NullValue:` + fmt.Sprintf("%v", this.NullValue) + `,`, + `}`, + }, "") + return s +} +func (this *Value_NumberValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_NumberValue{`, + `NumberValue:` + fmt.Sprintf("%v", this.NumberValue) + `,`, + `}`, + }, "") + return s +} +func (this *Value_StringValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_StringValue{`, + `StringValue:` + fmt.Sprintf("%v", this.StringValue) + `,`, + `}`, + }, "") + return s +} +func (this *Value_BoolValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_BoolValue{`, + `BoolValue:` + fmt.Sprintf("%v", this.BoolValue) + `,`, + `}`, + }, "") + return s +} +func (this *Value_StructValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_StructValue{`, + `StructValue:` + strings.Replace(fmt.Sprintf("%v", this.StructValue), "Struct", "Struct", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Value_ListValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_ListValue{`, + `ListValue:` + strings.Replace(fmt.Sprintf("%v", this.ListValue), "ListValue", "ListValue", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ListValue) String() string { + if this == nil { + return "nil" + } + repeatedStringForValues := "[]*Value{" + for _, f := range this.Values { + repeatedStringForValues += strings.Replace(f.String(), "Value", "Value", 1) + "," + } + repeatedStringForValues += "}" + s := strings.Join([]string{`&ListValue{`, + `Values:` + repeatedStringForValues + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringStruct(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Struct) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Struct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Struct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStruct + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStruct + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fields == nil { + m.Fields = make(map[string]*Value) + } + var mapkey string + var mapvalue *Value + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthStruct + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthStruct + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthStruct + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthStruct + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipStruct(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStruct + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fields[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStruct(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStruct + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStruct + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Value) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NullValue", wireType) + } + var v NullValue + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= NullValue(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Kind = &Value_NullValue{v} + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NumberValue", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Kind = &Value_NumberValue{float64(math.Float64frombits(v))} + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStruct + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStruct + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = &Value_StringValue{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Kind = &Value_BoolValue{b} + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StructValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStruct + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStruct + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Struct{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Kind = &Value_StructValue{v} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStruct + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStruct + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ListValue{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Kind = &Value_ListValue{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStruct(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStruct + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStruct + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStruct + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStruct + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Values = append(m.Values, &Value{}) + if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStruct(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStruct + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStruct + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipStruct(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStruct + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStruct + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStruct + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthStruct + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupStruct + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthStruct + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthStruct = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowStruct = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupStruct = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/github.com/gogo/protobuf/types/timestamp.go b/vendor/github.com/gogo/protobuf/types/timestamp.go new file mode 100644 index 00000000..232ada57 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/timestamp.go @@ -0,0 +1,130 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +// This file implements operations on google.protobuf.Timestamp. + +import ( + "errors" + "fmt" + "time" +) + +const ( + // Seconds field of the earliest valid Timestamp. + // This is time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). + minValidSeconds = -62135596800 + // Seconds field just after the latest valid Timestamp. + // This is time.Date(10000, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). + maxValidSeconds = 253402300800 +) + +// validateTimestamp determines whether a Timestamp is valid. +// A valid timestamp represents a time in the range +// [0001-01-01, 10000-01-01) and has a Nanos field +// in the range [0, 1e9). +// +// If the Timestamp is valid, validateTimestamp returns nil. +// Otherwise, it returns an error that describes +// the problem. +// +// Every valid Timestamp can be represented by a time.Time, but the converse is not true. +func validateTimestamp(ts *Timestamp) error { + if ts == nil { + return errors.New("timestamp: nil Timestamp") + } + if ts.Seconds < minValidSeconds { + return fmt.Errorf("timestamp: %#v before 0001-01-01", ts) + } + if ts.Seconds >= maxValidSeconds { + return fmt.Errorf("timestamp: %#v after 10000-01-01", ts) + } + if ts.Nanos < 0 || ts.Nanos >= 1e9 { + return fmt.Errorf("timestamp: %#v: nanos not in range [0, 1e9)", ts) + } + return nil +} + +// TimestampFromProto converts a google.protobuf.Timestamp proto to a time.Time. +// It returns an error if the argument is invalid. +// +// Unlike most Go functions, if Timestamp returns an error, the first return value +// is not the zero time.Time. Instead, it is the value obtained from the +// time.Unix function when passed the contents of the Timestamp, in the UTC +// locale. This may or may not be a meaningful time; many invalid Timestamps +// do map to valid time.Times. +// +// A nil Timestamp returns an error. The first return value in that case is +// undefined. +func TimestampFromProto(ts *Timestamp) (time.Time, error) { + // Don't return the zero value on error, because corresponds to a valid + // timestamp. Instead return whatever time.Unix gives us. + var t time.Time + if ts == nil { + t = time.Unix(0, 0).UTC() // treat nil like the empty Timestamp + } else { + t = time.Unix(ts.Seconds, int64(ts.Nanos)).UTC() + } + return t, validateTimestamp(ts) +} + +// TimestampNow returns a google.protobuf.Timestamp for the current time. +func TimestampNow() *Timestamp { + ts, err := TimestampProto(time.Now()) + if err != nil { + panic("ptypes: time.Now() out of Timestamp range") + } + return ts +} + +// TimestampProto converts the time.Time to a google.protobuf.Timestamp proto. +// It returns an error if the resulting Timestamp is invalid. +func TimestampProto(t time.Time) (*Timestamp, error) { + ts := &Timestamp{ + Seconds: t.Unix(), + Nanos: int32(t.Nanosecond()), + } + if err := validateTimestamp(ts); err != nil { + return nil, err + } + return ts, nil +} + +// TimestampString returns the RFC 3339 string for valid Timestamps. For invalid +// Timestamps, it returns an error message in parentheses. +func TimestampString(ts *Timestamp) string { + t, err := TimestampFromProto(ts) + if err != nil { + return fmt.Sprintf("(%v)", err) + } + return t.Format(time.RFC3339Nano) +} diff --git a/vendor/github.com/gogo/protobuf/types/timestamp.pb.go b/vendor/github.com/gogo/protobuf/types/timestamp.pb.go new file mode 100644 index 00000000..b8187526 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/timestamp.pb.go @@ -0,0 +1,542 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/timestamp.proto + +package types + +import ( + bytes "bytes" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// A Timestamp represents a point in time independent of any time zone or local +// calendar, encoded as a count of seconds and fractions of seconds at +// nanosecond resolution. The count is relative to an epoch at UTC midnight on +// January 1, 1970, in the proleptic Gregorian calendar which extends the +// Gregorian calendar backwards to year one. +// +// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap +// second table is needed for interpretation, using a [24-hour linear +// smear](https://developers.google.com/time/smear). +// +// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By +// restricting to that range, we ensure that we can convert to and from [RFC +// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. +// +// # Examples +// +// Example 1: Compute Timestamp from POSIX `time()`. +// +// Timestamp timestamp; +// timestamp.set_seconds(time(NULL)); +// timestamp.set_nanos(0); +// +// Example 2: Compute Timestamp from POSIX `gettimeofday()`. +// +// struct timeval tv; +// gettimeofday(&tv, NULL); +// +// Timestamp timestamp; +// timestamp.set_seconds(tv.tv_sec); +// timestamp.set_nanos(tv.tv_usec * 1000); +// +// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. +// +// FILETIME ft; +// GetSystemTimeAsFileTime(&ft); +// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; +// +// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z +// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. +// Timestamp timestamp; +// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); +// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); +// +// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. +// +// long millis = System.currentTimeMillis(); +// +// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) +// .setNanos((int) ((millis % 1000) * 1000000)).build(); +// +// +// Example 5: Compute Timestamp from current time in Python. +// +// timestamp = Timestamp() +// timestamp.GetCurrentTime() +// +// # JSON Mapping +// +// In JSON format, the Timestamp type is encoded as a string in the +// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the +// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" +// where {year} is always expressed using four digits while {month}, {day}, +// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional +// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), +// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone +// is required. A proto3 JSON serializer should always use UTC (as indicated by +// "Z") when printing the Timestamp type and a proto3 JSON parser should be +// able to accept both UTC and other timezones (as indicated by an offset). +// +// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past +// 01:30 UTC on January 15, 2017. +// +// In JavaScript, one can convert a Date object to this format using the +// standard +// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) +// method. In Python, a standard `datetime.datetime` object can be converted +// to this format using +// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with +// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use +// the Joda Time's [`ISODateTimeFormat.dateTime()`]( +// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D +// ) to obtain a formatter capable of generating timestamps in this format. +// +// +type Timestamp struct { + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Timestamp) Reset() { *m = Timestamp{} } +func (*Timestamp) ProtoMessage() {} +func (*Timestamp) Descriptor() ([]byte, []int) { + return fileDescriptor_292007bbfe81227e, []int{0} +} +func (*Timestamp) XXX_WellKnownType() string { return "Timestamp" } +func (m *Timestamp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Timestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Timestamp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Timestamp) XXX_Merge(src proto.Message) { + xxx_messageInfo_Timestamp.Merge(m, src) +} +func (m *Timestamp) XXX_Size() int { + return m.Size() +} +func (m *Timestamp) XXX_DiscardUnknown() { + xxx_messageInfo_Timestamp.DiscardUnknown(m) +} + +var xxx_messageInfo_Timestamp proto.InternalMessageInfo + +func (m *Timestamp) GetSeconds() int64 { + if m != nil { + return m.Seconds + } + return 0 +} + +func (m *Timestamp) GetNanos() int32 { + if m != nil { + return m.Nanos + } + return 0 +} + +func (*Timestamp) XXX_MessageName() string { + return "google.protobuf.Timestamp" +} +func init() { + proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp") +} + +func init() { proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor_292007bbfe81227e) } + +var fileDescriptor_292007bbfe81227e = []byte{ + // 212 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xc9, 0xcc, 0x4d, + 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0xd0, 0x03, 0x0b, 0x09, 0xf1, 0x43, 0x14, 0xe8, 0xc1, 0x14, 0x28, + 0x59, 0x73, 0x71, 0x86, 0xc0, 0xd4, 0x08, 0x49, 0x70, 0xb1, 0x17, 0xa7, 0x26, 0xe7, 0xe7, 0xa5, + 0x14, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x07, 0xc1, 0xb8, 0x42, 0x22, 0x5c, 0xac, 0x79, 0x89, + 0x79, 0xf9, 0xc5, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xac, 0x41, 0x10, 0x8e, 0x53, 0x03, 0xe3, 0x8d, + 0x87, 0x72, 0x0c, 0x1f, 0x1e, 0xca, 0x31, 0xae, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, + 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0xbe, 0x78, 0x24, 0xc7, 0xf0, 0xe1, 0x91, 0x1c, + 0xe3, 0x8a, 0xc7, 0x72, 0x8c, 0x27, 0x1e, 0xcb, 0x31, 0x72, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, + 0x59, 0xee, 0xc4, 0x07, 0xb7, 0x3a, 0x00, 0x24, 0x14, 0xc0, 0x18, 0xc5, 0x5a, 0x52, 0x59, 0x90, + 0x5a, 0xfc, 0x83, 0x91, 0x71, 0x11, 0x13, 0xb3, 0x7b, 0x80, 0xd3, 0x2a, 0x26, 0x39, 0x77, 0x88, + 0x9e, 0x00, 0xa8, 0x1e, 0xbd, 0xf0, 0xd4, 0x9c, 0x1c, 0xef, 0xbc, 0xfc, 0xf2, 0xbc, 0x10, 0x90, + 0xca, 0x24, 0x36, 0xb0, 0x61, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x23, 0x83, 0xdd, + 0xfa, 0x00, 0x00, 0x00, +} + +func (this *Timestamp) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timestamp) + if !ok { + that2, ok := that.(Timestamp) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Seconds != that1.Seconds { + if this.Seconds < that1.Seconds { + return -1 + } + return 1 + } + if this.Nanos != that1.Nanos { + if this.Nanos < that1.Nanos { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Timestamp) + if !ok { + that2, ok := that.(Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Seconds != that1.Seconds { + return false + } + if this.Nanos != that1.Nanos { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timestamp) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&types.Timestamp{") + s = append(s, "Seconds: "+fmt.Sprintf("%#v", this.Seconds)+",\n") + s = append(s, "Nanos: "+fmt.Sprintf("%#v", this.Nanos)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringTimestamp(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Timestamp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Timestamp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Timestamp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Nanos != 0 { + i = encodeVarintTimestamp(dAtA, i, uint64(m.Nanos)) + i-- + dAtA[i] = 0x10 + } + if m.Seconds != 0 { + i = encodeVarintTimestamp(dAtA, i, uint64(m.Seconds)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintTimestamp(dAtA []byte, offset int, v uint64) int { + offset -= sovTimestamp(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Timestamp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seconds != 0 { + n += 1 + sovTimestamp(uint64(m.Seconds)) + } + if m.Nanos != 0 { + n += 1 + sovTimestamp(uint64(m.Nanos)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTimestamp(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTimestamp(x uint64) (n int) { + return sovTimestamp(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Timestamp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTimestamp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Timestamp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Timestamp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType) + } + m.Seconds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTimestamp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seconds |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType) + } + m.Nanos = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTimestamp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nanos |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTimestamp(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTimestamp + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTimestamp + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTimestamp(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTimestamp + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTimestamp + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTimestamp + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTimestamp + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTimestamp + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTimestamp + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTimestamp = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTimestamp = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTimestamp = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/github.com/gogo/protobuf/types/timestamp_gogo.go b/vendor/github.com/gogo/protobuf/types/timestamp_gogo.go new file mode 100644 index 00000000..e03fa131 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/timestamp_gogo.go @@ -0,0 +1,94 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +import ( + "time" +) + +func NewPopulatedTimestamp(r interface { + Int63() int64 +}, easy bool) *Timestamp { + this := &Timestamp{} + ns := int64(r.Int63()) + this.Seconds = ns / 1e9 + this.Nanos = int32(ns % 1e9) + return this +} + +func (ts *Timestamp) String() string { + return TimestampString(ts) +} + +func NewPopulatedStdTime(r interface { + Int63() int64 +}, easy bool) *time.Time { + timestamp := NewPopulatedTimestamp(r, easy) + t, err := TimestampFromProto(timestamp) + if err != nil { + return nil + } + return &t +} + +func SizeOfStdTime(t time.Time) int { + ts, err := TimestampProto(t) + if err != nil { + return 0 + } + return ts.Size() +} + +func StdTimeMarshal(t time.Time) ([]byte, error) { + size := SizeOfStdTime(t) + buf := make([]byte, size) + _, err := StdTimeMarshalTo(t, buf) + return buf, err +} + +func StdTimeMarshalTo(t time.Time, data []byte) (int, error) { + ts, err := TimestampProto(t) + if err != nil { + return 0, err + } + return ts.MarshalTo(data) +} + +func StdTimeUnmarshal(t *time.Time, data []byte) error { + ts := &Timestamp{} + if err := ts.Unmarshal(data); err != nil { + return err + } + tt, err := TimestampFromProto(ts) + if err != nil { + return err + } + *t = tt + return nil +} diff --git a/vendor/github.com/gogo/protobuf/types/type.pb.go b/vendor/github.com/gogo/protobuf/types/type.pb.go new file mode 100644 index 00000000..13b7ec02 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/type.pb.go @@ -0,0 +1,3370 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/type.proto + +package types + +import ( + bytes "bytes" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strconv "strconv" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// The syntax in which a protocol buffer element is defined. +type Syntax int32 + +const ( + // Syntax `proto2`. + Syntax_SYNTAX_PROTO2 Syntax = 0 + // Syntax `proto3`. + Syntax_SYNTAX_PROTO3 Syntax = 1 +) + +var Syntax_name = map[int32]string{ + 0: "SYNTAX_PROTO2", + 1: "SYNTAX_PROTO3", +} + +var Syntax_value = map[string]int32{ + "SYNTAX_PROTO2": 0, + "SYNTAX_PROTO3": 1, +} + +func (Syntax) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_dd271cc1e348c538, []int{0} +} + +// Basic field types. +type Field_Kind int32 + +const ( + // Field type unknown. + Field_TYPE_UNKNOWN Field_Kind = 0 + // Field type double. + Field_TYPE_DOUBLE Field_Kind = 1 + // Field type float. + Field_TYPE_FLOAT Field_Kind = 2 + // Field type int64. + Field_TYPE_INT64 Field_Kind = 3 + // Field type uint64. + Field_TYPE_UINT64 Field_Kind = 4 + // Field type int32. + Field_TYPE_INT32 Field_Kind = 5 + // Field type fixed64. + Field_TYPE_FIXED64 Field_Kind = 6 + // Field type fixed32. + Field_TYPE_FIXED32 Field_Kind = 7 + // Field type bool. + Field_TYPE_BOOL Field_Kind = 8 + // Field type string. + Field_TYPE_STRING Field_Kind = 9 + // Field type group. Proto2 syntax only, and deprecated. + Field_TYPE_GROUP Field_Kind = 10 + // Field type message. + Field_TYPE_MESSAGE Field_Kind = 11 + // Field type bytes. + Field_TYPE_BYTES Field_Kind = 12 + // Field type uint32. + Field_TYPE_UINT32 Field_Kind = 13 + // Field type enum. + Field_TYPE_ENUM Field_Kind = 14 + // Field type sfixed32. + Field_TYPE_SFIXED32 Field_Kind = 15 + // Field type sfixed64. + Field_TYPE_SFIXED64 Field_Kind = 16 + // Field type sint32. + Field_TYPE_SINT32 Field_Kind = 17 + // Field type sint64. + Field_TYPE_SINT64 Field_Kind = 18 +) + +var Field_Kind_name = map[int32]string{ + 0: "TYPE_UNKNOWN", + 1: "TYPE_DOUBLE", + 2: "TYPE_FLOAT", + 3: "TYPE_INT64", + 4: "TYPE_UINT64", + 5: "TYPE_INT32", + 6: "TYPE_FIXED64", + 7: "TYPE_FIXED32", + 8: "TYPE_BOOL", + 9: "TYPE_STRING", + 10: "TYPE_GROUP", + 11: "TYPE_MESSAGE", + 12: "TYPE_BYTES", + 13: "TYPE_UINT32", + 14: "TYPE_ENUM", + 15: "TYPE_SFIXED32", + 16: "TYPE_SFIXED64", + 17: "TYPE_SINT32", + 18: "TYPE_SINT64", +} + +var Field_Kind_value = map[string]int32{ + "TYPE_UNKNOWN": 0, + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18, +} + +func (Field_Kind) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_dd271cc1e348c538, []int{1, 0} +} + +// Whether a field is optional, required, or repeated. +type Field_Cardinality int32 + +const ( + // For fields with unknown cardinality. + Field_CARDINALITY_UNKNOWN Field_Cardinality = 0 + // For optional fields. + Field_CARDINALITY_OPTIONAL Field_Cardinality = 1 + // For required fields. Proto2 syntax only. + Field_CARDINALITY_REQUIRED Field_Cardinality = 2 + // For repeated fields. + Field_CARDINALITY_REPEATED Field_Cardinality = 3 +) + +var Field_Cardinality_name = map[int32]string{ + 0: "CARDINALITY_UNKNOWN", + 1: "CARDINALITY_OPTIONAL", + 2: "CARDINALITY_REQUIRED", + 3: "CARDINALITY_REPEATED", +} + +var Field_Cardinality_value = map[string]int32{ + "CARDINALITY_UNKNOWN": 0, + "CARDINALITY_OPTIONAL": 1, + "CARDINALITY_REQUIRED": 2, + "CARDINALITY_REPEATED": 3, +} + +func (Field_Cardinality) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_dd271cc1e348c538, []int{1, 1} +} + +// A protocol buffer message type. +type Type struct { + // The fully qualified message name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The list of fields. + Fields []*Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"` + // The list of types appearing in `oneof` definitions in this type. + Oneofs []string `protobuf:"bytes,3,rep,name=oneofs,proto3" json:"oneofs,omitempty"` + // The protocol buffer options. + Options []*Option `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"` + // The source context. + SourceContext *SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty"` + // The source syntax. + Syntax Syntax `protobuf:"varint,6,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Type) Reset() { *m = Type{} } +func (*Type) ProtoMessage() {} +func (*Type) Descriptor() ([]byte, []int) { + return fileDescriptor_dd271cc1e348c538, []int{0} +} +func (m *Type) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Type) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Type.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Type) XXX_Merge(src proto.Message) { + xxx_messageInfo_Type.Merge(m, src) +} +func (m *Type) XXX_Size() int { + return m.Size() +} +func (m *Type) XXX_DiscardUnknown() { + xxx_messageInfo_Type.DiscardUnknown(m) +} + +var xxx_messageInfo_Type proto.InternalMessageInfo + +func (m *Type) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Type) GetFields() []*Field { + if m != nil { + return m.Fields + } + return nil +} + +func (m *Type) GetOneofs() []string { + if m != nil { + return m.Oneofs + } + return nil +} + +func (m *Type) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (m *Type) GetSourceContext() *SourceContext { + if m != nil { + return m.SourceContext + } + return nil +} + +func (m *Type) GetSyntax() Syntax { + if m != nil { + return m.Syntax + } + return Syntax_SYNTAX_PROTO2 +} + +func (*Type) XXX_MessageName() string { + return "google.protobuf.Type" +} + +// A single field of a message type. +type Field struct { + // The field type. + Kind Field_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=google.protobuf.Field_Kind" json:"kind,omitempty"` + // The field cardinality. + Cardinality Field_Cardinality `protobuf:"varint,2,opt,name=cardinality,proto3,enum=google.protobuf.Field_Cardinality" json:"cardinality,omitempty"` + // The field number. + Number int32 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` + // The field name. + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + // The field type URL, without the scheme, for message or enumeration + // types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. + TypeUrl string `protobuf:"bytes,6,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` + // The index of the field type in `Type.oneofs`, for message or enumeration + // types. The first type has index 1; zero means the type is not in the list. + OneofIndex int32 `protobuf:"varint,7,opt,name=oneof_index,json=oneofIndex,proto3" json:"oneof_index,omitempty"` + // Whether to use alternative packed wire representation. + Packed bool `protobuf:"varint,8,opt,name=packed,proto3" json:"packed,omitempty"` + // The protocol buffer options. + Options []*Option `protobuf:"bytes,9,rep,name=options,proto3" json:"options,omitempty"` + // The field JSON name. + JsonName string `protobuf:"bytes,10,opt,name=json_name,json=jsonName,proto3" json:"json_name,omitempty"` + // The string value of the default value of this field. Proto2 syntax only. + DefaultValue string `protobuf:"bytes,11,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Field) Reset() { *m = Field{} } +func (*Field) ProtoMessage() {} +func (*Field) Descriptor() ([]byte, []int) { + return fileDescriptor_dd271cc1e348c538, []int{1} +} +func (m *Field) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Field.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Field) XXX_Merge(src proto.Message) { + xxx_messageInfo_Field.Merge(m, src) +} +func (m *Field) XXX_Size() int { + return m.Size() +} +func (m *Field) XXX_DiscardUnknown() { + xxx_messageInfo_Field.DiscardUnknown(m) +} + +var xxx_messageInfo_Field proto.InternalMessageInfo + +func (m *Field) GetKind() Field_Kind { + if m != nil { + return m.Kind + } + return Field_TYPE_UNKNOWN +} + +func (m *Field) GetCardinality() Field_Cardinality { + if m != nil { + return m.Cardinality + } + return Field_CARDINALITY_UNKNOWN +} + +func (m *Field) GetNumber() int32 { + if m != nil { + return m.Number + } + return 0 +} + +func (m *Field) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Field) GetTypeUrl() string { + if m != nil { + return m.TypeUrl + } + return "" +} + +func (m *Field) GetOneofIndex() int32 { + if m != nil { + return m.OneofIndex + } + return 0 +} + +func (m *Field) GetPacked() bool { + if m != nil { + return m.Packed + } + return false +} + +func (m *Field) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (m *Field) GetJsonName() string { + if m != nil { + return m.JsonName + } + return "" +} + +func (m *Field) GetDefaultValue() string { + if m != nil { + return m.DefaultValue + } + return "" +} + +func (*Field) XXX_MessageName() string { + return "google.protobuf.Field" +} + +// Enum type definition. +type Enum struct { + // Enum type name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Enum value definitions. + Enumvalue []*EnumValue `protobuf:"bytes,2,rep,name=enumvalue,proto3" json:"enumvalue,omitempty"` + // Protocol buffer options. + Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"` + // The source context. + SourceContext *SourceContext `protobuf:"bytes,4,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty"` + // The source syntax. + Syntax Syntax `protobuf:"varint,5,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Enum) Reset() { *m = Enum{} } +func (*Enum) ProtoMessage() {} +func (*Enum) Descriptor() ([]byte, []int) { + return fileDescriptor_dd271cc1e348c538, []int{2} +} +func (m *Enum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Enum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Enum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Enum) XXX_Merge(src proto.Message) { + xxx_messageInfo_Enum.Merge(m, src) +} +func (m *Enum) XXX_Size() int { + return m.Size() +} +func (m *Enum) XXX_DiscardUnknown() { + xxx_messageInfo_Enum.DiscardUnknown(m) +} + +var xxx_messageInfo_Enum proto.InternalMessageInfo + +func (m *Enum) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Enum) GetEnumvalue() []*EnumValue { + if m != nil { + return m.Enumvalue + } + return nil +} + +func (m *Enum) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (m *Enum) GetSourceContext() *SourceContext { + if m != nil { + return m.SourceContext + } + return nil +} + +func (m *Enum) GetSyntax() Syntax { + if m != nil { + return m.Syntax + } + return Syntax_SYNTAX_PROTO2 +} + +func (*Enum) XXX_MessageName() string { + return "google.protobuf.Enum" +} + +// Enum value definition. +type EnumValue struct { + // Enum value name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Enum value number. + Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` + // Protocol buffer options. + Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EnumValue) Reset() { *m = EnumValue{} } +func (*EnumValue) ProtoMessage() {} +func (*EnumValue) Descriptor() ([]byte, []int) { + return fileDescriptor_dd271cc1e348c538, []int{3} +} +func (m *EnumValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EnumValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EnumValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EnumValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumValue.Merge(m, src) +} +func (m *EnumValue) XXX_Size() int { + return m.Size() +} +func (m *EnumValue) XXX_DiscardUnknown() { + xxx_messageInfo_EnumValue.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumValue proto.InternalMessageInfo + +func (m *EnumValue) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *EnumValue) GetNumber() int32 { + if m != nil { + return m.Number + } + return 0 +} + +func (m *EnumValue) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (*EnumValue) XXX_MessageName() string { + return "google.protobuf.EnumValue" +} + +// A protocol buffer option, which can be attached to a message, field, +// enumeration, etc. +type Option struct { + // The option's name. For protobuf built-in options (options defined in + // descriptor.proto), this is the short name. For example, `"map_entry"`. + // For custom options, it should be the fully-qualified name. For example, + // `"google.api.http"`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The option's value packed in an Any message. If the value is a primitive, + // the corresponding wrapper type defined in google/protobuf/wrappers.proto + // should be used. If the value is an enum, it should be stored as an int32 + // value using the google.protobuf.Int32Value type. + Value *Any `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Option) Reset() { *m = Option{} } +func (*Option) ProtoMessage() {} +func (*Option) Descriptor() ([]byte, []int) { + return fileDescriptor_dd271cc1e348c538, []int{4} +} +func (m *Option) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Option) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Option.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Option) XXX_Merge(src proto.Message) { + xxx_messageInfo_Option.Merge(m, src) +} +func (m *Option) XXX_Size() int { + return m.Size() +} +func (m *Option) XXX_DiscardUnknown() { + xxx_messageInfo_Option.DiscardUnknown(m) +} + +var xxx_messageInfo_Option proto.InternalMessageInfo + +func (m *Option) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Option) GetValue() *Any { + if m != nil { + return m.Value + } + return nil +} + +func (*Option) XXX_MessageName() string { + return "google.protobuf.Option" +} +func init() { + proto.RegisterEnum("google.protobuf.Syntax", Syntax_name, Syntax_value) + proto.RegisterEnum("google.protobuf.Field_Kind", Field_Kind_name, Field_Kind_value) + proto.RegisterEnum("google.protobuf.Field_Cardinality", Field_Cardinality_name, Field_Cardinality_value) + proto.RegisterType((*Type)(nil), "google.protobuf.Type") + proto.RegisterType((*Field)(nil), "google.protobuf.Field") + proto.RegisterType((*Enum)(nil), "google.protobuf.Enum") + proto.RegisterType((*EnumValue)(nil), "google.protobuf.EnumValue") + proto.RegisterType((*Option)(nil), "google.protobuf.Option") +} + +func init() { proto.RegisterFile("google/protobuf/type.proto", fileDescriptor_dd271cc1e348c538) } + +var fileDescriptor_dd271cc1e348c538 = []byte{ + // 840 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x73, 0xda, 0x46, + 0x14, 0xf6, 0x0a, 0x21, 0xa3, 0x87, 0xc1, 0x9b, 0x4d, 0x26, 0x51, 0x9c, 0x19, 0x95, 0xa1, 0x3d, + 0x30, 0x39, 0xe0, 0x29, 0x78, 0x3c, 0xbd, 0x82, 0x91, 0x29, 0x63, 0x22, 0xa9, 0x8b, 0x68, 0xe2, + 0x5e, 0x18, 0x0c, 0x72, 0x86, 0x44, 0xac, 0x18, 0x24, 0x5a, 0x73, 0xeb, 0x4c, 0xcf, 0xfd, 0x27, + 0x7a, 0xea, 0xf4, 0xdc, 0x3f, 0xc2, 0xc7, 0x1e, 0x7b, 0xac, 0xc9, 0xa5, 0xc7, 0x1c, 0x73, 0x6b, + 0x67, 0x57, 0x20, 0x8b, 0x1f, 0x9d, 0x49, 0xdb, 0x1b, 0xef, 0xfb, 0xbe, 0xf7, 0x73, 0x9f, 0x1e, + 0x70, 0xf4, 0xda, 0xf7, 0x5f, 0x7b, 0xee, 0xf1, 0x64, 0xea, 0x87, 0xfe, 0xd5, 0xec, 0xfa, 0x38, + 0x9c, 0x4f, 0xdc, 0xb2, 0xb0, 0xc8, 0x61, 0xc4, 0x95, 0x57, 0xdc, 0xd1, 0xd3, 0x4d, 0x71, 0x9f, + 0xcd, 0x23, 0xf6, 0xe8, 0xb3, 0x4d, 0x2a, 0xf0, 0x67, 0xd3, 0x81, 0xdb, 0x1b, 0xf8, 0x2c, 0x74, + 0x6f, 0xc2, 0x48, 0x55, 0xfc, 0x51, 0x02, 0xd9, 0x99, 0x4f, 0x5c, 0x42, 0x40, 0x66, 0xfd, 0xb1, + 0xab, 0xa1, 0x02, 0x2a, 0xa9, 0x54, 0xfc, 0x26, 0x65, 0x50, 0xae, 0x47, 0xae, 0x37, 0x0c, 0x34, + 0xa9, 0x90, 0x2a, 0x65, 0x2b, 0x8f, 0xcb, 0x1b, 0xf9, 0xcb, 0xe7, 0x9c, 0xa6, 0x4b, 0x15, 0x79, + 0x0c, 0x8a, 0xcf, 0x5c, 0xff, 0x3a, 0xd0, 0x52, 0x85, 0x54, 0x49, 0xa5, 0x4b, 0x8b, 0x7c, 0x0e, + 0xfb, 0xfe, 0x24, 0x1c, 0xf9, 0x2c, 0xd0, 0x64, 0x11, 0xe8, 0xc9, 0x56, 0x20, 0x4b, 0xf0, 0x74, + 0xa5, 0x23, 0x06, 0xe4, 0xd7, 0xeb, 0xd5, 0xd2, 0x05, 0x54, 0xca, 0x56, 0xf4, 0x2d, 0xcf, 0x8e, + 0x90, 0x9d, 0x45, 0x2a, 0x9a, 0x0b, 0x92, 0x26, 0x39, 0x06, 0x25, 0x98, 0xb3, 0xb0, 0x7f, 0xa3, + 0x29, 0x05, 0x54, 0xca, 0xef, 0x48, 0xdc, 0x11, 0x34, 0x5d, 0xca, 0x8a, 0xbf, 0x2a, 0x90, 0x16, + 0x4d, 0x91, 0x63, 0x90, 0xdf, 0x8e, 0xd8, 0x50, 0x0c, 0x24, 0x5f, 0x79, 0xb6, 0xbb, 0xf5, 0xf2, + 0xc5, 0x88, 0x0d, 0xa9, 0x10, 0x92, 0x06, 0x64, 0x07, 0xfd, 0xe9, 0x70, 0xc4, 0xfa, 0xde, 0x28, + 0x9c, 0x6b, 0x92, 0xf0, 0x2b, 0xfe, 0x83, 0xdf, 0xd9, 0xbd, 0x92, 0x26, 0xdd, 0xf8, 0x0c, 0xd9, + 0x6c, 0x7c, 0xe5, 0x4e, 0xb5, 0x54, 0x01, 0x95, 0xd2, 0x74, 0x69, 0xc5, 0xef, 0x23, 0x27, 0xde, + 0xe7, 0x29, 0x64, 0xf8, 0x72, 0xf4, 0x66, 0x53, 0x4f, 0xf4, 0xa7, 0xd2, 0x7d, 0x6e, 0x77, 0xa7, + 0x1e, 0xf9, 0x04, 0xb2, 0x62, 0xf8, 0xbd, 0x11, 0x1b, 0xba, 0x37, 0xda, 0xbe, 0x88, 0x05, 0x02, + 0x6a, 0x71, 0x84, 0xe7, 0x99, 0xf4, 0x07, 0x6f, 0xdd, 0xa1, 0x96, 0x29, 0xa0, 0x52, 0x86, 0x2e, + 0xad, 0xe4, 0x5b, 0xa9, 0x1f, 0xf9, 0x56, 0xcf, 0x40, 0x7d, 0x13, 0xf8, 0xac, 0x27, 0xea, 0x03, + 0x51, 0x47, 0x86, 0x03, 0x26, 0xaf, 0xf1, 0x53, 0xc8, 0x0d, 0xdd, 0xeb, 0xfe, 0xcc, 0x0b, 0x7b, + 0xdf, 0xf6, 0xbd, 0x99, 0xab, 0x65, 0x85, 0xe0, 0x60, 0x09, 0x7e, 0xcd, 0xb1, 0xe2, 0xad, 0x04, + 0x32, 0x9f, 0x24, 0xc1, 0x70, 0xe0, 0x5c, 0xda, 0x46, 0xaf, 0x6b, 0x5e, 0x98, 0xd6, 0x4b, 0x13, + 0xef, 0x91, 0x43, 0xc8, 0x0a, 0xa4, 0x61, 0x75, 0xeb, 0x6d, 0x03, 0x23, 0x92, 0x07, 0x10, 0xc0, + 0x79, 0xdb, 0xaa, 0x39, 0x58, 0x8a, 0xed, 0x96, 0xe9, 0x9c, 0x9e, 0xe0, 0x54, 0xec, 0xd0, 0x8d, + 0x00, 0x39, 0x29, 0xa8, 0x56, 0x70, 0x3a, 0xce, 0x71, 0xde, 0x7a, 0x65, 0x34, 0x4e, 0x4f, 0xb0, + 0xb2, 0x8e, 0x54, 0x2b, 0x78, 0x9f, 0xe4, 0x40, 0x15, 0x48, 0xdd, 0xb2, 0xda, 0x38, 0x13, 0xc7, + 0xec, 0x38, 0xb4, 0x65, 0x36, 0xb1, 0x1a, 0xc7, 0x6c, 0x52, 0xab, 0x6b, 0x63, 0x88, 0x23, 0xbc, + 0x30, 0x3a, 0x9d, 0x5a, 0xd3, 0xc0, 0xd9, 0x58, 0x51, 0xbf, 0x74, 0x8c, 0x0e, 0x3e, 0x58, 0x2b, + 0xab, 0x5a, 0xc1, 0xb9, 0x38, 0x85, 0x61, 0x76, 0x5f, 0xe0, 0x3c, 0x79, 0x00, 0xb9, 0x28, 0xc5, + 0xaa, 0x88, 0xc3, 0x0d, 0xe8, 0xf4, 0x04, 0xe3, 0xfb, 0x42, 0xa2, 0x28, 0x0f, 0xd6, 0x80, 0xd3, + 0x13, 0x4c, 0x8a, 0x21, 0x64, 0x13, 0xbb, 0x45, 0x9e, 0xc0, 0xc3, 0xb3, 0x1a, 0x6d, 0xb4, 0xcc, + 0x5a, 0xbb, 0xe5, 0x5c, 0x26, 0xe6, 0xaa, 0xc1, 0xa3, 0x24, 0x61, 0xd9, 0x4e, 0xcb, 0x32, 0x6b, + 0x6d, 0x8c, 0x36, 0x19, 0x6a, 0x7c, 0xd5, 0x6d, 0x51, 0xa3, 0x81, 0xa5, 0x6d, 0xc6, 0x36, 0x6a, + 0x8e, 0xd1, 0xc0, 0xa9, 0xe2, 0x5f, 0x08, 0x64, 0x83, 0xcd, 0xc6, 0x3b, 0xcf, 0xc8, 0x17, 0xa0, + 0xba, 0x6c, 0x36, 0x8e, 0x9e, 0x3f, 0xba, 0x24, 0x47, 0x5b, 0x4b, 0xc5, 0xbd, 0xc5, 0x32, 0xd0, + 0x7b, 0x71, 0x72, 0x19, 0x53, 0xff, 0xf9, 0x70, 0xc8, 0xff, 0xef, 0x70, 0xa4, 0x3f, 0xee, 0x70, + 0xbc, 0x01, 0x35, 0x6e, 0x61, 0xe7, 0x14, 0xee, 0x3f, 0x6c, 0x69, 0xed, 0xc3, 0xfe, 0xf7, 0x3d, + 0x16, 0xbf, 0x04, 0x25, 0x82, 0x76, 0x26, 0x7a, 0x0e, 0xe9, 0xd5, 0xa8, 0x79, 0xe3, 0x8f, 0xb6, + 0xc2, 0xd5, 0xd8, 0x9c, 0x46, 0x92, 0xe7, 0x65, 0x50, 0xa2, 0x3e, 0xf8, 0xb2, 0x75, 0x2e, 0x4d, + 0xa7, 0xf6, 0xaa, 0x67, 0x53, 0xcb, 0xb1, 0x2a, 0x78, 0x6f, 0x13, 0xaa, 0x62, 0x54, 0xff, 0x01, + 0xfd, 0x7e, 0xa7, 0xef, 0xbd, 0xbf, 0xd3, 0xd1, 0x87, 0x3b, 0x1d, 0x7d, 0xbf, 0xd0, 0xd1, 0xcf, + 0x0b, 0x1d, 0xdd, 0x2e, 0x74, 0xf4, 0xdb, 0x42, 0x47, 0x7f, 0x2c, 0x74, 0xf4, 0xe7, 0x42, 0xdf, + 0x7b, 0xcf, 0xf1, 0x77, 0x3a, 0xba, 0x7d, 0xa7, 0x23, 0x78, 0x38, 0xf0, 0xc7, 0x9b, 0x25, 0xd4, + 0x55, 0xfe, 0x9f, 0x63, 0x73, 0xcb, 0x46, 0xdf, 0xa4, 0xf9, 0xd1, 0x0a, 0x3e, 0x20, 0xf4, 0x93, + 0x94, 0x6a, 0xda, 0xf5, 0x5f, 0x24, 0xbd, 0x19, 0xc9, 0xed, 0x55, 0xc5, 0x2f, 0x5d, 0xcf, 0xbb, + 0x60, 0xfe, 0x77, 0x8c, 0xbb, 0x05, 0x57, 0x8a, 0x88, 0x53, 0xfd, 0x3b, 0x00, 0x00, 0xff, 0xff, + 0xbc, 0x2a, 0x5e, 0x82, 0x2b, 0x07, 0x00, 0x00, +} + +func (this *Type) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Type) + if !ok { + that2, ok := that.(Type) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if len(this.Fields) != len(that1.Fields) { + if len(this.Fields) < len(that1.Fields) { + return -1 + } + return 1 + } + for i := range this.Fields { + if c := this.Fields[i].Compare(that1.Fields[i]); c != 0 { + return c + } + } + if len(this.Oneofs) != len(that1.Oneofs) { + if len(this.Oneofs) < len(that1.Oneofs) { + return -1 + } + return 1 + } + for i := range this.Oneofs { + if this.Oneofs[i] != that1.Oneofs[i] { + if this.Oneofs[i] < that1.Oneofs[i] { + return -1 + } + return 1 + } + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if c := this.SourceContext.Compare(that1.SourceContext); c != 0 { + return c + } + if this.Syntax != that1.Syntax { + if this.Syntax < that1.Syntax { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Field) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Field) + if !ok { + that2, ok := that.(Field) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Kind != that1.Kind { + if this.Kind < that1.Kind { + return -1 + } + return 1 + } + if this.Cardinality != that1.Cardinality { + if this.Cardinality < that1.Cardinality { + return -1 + } + return 1 + } + if this.Number != that1.Number { + if this.Number < that1.Number { + return -1 + } + return 1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if this.TypeUrl != that1.TypeUrl { + if this.TypeUrl < that1.TypeUrl { + return -1 + } + return 1 + } + if this.OneofIndex != that1.OneofIndex { + if this.OneofIndex < that1.OneofIndex { + return -1 + } + return 1 + } + if this.Packed != that1.Packed { + if !this.Packed { + return -1 + } + return 1 + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if this.JsonName != that1.JsonName { + if this.JsonName < that1.JsonName { + return -1 + } + return 1 + } + if this.DefaultValue != that1.DefaultValue { + if this.DefaultValue < that1.DefaultValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Enum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Enum) + if !ok { + that2, ok := that.(Enum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if len(this.Enumvalue) != len(that1.Enumvalue) { + if len(this.Enumvalue) < len(that1.Enumvalue) { + return -1 + } + return 1 + } + for i := range this.Enumvalue { + if c := this.Enumvalue[i].Compare(that1.Enumvalue[i]); c != 0 { + return c + } + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if c := this.SourceContext.Compare(that1.SourceContext); c != 0 { + return c + } + if this.Syntax != that1.Syntax { + if this.Syntax < that1.Syntax { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *EnumValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*EnumValue) + if !ok { + that2, ok := that.(EnumValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if this.Number != that1.Number { + if this.Number < that1.Number { + return -1 + } + return 1 + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Option) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Option) + if !ok { + that2, ok := that.(Option) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (x Syntax) String() string { + s, ok := Syntax_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Field_Kind) String() string { + s, ok := Field_Kind_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Field_Cardinality) String() string { + s, ok := Field_Cardinality_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Type) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Type) + if !ok { + that2, ok := that.(Type) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if len(this.Fields) != len(that1.Fields) { + return false + } + for i := range this.Fields { + if !this.Fields[i].Equal(that1.Fields[i]) { + return false + } + } + if len(this.Oneofs) != len(that1.Oneofs) { + return false + } + for i := range this.Oneofs { + if this.Oneofs[i] != that1.Oneofs[i] { + return false + } + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if !this.SourceContext.Equal(that1.SourceContext) { + return false + } + if this.Syntax != that1.Syntax { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Field) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Field) + if !ok { + that2, ok := that.(Field) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Kind != that1.Kind { + return false + } + if this.Cardinality != that1.Cardinality { + return false + } + if this.Number != that1.Number { + return false + } + if this.Name != that1.Name { + return false + } + if this.TypeUrl != that1.TypeUrl { + return false + } + if this.OneofIndex != that1.OneofIndex { + return false + } + if this.Packed != that1.Packed { + return false + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if this.JsonName != that1.JsonName { + return false + } + if this.DefaultValue != that1.DefaultValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Enum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Enum) + if !ok { + that2, ok := that.(Enum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if len(this.Enumvalue) != len(that1.Enumvalue) { + return false + } + for i := range this.Enumvalue { + if !this.Enumvalue[i].Equal(that1.Enumvalue[i]) { + return false + } + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if !this.SourceContext.Equal(that1.SourceContext) { + return false + } + if this.Syntax != that1.Syntax { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *EnumValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*EnumValue) + if !ok { + that2, ok := that.(EnumValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Number != that1.Number { + return false + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Option) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Option) + if !ok { + that2, ok := that.(Option) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if !this.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Type) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&types.Type{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Fields != nil { + s = append(s, "Fields: "+fmt.Sprintf("%#v", this.Fields)+",\n") + } + s = append(s, "Oneofs: "+fmt.Sprintf("%#v", this.Oneofs)+",\n") + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.SourceContext != nil { + s = append(s, "SourceContext: "+fmt.Sprintf("%#v", this.SourceContext)+",\n") + } + s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Field) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&types.Field{") + s = append(s, "Kind: "+fmt.Sprintf("%#v", this.Kind)+",\n") + s = append(s, "Cardinality: "+fmt.Sprintf("%#v", this.Cardinality)+",\n") + s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "TypeUrl: "+fmt.Sprintf("%#v", this.TypeUrl)+",\n") + s = append(s, "OneofIndex: "+fmt.Sprintf("%#v", this.OneofIndex)+",\n") + s = append(s, "Packed: "+fmt.Sprintf("%#v", this.Packed)+",\n") + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + s = append(s, "JsonName: "+fmt.Sprintf("%#v", this.JsonName)+",\n") + s = append(s, "DefaultValue: "+fmt.Sprintf("%#v", this.DefaultValue)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Enum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&types.Enum{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Enumvalue != nil { + s = append(s, "Enumvalue: "+fmt.Sprintf("%#v", this.Enumvalue)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.SourceContext != nil { + s = append(s, "SourceContext: "+fmt.Sprintf("%#v", this.SourceContext)+",\n") + } + s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *EnumValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&types.EnumValue{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n") + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Option) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&types.Option{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringType(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Type) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Type) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Type) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Syntax != 0 { + i = encodeVarintType(dAtA, i, uint64(m.Syntax)) + i-- + dAtA[i] = 0x30 + } + if m.SourceContext != nil { + { + size, err := m.SourceContext.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintType(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.Options) > 0 { + for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Options[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintType(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Oneofs) > 0 { + for iNdEx := len(m.Oneofs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Oneofs[iNdEx]) + copy(dAtA[i:], m.Oneofs[iNdEx]) + i = encodeVarintType(dAtA, i, uint64(len(m.Oneofs[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Fields) > 0 { + for iNdEx := len(m.Fields) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Fields[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintType(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintType(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Field) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Field) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Field) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.DefaultValue) > 0 { + i -= len(m.DefaultValue) + copy(dAtA[i:], m.DefaultValue) + i = encodeVarintType(dAtA, i, uint64(len(m.DefaultValue))) + i-- + dAtA[i] = 0x5a + } + if len(m.JsonName) > 0 { + i -= len(m.JsonName) + copy(dAtA[i:], m.JsonName) + i = encodeVarintType(dAtA, i, uint64(len(m.JsonName))) + i-- + dAtA[i] = 0x52 + } + if len(m.Options) > 0 { + for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Options[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintType(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if m.Packed { + i-- + if m.Packed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if m.OneofIndex != 0 { + i = encodeVarintType(dAtA, i, uint64(m.OneofIndex)) + i-- + dAtA[i] = 0x38 + } + if len(m.TypeUrl) > 0 { + i -= len(m.TypeUrl) + copy(dAtA[i:], m.TypeUrl) + i = encodeVarintType(dAtA, i, uint64(len(m.TypeUrl))) + i-- + dAtA[i] = 0x32 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintType(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x22 + } + if m.Number != 0 { + i = encodeVarintType(dAtA, i, uint64(m.Number)) + i-- + dAtA[i] = 0x18 + } + if m.Cardinality != 0 { + i = encodeVarintType(dAtA, i, uint64(m.Cardinality)) + i-- + dAtA[i] = 0x10 + } + if m.Kind != 0 { + i = encodeVarintType(dAtA, i, uint64(m.Kind)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Enum) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Enum) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Enum) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Syntax != 0 { + i = encodeVarintType(dAtA, i, uint64(m.Syntax)) + i-- + dAtA[i] = 0x28 + } + if m.SourceContext != nil { + { + size, err := m.SourceContext.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintType(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.Options) > 0 { + for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Options[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintType(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Enumvalue) > 0 { + for iNdEx := len(m.Enumvalue) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Enumvalue[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintType(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintType(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EnumValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EnumValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EnumValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Options) > 0 { + for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Options[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintType(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.Number != 0 { + i = encodeVarintType(dAtA, i, uint64(m.Number)) + i-- + dAtA[i] = 0x10 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintType(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Option) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Option) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Option) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Value != nil { + { + size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintType(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintType(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintType(dAtA []byte, offset int, v uint64) int { + offset -= sovType(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func NewPopulatedType(r randyType, easy bool) *Type { + this := &Type{} + this.Name = string(randStringType(r)) + if r.Intn(5) != 0 { + v1 := r.Intn(5) + this.Fields = make([]*Field, v1) + for i := 0; i < v1; i++ { + this.Fields[i] = NewPopulatedField(r, easy) + } + } + v2 := r.Intn(10) + this.Oneofs = make([]string, v2) + for i := 0; i < v2; i++ { + this.Oneofs[i] = string(randStringType(r)) + } + if r.Intn(5) != 0 { + v3 := r.Intn(5) + this.Options = make([]*Option, v3) + for i := 0; i < v3; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + if r.Intn(5) != 0 { + this.SourceContext = NewPopulatedSourceContext(r, easy) + } + this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedType(r, 7) + } + return this +} + +func NewPopulatedField(r randyType, easy bool) *Field { + this := &Field{} + this.Kind = Field_Kind([]int32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18}[r.Intn(19)]) + this.Cardinality = Field_Cardinality([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.Number = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Number *= -1 + } + this.Name = string(randStringType(r)) + this.TypeUrl = string(randStringType(r)) + this.OneofIndex = int32(r.Int31()) + if r.Intn(2) == 0 { + this.OneofIndex *= -1 + } + this.Packed = bool(bool(r.Intn(2) == 0)) + if r.Intn(5) != 0 { + v4 := r.Intn(5) + this.Options = make([]*Option, v4) + for i := 0; i < v4; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + this.JsonName = string(randStringType(r)) + this.DefaultValue = string(randStringType(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedType(r, 12) + } + return this +} + +func NewPopulatedEnum(r randyType, easy bool) *Enum { + this := &Enum{} + this.Name = string(randStringType(r)) + if r.Intn(5) != 0 { + v5 := r.Intn(5) + this.Enumvalue = make([]*EnumValue, v5) + for i := 0; i < v5; i++ { + this.Enumvalue[i] = NewPopulatedEnumValue(r, easy) + } + } + if r.Intn(5) != 0 { + v6 := r.Intn(5) + this.Options = make([]*Option, v6) + for i := 0; i < v6; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + if r.Intn(5) != 0 { + this.SourceContext = NewPopulatedSourceContext(r, easy) + } + this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedType(r, 6) + } + return this +} + +func NewPopulatedEnumValue(r randyType, easy bool) *EnumValue { + this := &EnumValue{} + this.Name = string(randStringType(r)) + this.Number = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Number *= -1 + } + if r.Intn(5) != 0 { + v7 := r.Intn(5) + this.Options = make([]*Option, v7) + for i := 0; i < v7; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedType(r, 4) + } + return this +} + +func NewPopulatedOption(r randyType, easy bool) *Option { + this := &Option{} + this.Name = string(randStringType(r)) + if r.Intn(5) != 0 { + this.Value = NewPopulatedAny(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedType(r, 3) + } + return this +} + +type randyType interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneType(r randyType) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringType(r randyType) string { + v8 := r.Intn(100) + tmps := make([]rune, v8) + for i := 0; i < v8; i++ { + tmps[i] = randUTF8RuneType(r) + } + return string(tmps) +} +func randUnrecognizedType(r randyType, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldType(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldType(dAtA []byte, r randyType, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateType(dAtA, uint64(key)) + v9 := r.Int63() + if r.Intn(2) == 0 { + v9 *= -1 + } + dAtA = encodeVarintPopulateType(dAtA, uint64(v9)) + case 1: + dAtA = encodeVarintPopulateType(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateType(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateType(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateType(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateType(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Type) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if len(m.Fields) > 0 { + for _, e := range m.Fields { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + if len(m.Oneofs) > 0 { + for _, s := range m.Oneofs { + l = len(s) + n += 1 + l + sovType(uint64(l)) + } + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + if m.SourceContext != nil { + l = m.SourceContext.Size() + n += 1 + l + sovType(uint64(l)) + } + if m.Syntax != 0 { + n += 1 + sovType(uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Field) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Kind != 0 { + n += 1 + sovType(uint64(m.Kind)) + } + if m.Cardinality != 0 { + n += 1 + sovType(uint64(m.Cardinality)) + } + if m.Number != 0 { + n += 1 + sovType(uint64(m.Number)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + l = len(m.TypeUrl) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if m.OneofIndex != 0 { + n += 1 + sovType(uint64(m.OneofIndex)) + } + if m.Packed { + n += 2 + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + l = len(m.JsonName) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + l = len(m.DefaultValue) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Enum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if len(m.Enumvalue) > 0 { + for _, e := range m.Enumvalue { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + if m.SourceContext != nil { + l = m.SourceContext.Size() + n += 1 + l + sovType(uint64(l)) + } + if m.Syntax != 0 { + n += 1 + sovType(uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *EnumValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if m.Number != 0 { + n += 1 + sovType(uint64(m.Number)) + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Option) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovType(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovType(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozType(x uint64) (n int) { + return sovType(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Type) String() string { + if this == nil { + return "nil" + } + repeatedStringForFields := "[]*Field{" + for _, f := range this.Fields { + repeatedStringForFields += strings.Replace(f.String(), "Field", "Field", 1) + "," + } + repeatedStringForFields += "}" + repeatedStringForOptions := "[]*Option{" + for _, f := range this.Options { + repeatedStringForOptions += strings.Replace(f.String(), "Option", "Option", 1) + "," + } + repeatedStringForOptions += "}" + s := strings.Join([]string{`&Type{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Fields:` + repeatedStringForFields + `,`, + `Oneofs:` + fmt.Sprintf("%v", this.Oneofs) + `,`, + `Options:` + repeatedStringForOptions + `,`, + `SourceContext:` + strings.Replace(fmt.Sprintf("%v", this.SourceContext), "SourceContext", "SourceContext", 1) + `,`, + `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Field) String() string { + if this == nil { + return "nil" + } + repeatedStringForOptions := "[]*Option{" + for _, f := range this.Options { + repeatedStringForOptions += strings.Replace(f.String(), "Option", "Option", 1) + "," + } + repeatedStringForOptions += "}" + s := strings.Join([]string{`&Field{`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Cardinality:` + fmt.Sprintf("%v", this.Cardinality) + `,`, + `Number:` + fmt.Sprintf("%v", this.Number) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `TypeUrl:` + fmt.Sprintf("%v", this.TypeUrl) + `,`, + `OneofIndex:` + fmt.Sprintf("%v", this.OneofIndex) + `,`, + `Packed:` + fmt.Sprintf("%v", this.Packed) + `,`, + `Options:` + repeatedStringForOptions + `,`, + `JsonName:` + fmt.Sprintf("%v", this.JsonName) + `,`, + `DefaultValue:` + fmt.Sprintf("%v", this.DefaultValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Enum) String() string { + if this == nil { + return "nil" + } + repeatedStringForEnumvalue := "[]*EnumValue{" + for _, f := range this.Enumvalue { + repeatedStringForEnumvalue += strings.Replace(f.String(), "EnumValue", "EnumValue", 1) + "," + } + repeatedStringForEnumvalue += "}" + repeatedStringForOptions := "[]*Option{" + for _, f := range this.Options { + repeatedStringForOptions += strings.Replace(f.String(), "Option", "Option", 1) + "," + } + repeatedStringForOptions += "}" + s := strings.Join([]string{`&Enum{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Enumvalue:` + repeatedStringForEnumvalue + `,`, + `Options:` + repeatedStringForOptions + `,`, + `SourceContext:` + strings.Replace(fmt.Sprintf("%v", this.SourceContext), "SourceContext", "SourceContext", 1) + `,`, + `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *EnumValue) String() string { + if this == nil { + return "nil" + } + repeatedStringForOptions := "[]*Option{" + for _, f := range this.Options { + repeatedStringForOptions += strings.Replace(f.String(), "Option", "Option", 1) + "," + } + repeatedStringForOptions += "}" + s := strings.Join([]string{`&EnumValue{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Number:` + fmt.Sprintf("%v", this.Number) + `,`, + `Options:` + repeatedStringForOptions + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Option) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Option{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Value:` + strings.Replace(fmt.Sprintf("%v", this.Value), "Any", "Any", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringType(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Type) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Type: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Type: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Fields = append(m.Fields, &Field{}) + if err := m.Fields[len(m.Fields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Oneofs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Oneofs = append(m.Oneofs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceContext", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SourceContext == nil { + m.SourceContext = &SourceContext{} + } + if err := m.SourceContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType) + } + m.Syntax = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Syntax |= Syntax(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipType(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Field) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Field: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Field: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + m.Kind = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Kind |= Field_Kind(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Cardinality", wireType) + } + m.Cardinality = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Cardinality |= Field_Cardinality(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OneofIndex", wireType) + } + m.OneofIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OneofIndex |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Packed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Packed = bool(v != 0) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JsonName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JsonName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DefaultValue = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipType(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Enum) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Enum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Enum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Enumvalue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Enumvalue = append(m.Enumvalue, &EnumValue{}) + if err := m.Enumvalue[len(m.Enumvalue)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceContext", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SourceContext == nil { + m.SourceContext = &SourceContext{} + } + if err := m.SourceContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType) + } + m.Syntax = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Syntax |= Syntax(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipType(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EnumValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EnumValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EnumValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipType(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Option) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Option: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Option: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthType + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Value == nil { + m.Value = &Any{} + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipType(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipType(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowType + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowType + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowType + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthType + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupType + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthType + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthType = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowType = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupType = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/github.com/gogo/protobuf/types/wrappers.pb.go b/vendor/github.com/gogo/protobuf/types/wrappers.pb.go new file mode 100644 index 00000000..8f1edb57 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/wrappers.pb.go @@ -0,0 +1,2730 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/wrappers.proto + +package types + +import ( + bytes "bytes" + encoding_binary "encoding/binary" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Wrapper message for `double`. +// +// The JSON representation for `DoubleValue` is JSON number. +type DoubleValue struct { + // The double value. + Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DoubleValue) Reset() { *m = DoubleValue{} } +func (*DoubleValue) ProtoMessage() {} +func (*DoubleValue) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{0} +} +func (*DoubleValue) XXX_WellKnownType() string { return "DoubleValue" } +func (m *DoubleValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DoubleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DoubleValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DoubleValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_DoubleValue.Merge(m, src) +} +func (m *DoubleValue) XXX_Size() int { + return m.Size() +} +func (m *DoubleValue) XXX_DiscardUnknown() { + xxx_messageInfo_DoubleValue.DiscardUnknown(m) +} + +var xxx_messageInfo_DoubleValue proto.InternalMessageInfo + +func (m *DoubleValue) GetValue() float64 { + if m != nil { + return m.Value + } + return 0 +} + +func (*DoubleValue) XXX_MessageName() string { + return "google.protobuf.DoubleValue" +} + +// Wrapper message for `float`. +// +// The JSON representation for `FloatValue` is JSON number. +type FloatValue struct { + // The float value. + Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatValue) Reset() { *m = FloatValue{} } +func (*FloatValue) ProtoMessage() {} +func (*FloatValue) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{1} +} +func (*FloatValue) XXX_WellKnownType() string { return "FloatValue" } +func (m *FloatValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FloatValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FloatValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FloatValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatValue.Merge(m, src) +} +func (m *FloatValue) XXX_Size() int { + return m.Size() +} +func (m *FloatValue) XXX_DiscardUnknown() { + xxx_messageInfo_FloatValue.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatValue proto.InternalMessageInfo + +func (m *FloatValue) GetValue() float32 { + if m != nil { + return m.Value + } + return 0 +} + +func (*FloatValue) XXX_MessageName() string { + return "google.protobuf.FloatValue" +} + +// Wrapper message for `int64`. +// +// The JSON representation for `Int64Value` is JSON string. +type Int64Value struct { + // The int64 value. + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Int64Value) Reset() { *m = Int64Value{} } +func (*Int64Value) ProtoMessage() {} +func (*Int64Value) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{2} +} +func (*Int64Value) XXX_WellKnownType() string { return "Int64Value" } +func (m *Int64Value) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Int64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Int64Value.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Int64Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_Int64Value.Merge(m, src) +} +func (m *Int64Value) XXX_Size() int { + return m.Size() +} +func (m *Int64Value) XXX_DiscardUnknown() { + xxx_messageInfo_Int64Value.DiscardUnknown(m) +} + +var xxx_messageInfo_Int64Value proto.InternalMessageInfo + +func (m *Int64Value) GetValue() int64 { + if m != nil { + return m.Value + } + return 0 +} + +func (*Int64Value) XXX_MessageName() string { + return "google.protobuf.Int64Value" +} + +// Wrapper message for `uint64`. +// +// The JSON representation for `UInt64Value` is JSON string. +type UInt64Value struct { + // The uint64 value. + Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UInt64Value) Reset() { *m = UInt64Value{} } +func (*UInt64Value) ProtoMessage() {} +func (*UInt64Value) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{3} +} +func (*UInt64Value) XXX_WellKnownType() string { return "UInt64Value" } +func (m *UInt64Value) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UInt64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UInt64Value.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UInt64Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_UInt64Value.Merge(m, src) +} +func (m *UInt64Value) XXX_Size() int { + return m.Size() +} +func (m *UInt64Value) XXX_DiscardUnknown() { + xxx_messageInfo_UInt64Value.DiscardUnknown(m) +} + +var xxx_messageInfo_UInt64Value proto.InternalMessageInfo + +func (m *UInt64Value) GetValue() uint64 { + if m != nil { + return m.Value + } + return 0 +} + +func (*UInt64Value) XXX_MessageName() string { + return "google.protobuf.UInt64Value" +} + +// Wrapper message for `int32`. +// +// The JSON representation for `Int32Value` is JSON number. +type Int32Value struct { + // The int32 value. + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Int32Value) Reset() { *m = Int32Value{} } +func (*Int32Value) ProtoMessage() {} +func (*Int32Value) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{4} +} +func (*Int32Value) XXX_WellKnownType() string { return "Int32Value" } +func (m *Int32Value) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Int32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Int32Value.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Int32Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_Int32Value.Merge(m, src) +} +func (m *Int32Value) XXX_Size() int { + return m.Size() +} +func (m *Int32Value) XXX_DiscardUnknown() { + xxx_messageInfo_Int32Value.DiscardUnknown(m) +} + +var xxx_messageInfo_Int32Value proto.InternalMessageInfo + +func (m *Int32Value) GetValue() int32 { + if m != nil { + return m.Value + } + return 0 +} + +func (*Int32Value) XXX_MessageName() string { + return "google.protobuf.Int32Value" +} + +// Wrapper message for `uint32`. +// +// The JSON representation for `UInt32Value` is JSON number. +type UInt32Value struct { + // The uint32 value. + Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UInt32Value) Reset() { *m = UInt32Value{} } +func (*UInt32Value) ProtoMessage() {} +func (*UInt32Value) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{5} +} +func (*UInt32Value) XXX_WellKnownType() string { return "UInt32Value" } +func (m *UInt32Value) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UInt32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UInt32Value.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UInt32Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_UInt32Value.Merge(m, src) +} +func (m *UInt32Value) XXX_Size() int { + return m.Size() +} +func (m *UInt32Value) XXX_DiscardUnknown() { + xxx_messageInfo_UInt32Value.DiscardUnknown(m) +} + +var xxx_messageInfo_UInt32Value proto.InternalMessageInfo + +func (m *UInt32Value) GetValue() uint32 { + if m != nil { + return m.Value + } + return 0 +} + +func (*UInt32Value) XXX_MessageName() string { + return "google.protobuf.UInt32Value" +} + +// Wrapper message for `bool`. +// +// The JSON representation for `BoolValue` is JSON `true` and `false`. +type BoolValue struct { + // The bool value. + Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BoolValue) Reset() { *m = BoolValue{} } +func (*BoolValue) ProtoMessage() {} +func (*BoolValue) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{6} +} +func (*BoolValue) XXX_WellKnownType() string { return "BoolValue" } +func (m *BoolValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BoolValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BoolValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BoolValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_BoolValue.Merge(m, src) +} +func (m *BoolValue) XXX_Size() int { + return m.Size() +} +func (m *BoolValue) XXX_DiscardUnknown() { + xxx_messageInfo_BoolValue.DiscardUnknown(m) +} + +var xxx_messageInfo_BoolValue proto.InternalMessageInfo + +func (m *BoolValue) GetValue() bool { + if m != nil { + return m.Value + } + return false +} + +func (*BoolValue) XXX_MessageName() string { + return "google.protobuf.BoolValue" +} + +// Wrapper message for `string`. +// +// The JSON representation for `StringValue` is JSON string. +type StringValue struct { + // The string value. + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StringValue) Reset() { *m = StringValue{} } +func (*StringValue) ProtoMessage() {} +func (*StringValue) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{7} +} +func (*StringValue) XXX_WellKnownType() string { return "StringValue" } +func (m *StringValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StringValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *StringValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_StringValue.Merge(m, src) +} +func (m *StringValue) XXX_Size() int { + return m.Size() +} +func (m *StringValue) XXX_DiscardUnknown() { + xxx_messageInfo_StringValue.DiscardUnknown(m) +} + +var xxx_messageInfo_StringValue proto.InternalMessageInfo + +func (m *StringValue) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +func (*StringValue) XXX_MessageName() string { + return "google.protobuf.StringValue" +} + +// Wrapper message for `bytes`. +// +// The JSON representation for `BytesValue` is JSON string. +type BytesValue struct { + // The bytes value. + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BytesValue) Reset() { *m = BytesValue{} } +func (*BytesValue) ProtoMessage() {} +func (*BytesValue) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{8} +} +func (*BytesValue) XXX_WellKnownType() string { return "BytesValue" } +func (m *BytesValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BytesValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BytesValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BytesValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_BytesValue.Merge(m, src) +} +func (m *BytesValue) XXX_Size() int { + return m.Size() +} +func (m *BytesValue) XXX_DiscardUnknown() { + xxx_messageInfo_BytesValue.DiscardUnknown(m) +} + +var xxx_messageInfo_BytesValue proto.InternalMessageInfo + +func (m *BytesValue) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (*BytesValue) XXX_MessageName() string { + return "google.protobuf.BytesValue" +} +func init() { + proto.RegisterType((*DoubleValue)(nil), "google.protobuf.DoubleValue") + proto.RegisterType((*FloatValue)(nil), "google.protobuf.FloatValue") + proto.RegisterType((*Int64Value)(nil), "google.protobuf.Int64Value") + proto.RegisterType((*UInt64Value)(nil), "google.protobuf.UInt64Value") + proto.RegisterType((*Int32Value)(nil), "google.protobuf.Int32Value") + proto.RegisterType((*UInt32Value)(nil), "google.protobuf.UInt32Value") + proto.RegisterType((*BoolValue)(nil), "google.protobuf.BoolValue") + proto.RegisterType((*StringValue)(nil), "google.protobuf.StringValue") + proto.RegisterType((*BytesValue)(nil), "google.protobuf.BytesValue") +} + +func init() { proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor_5377b62bda767935) } + +var fileDescriptor_5377b62bda767935 = []byte{ + // 285 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x2f, 0x4a, 0x2c, + 0x28, 0x48, 0x2d, 0x2a, 0xd6, 0x03, 0x8b, 0x08, 0xf1, 0x43, 0xe4, 0xf5, 0x60, 0xf2, 0x4a, 0xca, + 0x5c, 0xdc, 0x2e, 0xf9, 0xa5, 0x49, 0x39, 0xa9, 0x61, 0x89, 0x39, 0xa5, 0xa9, 0x42, 0x22, 0x5c, + 0xac, 0x65, 0x20, 0x86, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x63, 0x10, 0x84, 0xa3, 0xa4, 0xc4, 0xc5, + 0xe5, 0x96, 0x93, 0x9f, 0x58, 0x82, 0x45, 0x0d, 0x13, 0x92, 0x1a, 0xcf, 0xbc, 0x12, 0x33, 0x13, + 0x2c, 0x6a, 0x98, 0x61, 0x6a, 0x94, 0xb9, 0xb8, 0x43, 0x71, 0x29, 0x62, 0x41, 0x35, 0xc8, 0xd8, + 0x08, 0x8b, 0x1a, 0x56, 0x34, 0x83, 0xb0, 0x2a, 0xe2, 0x85, 0x29, 0x52, 0xe4, 0xe2, 0x74, 0xca, + 0xcf, 0xcf, 0xc1, 0xa2, 0x84, 0x03, 0xc9, 0x9c, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0x74, 0x2c, 0x8a, + 0x38, 0x91, 0x1c, 0xe4, 0x54, 0x59, 0x92, 0x5a, 0x8c, 0x45, 0x0d, 0x0f, 0x54, 0x8d, 0x53, 0x3b, + 0xe3, 0x8d, 0x87, 0x72, 0x0c, 0x1f, 0x1e, 0xca, 0x31, 0xfe, 0x78, 0x28, 0xc7, 0xd8, 0xf0, 0x48, + 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, + 0x48, 0x8e, 0xf1, 0xc5, 0x23, 0x39, 0x86, 0x0f, 0x20, 0xf1, 0xc7, 0x72, 0x8c, 0x27, 0x1e, 0xcb, + 0x31, 0x72, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, 0x45, 0x87, 0x13, 0x6f, 0x38, 0x34, 0xbe, 0x02, + 0x40, 0x22, 0x01, 0x8c, 0x51, 0xac, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x3f, 0x18, 0x19, 0x17, 0x31, + 0x31, 0xbb, 0x07, 0x38, 0xad, 0x62, 0x92, 0x73, 0x87, 0x68, 0x09, 0x80, 0x6a, 0xd1, 0x0b, 0x4f, + 0xcd, 0xc9, 0xf1, 0xce, 0xcb, 0x2f, 0xcf, 0x0b, 0x01, 0xa9, 0x4c, 0x62, 0x03, 0x9b, 0x65, 0x0c, + 0x08, 0x00, 0x00, 0xff, 0xff, 0x31, 0x55, 0x64, 0x90, 0x0a, 0x02, 0x00, 0x00, +} + +func (this *DoubleValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DoubleValue) + if !ok { + that2, ok := that.(DoubleValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *FloatValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*FloatValue) + if !ok { + that2, ok := that.(FloatValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Int64Value) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Int64Value) + if !ok { + that2, ok := that.(Int64Value) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UInt64Value) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UInt64Value) + if !ok { + that2, ok := that.(UInt64Value) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Int32Value) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Int32Value) + if !ok { + that2, ok := that.(Int32Value) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UInt32Value) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UInt32Value) + if !ok { + that2, ok := that.(UInt32Value) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *BoolValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*BoolValue) + if !ok { + that2, ok := that.(BoolValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if !this.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *StringValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*StringValue) + if !ok { + that2, ok := that.(StringValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *BytesValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*BytesValue) + if !ok { + that2, ok := that.(BytesValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.Value, that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DoubleValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DoubleValue) + if !ok { + that2, ok := that.(DoubleValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FloatValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatValue) + if !ok { + that2, ok := that.(FloatValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Int64Value) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Int64Value) + if !ok { + that2, ok := that.(Int64Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UInt64Value) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UInt64Value) + if !ok { + that2, ok := that.(UInt64Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Int32Value) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Int32Value) + if !ok { + that2, ok := that.(Int32Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UInt32Value) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UInt32Value) + if !ok { + that2, ok := that.(UInt32Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *BoolValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*BoolValue) + if !ok { + that2, ok := that.(BoolValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *StringValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*StringValue) + if !ok { + that2, ok := that.(StringValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *BytesValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*BytesValue) + if !ok { + that2, ok := that.(BytesValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Value, that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DoubleValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.DoubleValue{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FloatValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.FloatValue{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Int64Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.Int64Value{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UInt64Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.UInt64Value{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Int32Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.Int32Value{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UInt32Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.UInt32Value{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *BoolValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.BoolValue{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *StringValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.StringValue{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *BytesValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.BytesValue{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringWrappers(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *DoubleValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DoubleValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DoubleValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Value != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil +} + +func (m *FloatValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FloatValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FloatValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Value != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Value)))) + i-- + dAtA[i] = 0xd + } + return len(dAtA) - i, nil +} + +func (m *Int64Value) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Int64Value) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Int64Value) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Value != 0 { + i = encodeVarintWrappers(dAtA, i, uint64(m.Value)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *UInt64Value) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UInt64Value) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UInt64Value) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Value != 0 { + i = encodeVarintWrappers(dAtA, i, uint64(m.Value)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Int32Value) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Int32Value) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Int32Value) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Value != 0 { + i = encodeVarintWrappers(dAtA, i, uint64(m.Value)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *UInt32Value) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UInt32Value) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UInt32Value) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Value != 0 { + i = encodeVarintWrappers(dAtA, i, uint64(m.Value)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *BoolValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BoolValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BoolValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Value { + i-- + if m.Value { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *StringValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StringValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StringValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintWrappers(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BytesValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BytesValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BytesValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintWrappers(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintWrappers(dAtA []byte, offset int, v uint64) int { + offset -= sovWrappers(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func NewPopulatedDoubleValue(r randyWrappers, easy bool) *DoubleValue { + this := &DoubleValue{} + this.Value = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedFloatValue(r randyWrappers, easy bool) *FloatValue { + this := &FloatValue{} + this.Value = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedInt64Value(r randyWrappers, easy bool) *Int64Value { + this := &Int64Value{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedUInt64Value(r randyWrappers, easy bool) *UInt64Value { + this := &UInt64Value{} + this.Value = uint64(uint64(r.Uint32())) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedInt32Value(r randyWrappers, easy bool) *Int32Value { + this := &Int32Value{} + this.Value = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedUInt32Value(r randyWrappers, easy bool) *UInt32Value { + this := &UInt32Value{} + this.Value = uint32(r.Uint32()) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedBoolValue(r randyWrappers, easy bool) *BoolValue { + this := &BoolValue{} + this.Value = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedStringValue(r randyWrappers, easy bool) *StringValue { + this := &StringValue{} + this.Value = string(randStringWrappers(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedBytesValue(r randyWrappers, easy bool) *BytesValue { + this := &BytesValue{} + v1 := r.Intn(100) + this.Value = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Value[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +type randyWrappers interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneWrappers(r randyWrappers) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringWrappers(r randyWrappers) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneWrappers(r) + } + return string(tmps) +} +func randUnrecognizedWrappers(r randyWrappers, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldWrappers(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldWrappers(dAtA []byte, r randyWrappers, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateWrappers(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *DoubleValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FloatValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 5 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Int64Value) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 1 + sovWrappers(uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UInt64Value) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 1 + sovWrappers(uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Int32Value) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 1 + sovWrappers(uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UInt32Value) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 1 + sovWrappers(uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BoolValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value { + n += 2 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StringValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Value) + if l > 0 { + n += 1 + l + sovWrappers(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BytesValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Value) + if l > 0 { + n += 1 + l + sovWrappers(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovWrappers(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozWrappers(x uint64) (n int) { + return sovWrappers(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *DoubleValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DoubleValue{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FloatValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatValue{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Int64Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Int64Value{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UInt64Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UInt64Value{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Int32Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Int32Value{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UInt32Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UInt32Value{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *BoolValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&BoolValue{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *StringValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StringValue{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *BytesValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&BytesValue{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringWrappers(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *DoubleValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DoubleValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DoubleValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Value = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FloatValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FloatValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Value = float32(math.Float32frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Int64Value) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Int64Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Int64Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UInt64Value) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UInt64Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UInt64Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Int32Value) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Int32Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Int32Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UInt32Value) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UInt32Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UInt32Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BoolValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BoolValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BoolValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Value = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StringValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StringValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StringValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthWrappers + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthWrappers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BytesValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BytesValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BytesValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthWrappers + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthWrappers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipWrappers(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWrappers + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWrappers + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWrappers + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthWrappers + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupWrappers + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthWrappers + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthWrappers = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowWrappers = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupWrappers = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/github.com/gogo/protobuf/types/wrappers_gogo.go b/vendor/github.com/gogo/protobuf/types/wrappers_gogo.go new file mode 100644 index 00000000..d905df36 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/wrappers_gogo.go @@ -0,0 +1,300 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +func NewPopulatedStdDouble(r randyWrappers, easy bool) *float64 { + v := NewPopulatedDoubleValue(r, easy) + return &v.Value +} + +func SizeOfStdDouble(v float64) int { + pv := &DoubleValue{Value: v} + return pv.Size() +} + +func StdDoubleMarshal(v float64) ([]byte, error) { + size := SizeOfStdDouble(v) + buf := make([]byte, size) + _, err := StdDoubleMarshalTo(v, buf) + return buf, err +} + +func StdDoubleMarshalTo(v float64, data []byte) (int, error) { + pv := &DoubleValue{Value: v} + return pv.MarshalTo(data) +} + +func StdDoubleUnmarshal(v *float64, data []byte) error { + pv := &DoubleValue{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} +func NewPopulatedStdFloat(r randyWrappers, easy bool) *float32 { + v := NewPopulatedFloatValue(r, easy) + return &v.Value +} + +func SizeOfStdFloat(v float32) int { + pv := &FloatValue{Value: v} + return pv.Size() +} + +func StdFloatMarshal(v float32) ([]byte, error) { + size := SizeOfStdFloat(v) + buf := make([]byte, size) + _, err := StdFloatMarshalTo(v, buf) + return buf, err +} + +func StdFloatMarshalTo(v float32, data []byte) (int, error) { + pv := &FloatValue{Value: v} + return pv.MarshalTo(data) +} + +func StdFloatUnmarshal(v *float32, data []byte) error { + pv := &FloatValue{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} +func NewPopulatedStdInt64(r randyWrappers, easy bool) *int64 { + v := NewPopulatedInt64Value(r, easy) + return &v.Value +} + +func SizeOfStdInt64(v int64) int { + pv := &Int64Value{Value: v} + return pv.Size() +} + +func StdInt64Marshal(v int64) ([]byte, error) { + size := SizeOfStdInt64(v) + buf := make([]byte, size) + _, err := StdInt64MarshalTo(v, buf) + return buf, err +} + +func StdInt64MarshalTo(v int64, data []byte) (int, error) { + pv := &Int64Value{Value: v} + return pv.MarshalTo(data) +} + +func StdInt64Unmarshal(v *int64, data []byte) error { + pv := &Int64Value{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} +func NewPopulatedStdUInt64(r randyWrappers, easy bool) *uint64 { + v := NewPopulatedUInt64Value(r, easy) + return &v.Value +} + +func SizeOfStdUInt64(v uint64) int { + pv := &UInt64Value{Value: v} + return pv.Size() +} + +func StdUInt64Marshal(v uint64) ([]byte, error) { + size := SizeOfStdUInt64(v) + buf := make([]byte, size) + _, err := StdUInt64MarshalTo(v, buf) + return buf, err +} + +func StdUInt64MarshalTo(v uint64, data []byte) (int, error) { + pv := &UInt64Value{Value: v} + return pv.MarshalTo(data) +} + +func StdUInt64Unmarshal(v *uint64, data []byte) error { + pv := &UInt64Value{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} +func NewPopulatedStdInt32(r randyWrappers, easy bool) *int32 { + v := NewPopulatedInt32Value(r, easy) + return &v.Value +} + +func SizeOfStdInt32(v int32) int { + pv := &Int32Value{Value: v} + return pv.Size() +} + +func StdInt32Marshal(v int32) ([]byte, error) { + size := SizeOfStdInt32(v) + buf := make([]byte, size) + _, err := StdInt32MarshalTo(v, buf) + return buf, err +} + +func StdInt32MarshalTo(v int32, data []byte) (int, error) { + pv := &Int32Value{Value: v} + return pv.MarshalTo(data) +} + +func StdInt32Unmarshal(v *int32, data []byte) error { + pv := &Int32Value{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} +func NewPopulatedStdUInt32(r randyWrappers, easy bool) *uint32 { + v := NewPopulatedUInt32Value(r, easy) + return &v.Value +} + +func SizeOfStdUInt32(v uint32) int { + pv := &UInt32Value{Value: v} + return pv.Size() +} + +func StdUInt32Marshal(v uint32) ([]byte, error) { + size := SizeOfStdUInt32(v) + buf := make([]byte, size) + _, err := StdUInt32MarshalTo(v, buf) + return buf, err +} + +func StdUInt32MarshalTo(v uint32, data []byte) (int, error) { + pv := &UInt32Value{Value: v} + return pv.MarshalTo(data) +} + +func StdUInt32Unmarshal(v *uint32, data []byte) error { + pv := &UInt32Value{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} +func NewPopulatedStdBool(r randyWrappers, easy bool) *bool { + v := NewPopulatedBoolValue(r, easy) + return &v.Value +} + +func SizeOfStdBool(v bool) int { + pv := &BoolValue{Value: v} + return pv.Size() +} + +func StdBoolMarshal(v bool) ([]byte, error) { + size := SizeOfStdBool(v) + buf := make([]byte, size) + _, err := StdBoolMarshalTo(v, buf) + return buf, err +} + +func StdBoolMarshalTo(v bool, data []byte) (int, error) { + pv := &BoolValue{Value: v} + return pv.MarshalTo(data) +} + +func StdBoolUnmarshal(v *bool, data []byte) error { + pv := &BoolValue{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} +func NewPopulatedStdString(r randyWrappers, easy bool) *string { + v := NewPopulatedStringValue(r, easy) + return &v.Value +} + +func SizeOfStdString(v string) int { + pv := &StringValue{Value: v} + return pv.Size() +} + +func StdStringMarshal(v string) ([]byte, error) { + size := SizeOfStdString(v) + buf := make([]byte, size) + _, err := StdStringMarshalTo(v, buf) + return buf, err +} + +func StdStringMarshalTo(v string, data []byte) (int, error) { + pv := &StringValue{Value: v} + return pv.MarshalTo(data) +} + +func StdStringUnmarshal(v *string, data []byte) error { + pv := &StringValue{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} +func NewPopulatedStdBytes(r randyWrappers, easy bool) *[]byte { + v := NewPopulatedBytesValue(r, easy) + return &v.Value +} + +func SizeOfStdBytes(v []byte) int { + pv := &BytesValue{Value: v} + return pv.Size() +} + +func StdBytesMarshal(v []byte) ([]byte, error) { + size := SizeOfStdBytes(v) + buf := make([]byte, size) + _, err := StdBytesMarshalTo(v, buf) + return buf, err +} + +func StdBytesMarshalTo(v []byte, data []byte) (int, error) { + pv := &BytesValue{Value: v} + return pv.MarshalTo(data) +} + +func StdBytesUnmarshal(v *[]byte, data []byte) error { + pv := &BytesValue{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} diff --git a/vendor/github.com/golang/mock/gomock/call.go b/vendor/github.com/golang/mock/gomock/call.go deleted file mode 100644 index b18cc2d6..00000000 --- a/vendor/github.com/golang/mock/gomock/call.go +++ /dev/null @@ -1,433 +0,0 @@ -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package gomock - -import ( - "fmt" - "reflect" - "strconv" - "strings" -) - -// Call represents an expected call to a mock. -type Call struct { - t TestHelper // for triggering test failures on invalid call setup - - receiver interface{} // the receiver of the method call - method string // the name of the method - methodType reflect.Type // the type of the method - args []Matcher // the args - origin string // file and line number of call setup - - preReqs []*Call // prerequisite calls - - // Expectations - minCalls, maxCalls int - - numCalls int // actual number made - - // actions are called when this Call is called. Each action gets the args and - // can set the return values by returning a non-nil slice. Actions run in the - // order they are created. - actions []func([]interface{}) []interface{} -} - -// newCall creates a *Call. It requires the method type in order to support -// unexported methods. -func newCall(t TestHelper, receiver interface{}, method string, methodType reflect.Type, args ...interface{}) *Call { - t.Helper() - - // TODO: check arity, types. - margs := make([]Matcher, len(args)) - for i, arg := range args { - if m, ok := arg.(Matcher); ok { - margs[i] = m - } else if arg == nil { - // Handle nil specially so that passing a nil interface value - // will match the typed nils of concrete args. - margs[i] = Nil() - } else { - margs[i] = Eq(arg) - } - } - - // callerInfo's skip should be updated if the number of calls between the user's test - // and this line changes, i.e. this code is wrapped in another anonymous function. - // 0 is us, 1 is RecordCallWithMethodType(), 2 is the generated recorder, and 3 is the user's test. - origin := callerInfo(3) - actions := []func([]interface{}) []interface{}{func([]interface{}) []interface{} { - // Synthesize the zero value for each of the return args' types. - rets := make([]interface{}, methodType.NumOut()) - for i := 0; i < methodType.NumOut(); i++ { - rets[i] = reflect.Zero(methodType.Out(i)).Interface() - } - return rets - }} - return &Call{t: t, receiver: receiver, method: method, methodType: methodType, - args: margs, origin: origin, minCalls: 1, maxCalls: 1, actions: actions} -} - -// AnyTimes allows the expectation to be called 0 or more times -func (c *Call) AnyTimes() *Call { - c.minCalls, c.maxCalls = 0, 1e8 // close enough to infinity - return c -} - -// MinTimes requires the call to occur at least n times. If AnyTimes or MaxTimes have not been called or if MaxTimes -// was previously called with 1, MinTimes also sets the maximum number of calls to infinity. -func (c *Call) MinTimes(n int) *Call { - c.minCalls = n - if c.maxCalls == 1 { - c.maxCalls = 1e8 - } - return c -} - -// MaxTimes limits the number of calls to n times. If AnyTimes or MinTimes have not been called or if MinTimes was -// previously called with 1, MaxTimes also sets the minimum number of calls to 0. -func (c *Call) MaxTimes(n int) *Call { - c.maxCalls = n - if c.minCalls == 1 { - c.minCalls = 0 - } - return c -} - -// DoAndReturn declares the action to run when the call is matched. -// The return values from this function are returned by the mocked function. -// It takes an interface{} argument to support n-arity functions. -func (c *Call) DoAndReturn(f interface{}) *Call { - // TODO: Check arity and types here, rather than dying badly elsewhere. - v := reflect.ValueOf(f) - - c.addAction(func(args []interface{}) []interface{} { - vargs := make([]reflect.Value, len(args)) - ft := v.Type() - for i := 0; i < len(args); i++ { - if args[i] != nil { - vargs[i] = reflect.ValueOf(args[i]) - } else { - // Use the zero value for the arg. - vargs[i] = reflect.Zero(ft.In(i)) - } - } - vrets := v.Call(vargs) - rets := make([]interface{}, len(vrets)) - for i, ret := range vrets { - rets[i] = ret.Interface() - } - return rets - }) - return c -} - -// Do declares the action to run when the call is matched. The function's -// return values are ignored to retain backward compatibility. To use the -// return values call DoAndReturn. -// It takes an interface{} argument to support n-arity functions. -func (c *Call) Do(f interface{}) *Call { - // TODO: Check arity and types here, rather than dying badly elsewhere. - v := reflect.ValueOf(f) - - c.addAction(func(args []interface{}) []interface{} { - vargs := make([]reflect.Value, len(args)) - ft := v.Type() - for i := 0; i < len(args); i++ { - if args[i] != nil { - vargs[i] = reflect.ValueOf(args[i]) - } else { - // Use the zero value for the arg. - vargs[i] = reflect.Zero(ft.In(i)) - } - } - v.Call(vargs) - return nil - }) - return c -} - -// Return declares the values to be returned by the mocked function call. -func (c *Call) Return(rets ...interface{}) *Call { - c.t.Helper() - - mt := c.methodType - if len(rets) != mt.NumOut() { - c.t.Fatalf("wrong number of arguments to Return for %T.%v: got %d, want %d [%s]", - c.receiver, c.method, len(rets), mt.NumOut(), c.origin) - } - for i, ret := range rets { - if got, want := reflect.TypeOf(ret), mt.Out(i); got == want { - // Identical types; nothing to do. - } else if got == nil { - // Nil needs special handling. - switch want.Kind() { - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - // ok - default: - c.t.Fatalf("argument %d to Return for %T.%v is nil, but %v is not nillable [%s]", - i, c.receiver, c.method, want, c.origin) - } - } else if got.AssignableTo(want) { - // Assignable type relation. Make the assignment now so that the generated code - // can return the values with a type assertion. - v := reflect.New(want).Elem() - v.Set(reflect.ValueOf(ret)) - rets[i] = v.Interface() - } else { - c.t.Fatalf("wrong type of argument %d to Return for %T.%v: %v is not assignable to %v [%s]", - i, c.receiver, c.method, got, want, c.origin) - } - } - - c.addAction(func([]interface{}) []interface{} { - return rets - }) - - return c -} - -// Times declares the exact number of times a function call is expected to be executed. -func (c *Call) Times(n int) *Call { - c.minCalls, c.maxCalls = n, n - return c -} - -// SetArg declares an action that will set the nth argument's value, -// indirected through a pointer. Or, in the case of a slice, SetArg -// will copy value's elements into the nth argument. -func (c *Call) SetArg(n int, value interface{}) *Call { - c.t.Helper() - - mt := c.methodType - // TODO: This will break on variadic methods. - // We will need to check those at invocation time. - if n < 0 || n >= mt.NumIn() { - c.t.Fatalf("SetArg(%d, ...) called for a method with %d args [%s]", - n, mt.NumIn(), c.origin) - } - // Permit setting argument through an interface. - // In the interface case, we don't (nay, can't) check the type here. - at := mt.In(n) - switch at.Kind() { - case reflect.Ptr: - dt := at.Elem() - if vt := reflect.TypeOf(value); !vt.AssignableTo(dt) { - c.t.Fatalf("SetArg(%d, ...) argument is a %v, not assignable to %v [%s]", - n, vt, dt, c.origin) - } - case reflect.Interface: - // nothing to do - case reflect.Slice: - // nothing to do - default: - c.t.Fatalf("SetArg(%d, ...) referring to argument of non-pointer non-interface non-slice type %v [%s]", - n, at, c.origin) - } - - c.addAction(func(args []interface{}) []interface{} { - v := reflect.ValueOf(value) - switch reflect.TypeOf(args[n]).Kind() { - case reflect.Slice: - setSlice(args[n], v) - default: - reflect.ValueOf(args[n]).Elem().Set(v) - } - return nil - }) - return c -} - -// isPreReq returns true if other is a direct or indirect prerequisite to c. -func (c *Call) isPreReq(other *Call) bool { - for _, preReq := range c.preReqs { - if other == preReq || preReq.isPreReq(other) { - return true - } - } - return false -} - -// After declares that the call may only match after preReq has been exhausted. -func (c *Call) After(preReq *Call) *Call { - c.t.Helper() - - if c == preReq { - c.t.Fatalf("A call isn't allowed to be its own prerequisite") - } - if preReq.isPreReq(c) { - c.t.Fatalf("Loop in call order: %v is a prerequisite to %v (possibly indirectly).", c, preReq) - } - - c.preReqs = append(c.preReqs, preReq) - return c -} - -// Returns true if the minimum number of calls have been made. -func (c *Call) satisfied() bool { - return c.numCalls >= c.minCalls -} - -// Returns true if the maximum number of calls have been made. -func (c *Call) exhausted() bool { - return c.numCalls >= c.maxCalls -} - -func (c *Call) String() string { - args := make([]string, len(c.args)) - for i, arg := range c.args { - args[i] = arg.String() - } - arguments := strings.Join(args, ", ") - return fmt.Sprintf("%T.%v(%s) %s", c.receiver, c.method, arguments, c.origin) -} - -// Tests if the given call matches the expected call. -// If yes, returns nil. If no, returns error with message explaining why it does not match. -func (c *Call) matches(args []interface{}) error { - if !c.methodType.IsVariadic() { - if len(args) != len(c.args) { - return fmt.Errorf("expected call at %s has the wrong number of arguments. Got: %d, want: %d", - c.origin, len(args), len(c.args)) - } - - for i, m := range c.args { - if !m.Matches(args[i]) { - return fmt.Errorf( - "expected call at %s doesn't match the argument at index %d.\nGot: %v\nWant: %v", - c.origin, i, formatGottenArg(m, args[i]), m, - ) - } - } - } else { - if len(c.args) < c.methodType.NumIn()-1 { - return fmt.Errorf("expected call at %s has the wrong number of matchers. Got: %d, want: %d", - c.origin, len(c.args), c.methodType.NumIn()-1) - } - if len(c.args) != c.methodType.NumIn() && len(args) != len(c.args) { - return fmt.Errorf("expected call at %s has the wrong number of arguments. Got: %d, want: %d", - c.origin, len(args), len(c.args)) - } - if len(args) < len(c.args)-1 { - return fmt.Errorf("expected call at %s has the wrong number of arguments. Got: %d, want: greater than or equal to %d", - c.origin, len(args), len(c.args)-1) - } - - for i, m := range c.args { - if i < c.methodType.NumIn()-1 { - // Non-variadic args - if !m.Matches(args[i]) { - return fmt.Errorf("expected call at %s doesn't match the argument at index %s.\nGot: %v\nWant: %v", - c.origin, strconv.Itoa(i), formatGottenArg(m, args[i]), m) - } - continue - } - // The last arg has a possibility of a variadic argument, so let it branch - - // sample: Foo(a int, b int, c ...int) - if i < len(c.args) && i < len(args) { - if m.Matches(args[i]) { - // Got Foo(a, b, c) want Foo(matcherA, matcherB, gomock.Any()) - // Got Foo(a, b, c) want Foo(matcherA, matcherB, someSliceMatcher) - // Got Foo(a, b, c) want Foo(matcherA, matcherB, matcherC) - // Got Foo(a, b) want Foo(matcherA, matcherB) - // Got Foo(a, b, c, d) want Foo(matcherA, matcherB, matcherC, matcherD) - continue - } - } - - // The number of actual args don't match the number of matchers, - // or the last matcher is a slice and the last arg is not. - // If this function still matches it is because the last matcher - // matches all the remaining arguments or the lack of any. - // Convert the remaining arguments, if any, into a slice of the - // expected type. - vargsType := c.methodType.In(c.methodType.NumIn() - 1) - vargs := reflect.MakeSlice(vargsType, 0, len(args)-i) - for _, arg := range args[i:] { - vargs = reflect.Append(vargs, reflect.ValueOf(arg)) - } - if m.Matches(vargs.Interface()) { - // Got Foo(a, b, c, d, e) want Foo(matcherA, matcherB, gomock.Any()) - // Got Foo(a, b, c, d, e) want Foo(matcherA, matcherB, someSliceMatcher) - // Got Foo(a, b) want Foo(matcherA, matcherB, gomock.Any()) - // Got Foo(a, b) want Foo(matcherA, matcherB, someEmptySliceMatcher) - break - } - // Wrong number of matchers or not match. Fail. - // Got Foo(a, b) want Foo(matcherA, matcherB, matcherC, matcherD) - // Got Foo(a, b, c) want Foo(matcherA, matcherB, matcherC, matcherD) - // Got Foo(a, b, c, d) want Foo(matcherA, matcherB, matcherC, matcherD, matcherE) - // Got Foo(a, b, c, d, e) want Foo(matcherA, matcherB, matcherC, matcherD) - // Got Foo(a, b, c) want Foo(matcherA, matcherB) - - return fmt.Errorf("expected call at %s doesn't match the argument at index %s.\nGot: %v\nWant: %v", - c.origin, strconv.Itoa(i), formatGottenArg(m, args[i:]), c.args[i]) - } - } - - // Check that all prerequisite calls have been satisfied. - for _, preReqCall := range c.preReqs { - if !preReqCall.satisfied() { - return fmt.Errorf("Expected call at %s doesn't have a prerequisite call satisfied:\n%v\nshould be called before:\n%v", - c.origin, preReqCall, c) - } - } - - // Check that the call is not exhausted. - if c.exhausted() { - return fmt.Errorf("expected call at %s has already been called the max number of times", c.origin) - } - - return nil -} - -// dropPrereqs tells the expected Call to not re-check prerequisite calls any -// longer, and to return its current set. -func (c *Call) dropPrereqs() (preReqs []*Call) { - preReqs = c.preReqs - c.preReqs = nil - return -} - -func (c *Call) call() []func([]interface{}) []interface{} { - c.numCalls++ - return c.actions -} - -// InOrder declares that the given calls should occur in order. -func InOrder(calls ...*Call) { - for i := 1; i < len(calls); i++ { - calls[i].After(calls[i-1]) - } -} - -func setSlice(arg interface{}, v reflect.Value) { - va := reflect.ValueOf(arg) - for i := 0; i < v.Len(); i++ { - va.Index(i).Set(v.Index(i)) - } -} - -func (c *Call) addAction(action func([]interface{}) []interface{}) { - c.actions = append(c.actions, action) -} - -func formatGottenArg(m Matcher, arg interface{}) string { - got := fmt.Sprintf("%v", arg) - if gs, ok := m.(GotFormatter); ok { - got = gs.Got(arg) - } - return got -} diff --git a/vendor/github.com/golang/mock/gomock/callset.go b/vendor/github.com/golang/mock/gomock/callset.go deleted file mode 100644 index b046b525..00000000 --- a/vendor/github.com/golang/mock/gomock/callset.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package gomock - -import ( - "bytes" - "fmt" -) - -// callSet represents a set of expected calls, indexed by receiver and method -// name. -type callSet struct { - // Calls that are still expected. - expected map[callSetKey][]*Call - // Calls that have been exhausted. - exhausted map[callSetKey][]*Call -} - -// callSetKey is the key in the maps in callSet -type callSetKey struct { - receiver interface{} - fname string -} - -func newCallSet() *callSet { - return &callSet{make(map[callSetKey][]*Call), make(map[callSetKey][]*Call)} -} - -// Add adds a new expected call. -func (cs callSet) Add(call *Call) { - key := callSetKey{call.receiver, call.method} - m := cs.expected - if call.exhausted() { - m = cs.exhausted - } - m[key] = append(m[key], call) -} - -// Remove removes an expected call. -func (cs callSet) Remove(call *Call) { - key := callSetKey{call.receiver, call.method} - calls := cs.expected[key] - for i, c := range calls { - if c == call { - // maintain order for remaining calls - cs.expected[key] = append(calls[:i], calls[i+1:]...) - cs.exhausted[key] = append(cs.exhausted[key], call) - break - } - } -} - -// FindMatch searches for a matching call. Returns error with explanation message if no call matched. -func (cs callSet) FindMatch(receiver interface{}, method string, args []interface{}) (*Call, error) { - key := callSetKey{receiver, method} - - // Search through the expected calls. - expected := cs.expected[key] - var callsErrors bytes.Buffer - for _, call := range expected { - err := call.matches(args) - if err != nil { - _, _ = fmt.Fprintf(&callsErrors, "\n%v", err) - } else { - return call, nil - } - } - - // If we haven't found a match then search through the exhausted calls so we - // get useful error messages. - exhausted := cs.exhausted[key] - for _, call := range exhausted { - if err := call.matches(args); err != nil { - _, _ = fmt.Fprintf(&callsErrors, "\n%v", err) - } - } - - if len(expected)+len(exhausted) == 0 { - _, _ = fmt.Fprintf(&callsErrors, "there are no expected calls of the method %q for that receiver", method) - } - - return nil, fmt.Errorf(callsErrors.String()) -} - -// Failures returns the calls that are not satisfied. -func (cs callSet) Failures() []*Call { - failures := make([]*Call, 0, len(cs.expected)) - for _, calls := range cs.expected { - for _, call := range calls { - if !call.satisfied() { - failures = append(failures, call) - } - } - } - return failures -} diff --git a/vendor/github.com/golang/mock/gomock/controller.go b/vendor/github.com/golang/mock/gomock/controller.go deleted file mode 100644 index ee175cdd..00000000 --- a/vendor/github.com/golang/mock/gomock/controller.go +++ /dev/null @@ -1,328 +0,0 @@ -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package gomock is a mock framework for Go. -// -// Standard usage: -// (1) Define an interface that you wish to mock. -// type MyInterface interface { -// SomeMethod(x int64, y string) -// } -// (2) Use mockgen to generate a mock from the interface. -// (3) Use the mock in a test: -// func TestMyThing(t *testing.T) { -// mockCtrl := gomock.NewController(t) -// defer mockCtrl.Finish() -// -// mockObj := something.NewMockMyInterface(mockCtrl) -// mockObj.EXPECT().SomeMethod(4, "blah") -// // pass mockObj to a real object and play with it. -// } -// -// By default, expected calls are not enforced to run in any particular order. -// Call order dependency can be enforced by use of InOrder and/or Call.After. -// Call.After can create more varied call order dependencies, but InOrder is -// often more convenient. -// -// The following examples create equivalent call order dependencies. -// -// Example of using Call.After to chain expected call order: -// -// firstCall := mockObj.EXPECT().SomeMethod(1, "first") -// secondCall := mockObj.EXPECT().SomeMethod(2, "second").After(firstCall) -// mockObj.EXPECT().SomeMethod(3, "third").After(secondCall) -// -// Example of using InOrder to declare expected call order: -// -// gomock.InOrder( -// mockObj.EXPECT().SomeMethod(1, "first"), -// mockObj.EXPECT().SomeMethod(2, "second"), -// mockObj.EXPECT().SomeMethod(3, "third"), -// ) -package gomock - -import ( - "context" - "fmt" - "reflect" - "runtime" - "sync" -) - -// A TestReporter is something that can be used to report test failures. It -// is satisfied by the standard library's *testing.T. -type TestReporter interface { - Errorf(format string, args ...interface{}) - Fatalf(format string, args ...interface{}) -} - -// TestHelper is a TestReporter that has the Helper method. It is satisfied -// by the standard library's *testing.T. -type TestHelper interface { - TestReporter - Helper() -} - -// cleanuper is used to check if TestHelper also has the `Cleanup` method. A -// common pattern is to pass in a `*testing.T` to -// `NewController(t TestReporter)`. In Go 1.14+, `*testing.T` has a cleanup -// method. This can be utilized to call `Finish()` so the caller of this library -// does not have to. -type cleanuper interface { - Cleanup(func()) -} - -// A Controller represents the top-level control of a mock ecosystem. It -// defines the scope and lifetime of mock objects, as well as their -// expectations. It is safe to call Controller's methods from multiple -// goroutines. Each test should create a new Controller and invoke Finish via -// defer. -// -// func TestFoo(t *testing.T) { -// ctrl := gomock.NewController(t) -// defer ctrl.Finish() -// // .. -// } -// -// func TestBar(t *testing.T) { -// t.Run("Sub-Test-1", st) { -// ctrl := gomock.NewController(st) -// defer ctrl.Finish() -// // .. -// }) -// t.Run("Sub-Test-2", st) { -// ctrl := gomock.NewController(st) -// defer ctrl.Finish() -// // .. -// }) -// }) -type Controller struct { - // T should only be called within a generated mock. It is not intended to - // be used in user code and may be changed in future versions. T is the - // TestReporter passed in when creating the Controller via NewController. - // If the TestReporter does not implement a TestHelper it will be wrapped - // with a nopTestHelper. - T TestHelper - mu sync.Mutex - expectedCalls *callSet - finished bool -} - -// NewController returns a new Controller. It is the preferred way to create a -// Controller. -// -// New in go1.14+, if you are passing a *testing.T into this function you no -// longer need to call ctrl.Finish() in your test methods -func NewController(t TestReporter) *Controller { - h, ok := t.(TestHelper) - if !ok { - h = &nopTestHelper{t} - } - ctrl := &Controller{ - T: h, - expectedCalls: newCallSet(), - } - if c, ok := isCleanuper(ctrl.T); ok { - c.Cleanup(func() { - ctrl.T.Helper() - ctrl.Finish() - }) - } - - return ctrl -} - -type cancelReporter struct { - t TestHelper - cancel func() -} - -func (r *cancelReporter) Errorf(format string, args ...interface{}) { - r.t.Errorf(format, args...) -} -func (r *cancelReporter) Fatalf(format string, args ...interface{}) { - defer r.cancel() - r.t.Fatalf(format, args...) -} - -func (r *cancelReporter) Helper() { - r.t.Helper() -} - -// WithContext returns a new Controller and a Context, which is cancelled on any -// fatal failure. -func WithContext(ctx context.Context, t TestReporter) (*Controller, context.Context) { - h, ok := t.(TestHelper) - if !ok { - h = &nopTestHelper{t: t} - } - - ctx, cancel := context.WithCancel(ctx) - return NewController(&cancelReporter{t: h, cancel: cancel}), ctx -} - -type nopTestHelper struct { - t TestReporter -} - -func (h *nopTestHelper) Errorf(format string, args ...interface{}) { - h.t.Errorf(format, args...) -} -func (h *nopTestHelper) Fatalf(format string, args ...interface{}) { - h.t.Fatalf(format, args...) -} - -func (h nopTestHelper) Helper() {} - -// RecordCall is called by a mock. It should not be called by user code. -func (ctrl *Controller) RecordCall(receiver interface{}, method string, args ...interface{}) *Call { - ctrl.T.Helper() - - recv := reflect.ValueOf(receiver) - for i := 0; i < recv.Type().NumMethod(); i++ { - if recv.Type().Method(i).Name == method { - return ctrl.RecordCallWithMethodType(receiver, method, recv.Method(i).Type(), args...) - } - } - ctrl.T.Fatalf("gomock: failed finding method %s on %T", method, receiver) - panic("unreachable") -} - -// RecordCallWithMethodType is called by a mock. It should not be called by user code. -func (ctrl *Controller) RecordCallWithMethodType(receiver interface{}, method string, methodType reflect.Type, args ...interface{}) *Call { - ctrl.T.Helper() - - call := newCall(ctrl.T, receiver, method, methodType, args...) - - ctrl.mu.Lock() - defer ctrl.mu.Unlock() - ctrl.expectedCalls.Add(call) - - return call -} - -// Call is called by a mock. It should not be called by user code. -func (ctrl *Controller) Call(receiver interface{}, method string, args ...interface{}) []interface{} { - ctrl.T.Helper() - - // Nest this code so we can use defer to make sure the lock is released. - actions := func() []func([]interface{}) []interface{} { - ctrl.T.Helper() - ctrl.mu.Lock() - defer ctrl.mu.Unlock() - - expected, err := ctrl.expectedCalls.FindMatch(receiver, method, args) - if err != nil { - // callerInfo's skip should be updated if the number of calls between the user's test - // and this line changes, i.e. this code is wrapped in another anonymous function. - // 0 is us, 1 is controller.Call(), 2 is the generated mock, and 3 is the user's test. - origin := callerInfo(3) - ctrl.T.Fatalf("Unexpected call to %T.%v(%v) at %s because: %s", receiver, method, args, origin, err) - } - - // Two things happen here: - // * the matching call no longer needs to check prerequite calls, - // * and the prerequite calls are no longer expected, so remove them. - preReqCalls := expected.dropPrereqs() - for _, preReqCall := range preReqCalls { - ctrl.expectedCalls.Remove(preReqCall) - } - - actions := expected.call() - if expected.exhausted() { - ctrl.expectedCalls.Remove(expected) - } - return actions - }() - - var rets []interface{} - for _, action := range actions { - if r := action(args); r != nil { - rets = r - } - } - - return rets -} - -// Finish checks to see if all the methods that were expected to be called -// were called. It should be invoked for each Controller. It is not idempotent -// and therefore can only be invoked once. -func (ctrl *Controller) Finish() { - ctrl.T.Helper() - - ctrl.mu.Lock() - defer ctrl.mu.Unlock() - - if ctrl.finished { - if _, ok := isCleanuper(ctrl.T); !ok { - ctrl.T.Fatalf("Controller.Finish was called more than once. It has to be called exactly once.") - } - // provide a log message to guide users to remove `defer ctrl.Finish()` in Go 1.14+ - tr := unwrapTestReporter(ctrl.T) - if l, ok := tr.(interface{ Log(args ...interface{}) }); ok { - l.Log("In Go 1.14+ you no longer need to `ctrl.Finish()` if a *testing.T is passed to `NewController(...)`") - } - return - } - ctrl.finished = true - - // If we're currently panicking, probably because this is a deferred call, - // pass through the panic. - if err := recover(); err != nil { - panic(err) - } - - // Check that all remaining expected calls are satisfied. - failures := ctrl.expectedCalls.Failures() - for _, call := range failures { - ctrl.T.Errorf("missing call(s) to %v", call) - } - if len(failures) != 0 { - ctrl.T.Fatalf("aborting test due to missing call(s)") - } -} - -// callerInfo returns the file:line of the call site. skip is the number -// of stack frames to skip when reporting. 0 is callerInfo's call site. -func callerInfo(skip int) string { - if _, file, line, ok := runtime.Caller(skip + 1); ok { - return fmt.Sprintf("%s:%d", file, line) - } - return "unknown file" -} - -// isCleanuper checks it if t's base TestReporter has a Cleanup method. -func isCleanuper(t TestReporter) (cleanuper, bool) { - tr := unwrapTestReporter(t) - c, ok := tr.(cleanuper) - return c, ok -} - -// unwrapTestReporter unwraps TestReporter to the base implementation. -func unwrapTestReporter(t TestReporter) TestReporter { - tr := t - switch nt := t.(type) { - case *cancelReporter: - tr = nt.t - if h, check := tr.(*nopTestHelper); check { - tr = h.t - } - case *nopTestHelper: - tr = nt.t - default: - // not wrapped - } - return tr -} diff --git a/vendor/github.com/golang/mock/gomock/matchers.go b/vendor/github.com/golang/mock/gomock/matchers.go deleted file mode 100644 index cf5566ef..00000000 --- a/vendor/github.com/golang/mock/gomock/matchers.go +++ /dev/null @@ -1,255 +0,0 @@ -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package gomock - -import ( - "fmt" - "reflect" - "strings" -) - -// A Matcher is a representation of a class of values. -// It is used to represent the valid or expected arguments to a mocked method. -type Matcher interface { - // Matches returns whether x is a match. - Matches(x interface{}) bool - - // String describes what the matcher matches. - String() string -} - -// WantFormatter modifies the given Matcher's String() method to the given -// Stringer. This allows for control on how the "Want" is formatted when -// printing . -func WantFormatter(s fmt.Stringer, m Matcher) Matcher { - type matcher interface { - Matches(x interface{}) bool - } - - return struct { - matcher - fmt.Stringer - }{ - matcher: m, - Stringer: s, - } -} - -// StringerFunc type is an adapter to allow the use of ordinary functions as -// a Stringer. If f is a function with the appropriate signature, -// StringerFunc(f) is a Stringer that calls f. -type StringerFunc func() string - -// String implements fmt.Stringer. -func (f StringerFunc) String() string { - return f() -} - -// GotFormatter is used to better print failure messages. If a matcher -// implements GotFormatter, it will use the result from Got when printing -// the failure message. -type GotFormatter interface { - // Got is invoked with the received value. The result is used when - // printing the failure message. - Got(got interface{}) string -} - -// GotFormatterFunc type is an adapter to allow the use of ordinary -// functions as a GotFormatter. If f is a function with the appropriate -// signature, GotFormatterFunc(f) is a GotFormatter that calls f. -type GotFormatterFunc func(got interface{}) string - -// Got implements GotFormatter. -func (f GotFormatterFunc) Got(got interface{}) string { - return f(got) -} - -// GotFormatterAdapter attaches a GotFormatter to a Matcher. -func GotFormatterAdapter(s GotFormatter, m Matcher) Matcher { - return struct { - GotFormatter - Matcher - }{ - GotFormatter: s, - Matcher: m, - } -} - -type anyMatcher struct{} - -func (anyMatcher) Matches(interface{}) bool { - return true -} - -func (anyMatcher) String() string { - return "is anything" -} - -type eqMatcher struct { - x interface{} -} - -func (e eqMatcher) Matches(x interface{}) bool { - return reflect.DeepEqual(e.x, x) -} - -func (e eqMatcher) String() string { - return fmt.Sprintf("is equal to %v", e.x) -} - -type nilMatcher struct{} - -func (nilMatcher) Matches(x interface{}) bool { - if x == nil { - return true - } - - v := reflect.ValueOf(x) - switch v.Kind() { - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, - reflect.Ptr, reflect.Slice: - return v.IsNil() - } - - return false -} - -func (nilMatcher) String() string { - return "is nil" -} - -type notMatcher struct { - m Matcher -} - -func (n notMatcher) Matches(x interface{}) bool { - return !n.m.Matches(x) -} - -func (n notMatcher) String() string { - // TODO: Improve this if we add a NotString method to the Matcher interface. - return "not(" + n.m.String() + ")" -} - -type assignableToTypeOfMatcher struct { - targetType reflect.Type -} - -func (m assignableToTypeOfMatcher) Matches(x interface{}) bool { - return reflect.TypeOf(x).AssignableTo(m.targetType) -} - -func (m assignableToTypeOfMatcher) String() string { - return "is assignable to " + m.targetType.Name() -} - -type allMatcher struct { - matchers []Matcher -} - -func (am allMatcher) Matches(x interface{}) bool { - for _, m := range am.matchers { - if !m.Matches(x) { - return false - } - } - return true -} - -func (am allMatcher) String() string { - ss := make([]string, 0, len(am.matchers)) - for _, matcher := range am.matchers { - ss = append(ss, matcher.String()) - } - return strings.Join(ss, "; ") -} - -type lenMatcher struct { - i int -} - -func (m lenMatcher) Matches(x interface{}) bool { - v := reflect.ValueOf(x) - switch v.Kind() { - case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == m.i - default: - return false - } -} - -func (m lenMatcher) String() string { - return fmt.Sprintf("has length %d", m.i) -} - -// Constructors - -// All returns a composite Matcher that returns true if and only all of the -// matchers return true. -func All(ms ...Matcher) Matcher { return allMatcher{ms} } - -// Any returns a matcher that always matches. -func Any() Matcher { return anyMatcher{} } - -// Eq returns a matcher that matches on equality. -// -// Example usage: -// Eq(5).Matches(5) // returns true -// Eq(5).Matches(4) // returns false -func Eq(x interface{}) Matcher { return eqMatcher{x} } - -// Len returns a matcher that matches on length. This matcher returns false if -// is compared to a type that is not an array, chan, map, slice, or string. -func Len(i int) Matcher { - return lenMatcher{i} -} - -// Nil returns a matcher that matches if the received value is nil. -// -// Example usage: -// var x *bytes.Buffer -// Nil().Matches(x) // returns true -// x = &bytes.Buffer{} -// Nil().Matches(x) // returns false -func Nil() Matcher { return nilMatcher{} } - -// Not reverses the results of its given child matcher. -// -// Example usage: -// Not(Eq(5)).Matches(4) // returns true -// Not(Eq(5)).Matches(5) // returns false -func Not(x interface{}) Matcher { - if m, ok := x.(Matcher); ok { - return notMatcher{m} - } - return notMatcher{Eq(x)} -} - -// AssignableToTypeOf is a Matcher that matches if the parameter to the mock -// function is assignable to the type of the parameter to this function. -// -// Example usage: -// var s fmt.Stringer = &bytes.Buffer{} -// AssignableToTypeOf(s).Matches(time.Second) // returns true -// AssignableToTypeOf(s).Matches(99) // returns false -// -// var ctx = reflect.TypeOf((*context.Context)(nil)).Elem() -// AssignableToTypeOf(ctx).Matches(context.Background()) // returns true -func AssignableToTypeOf(x interface{}) Matcher { - if xt, ok := x.(reflect.Type); ok { - return assignableToTypeOfMatcher{xt} - } - return assignableToTypeOfMatcher{reflect.TypeOf(x)} -} diff --git a/vendor/github.com/golang/mock/mockgen/mockgen.go b/vendor/github.com/golang/mock/mockgen/mockgen.go index ce483f87..f816b093 100644 --- a/vendor/github.com/golang/mock/mockgen/mockgen.go +++ b/vendor/github.com/golang/mock/mockgen/mockgen.go @@ -23,7 +23,6 @@ import ( "encoding/json" "flag" "fmt" - "go/build" "go/token" "io" "io/ioutil" @@ -133,15 +132,14 @@ func main() { // "package.X" since "package" is this package). This can happen if the mock // is output into an already existing package. outputPackagePath := *selfPackage - if len(outputPackagePath) == 0 && len(*destination) > 0 { - dst, _ := filepath.Abs(filepath.Dir(*destination)) - for _, prefix := range build.Default.SrcDirs() { - if strings.HasPrefix(dst, prefix) { - if rel, err := filepath.Rel(prefix, dst); err == nil { - outputPackagePath = rel - break - } - } + if outputPackagePath == "" && *destination != "" { + dstPath, err := filepath.Abs(filepath.Dir(*destination)) + if err != nil { + log.Fatalf("Unable to determine destination file path: %v", err) + } + outputPackagePath, err = parsePackageImport(dstPath) + if err != nil { + log.Fatalf("Unable to determine destination file path: %v", err) } } @@ -330,7 +328,7 @@ func (g *generator) Generate(pkg *model.Package, outputPkgName string, outputPac } // Avoid importing package if source pkg == output pkg - if pth == pkg.PkgPath && outputPkgName == pkg.Name { + if pth == pkg.PkgPath && outputPackagePath == pkg.PkgPath { continue } @@ -424,7 +422,14 @@ func (g *generator) GenerateMockInterface(intf *model.Interface, outputPackagePa return nil } +type byMethodName []*model.Method + +func (b byMethodName) Len() int { return len(b) } +func (b byMethodName) Swap(i, j int) { b[i], b[j] = b[j], b[i] } +func (b byMethodName) Less(i, j int) bool { return b[i].Name < b[j].Name } + func (g *generator) GenerateMockMethods(mockType string, intf *model.Interface, pkgOverride string) { + sort.Sort(byMethodName(intf.Methods)) for _, m := range intf.Methods { g.p("") _ = g.GenerateMockMethod(mockType, m, pkgOverride) diff --git a/vendor/github.com/golang/mock/mockgen/model/model.go b/vendor/github.com/golang/mock/mockgen/model/model.go index c5428c29..d06d5162 100644 --- a/vendor/github.com/golang/mock/mockgen/model/model.go +++ b/vendor/github.com/golang/mock/mockgen/model/model.go @@ -71,6 +71,16 @@ func (intf *Interface) addImports(im map[string]bool) { } } +// AddMethod adds a new method, deduplicating by method name. +func (intf *Interface) AddMethod(m *Method) { + for _, me := range intf.Methods { + if me.Name == m.Name { + return + } + } + intf.Methods = append(intf.Methods, m) +} + // Method is a single method of an interface. type Method struct { Name string @@ -311,7 +321,7 @@ func InterfaceFromInterfaceType(it reflect.Type) (*Interface, error) { return nil, err } - intf.Methods = append(intf.Methods, m) + intf.AddMethod(m) } return intf, nil diff --git a/vendor/github.com/golang/mock/mockgen/parse.go b/vendor/github.com/golang/mock/mockgen/parse.go index dfdad8ab..ef8a9595 100644 --- a/vendor/github.com/golang/mock/mockgen/parse.go +++ b/vendor/github.com/golang/mock/mockgen/parse.go @@ -267,7 +267,7 @@ func (p *fileParser) parseInterface(name, pkg string, it *ast.InterfaceType) (*m if err != nil { return nil, err } - intf.Methods = append(intf.Methods, m) + intf.AddMethod(m) case *ast.Ident: // Embedded interface in this package. ei := p.auxInterfaces[pkg][v.String()] @@ -291,8 +291,9 @@ func (p *fileParser) parseInterface(name, pkg string, it *ast.InterfaceType) (*m } } // Copy the methods. - // TODO: apply shadowing rules. - intf.Methods = append(intf.Methods, eintf.Methods...) + for _, m := range eintf.Methods { + intf.AddMethod(m) + } case *ast.SelectorExpr: // Embedded interface in another package. fpkg, sel := v.X.(*ast.Ident).String(), v.Sel.String() @@ -333,7 +334,9 @@ func (p *fileParser) parseInterface(name, pkg string, it *ast.InterfaceType) (*m } // Copy the methods. // TODO: apply shadowing rules. - intf.Methods = append(intf.Methods, eintf.Methods...) + for _, m := range eintf.Methods { + intf.AddMethod(m) + } default: return nil, fmt.Errorf("don't know how to mock method of type %T", field.Type) } diff --git a/vendor/github.com/google/go-cmp/cmp/compare.go b/vendor/github.com/google/go-cmp/cmp/compare.go index 7ad400f2..66561868 100644 --- a/vendor/github.com/google/go-cmp/cmp/compare.go +++ b/vendor/github.com/google/go-cmp/cmp/compare.go @@ -90,6 +90,52 @@ import ( // If there is a cycle, then the pointed at values are considered equal // only if both addresses were previously visited in the same path step. func Equal(x, y interface{}, opts ...Option) bool { + s := newState(opts) + s.compareAny(rootStep(x, y)) + return s.result.Equal() +} + +// Diff returns a human-readable report of the differences between two values: +// y - x. It returns an empty string if and only if Equal returns true for the +// same input values and options. +// +// The output is displayed as a literal in pseudo-Go syntax. +// At the start of each line, a "-" prefix indicates an element removed from y, +// a "+" prefix to indicates an element added to y, and the lack of a prefix +// indicates an element common to both x and y. If possible, the output +// uses fmt.Stringer.String or error.Error methods to produce more humanly +// readable outputs. In such cases, the string is prefixed with either an +// 's' or 'e' character, respectively, to indicate that the method was called. +// +// Do not depend on this output being stable. If you need the ability to +// programmatically interpret the difference, consider using a custom Reporter. +func Diff(x, y interface{}, opts ...Option) string { + s := newState(opts) + + // Optimization: If there are no other reporters, we can optimize for the + // common case where the result is equal (and thus no reported difference). + // This avoids the expensive construction of a difference tree. + if len(s.reporters) == 0 { + s.compareAny(rootStep(x, y)) + if s.result.Equal() { + return "" + } + s.result = diff.Result{} // Reset results + } + + r := new(defaultReporter) + s.reporters = append(s.reporters, reporter{r}) + s.compareAny(rootStep(x, y)) + d := r.String() + if (d == "") != s.result.Equal() { + panic("inconsistent difference and equality results") + } + return d +} + +// rootStep constructs the first path step. If x and y have differing types, +// then they are stored within an empty interface type. +func rootStep(x, y interface{}) PathStep { vx := reflect.ValueOf(x) vy := reflect.ValueOf(y) @@ -112,33 +158,7 @@ func Equal(x, y interface{}, opts ...Option) bool { t = vx.Type() } - s := newState(opts) - s.compareAny(&pathStep{t, vx, vy}) - return s.result.Equal() -} - -// Diff returns a human-readable report of the differences between two values. -// It returns an empty string if and only if Equal returns true for the same -// input values and options. -// -// The output is displayed as a literal in pseudo-Go syntax. -// At the start of each line, a "-" prefix indicates an element removed from x, -// a "+" prefix to indicates an element added to y, and the lack of a prefix -// indicates an element common to both x and y. If possible, the output -// uses fmt.Stringer.String or error.Error methods to produce more humanly -// readable outputs. In such cases, the string is prefixed with either an -// 's' or 'e' character, respectively, to indicate that the method was called. -// -// Do not depend on this output being stable. If you need the ability to -// programmatically interpret the difference, consider using a custom Reporter. -func Diff(x, y interface{}, opts ...Option) string { - r := new(defaultReporter) - eq := Equal(x, y, Options(opts), Reporter(r)) - d := r.String() - if (d == "") != eq { - panic("inconsistent difference and equality results") - } - return d + return &pathStep{t, vx, vy} } type state struct { @@ -356,7 +376,7 @@ func detectRaces(c chan<- reflect.Value, f reflect.Value, vs ...reflect.Value) { // assuming that T is assignable to R. // Otherwise, it returns the input value as is. func sanitizeValue(v reflect.Value, t reflect.Type) reflect.Value { - // TODO(dsnet): Workaround for reflect bug (https://golang.org/issue/22143). + // TODO(≥go1.10): Workaround for reflect bug (https://golang.org/issue/22143). if !flags.AtLeastGo110 { if v.Kind() == reflect.Interface && v.IsNil() && v.Type() != t { return reflect.New(t).Elem() @@ -366,6 +386,7 @@ func sanitizeValue(v reflect.Value, t reflect.Type) reflect.Value { } func (s *state) compareStruct(t reflect.Type, vx, vy reflect.Value) { + var addr bool var vax, vay reflect.Value // Addressable versions of vx and vy var mayForce, mayForceInit bool @@ -387,6 +408,7 @@ func (s *state) compareStruct(t reflect.Type, vx, vy reflect.Value) { // For retrieveUnexportedField to work, the parent struct must // be addressable. Create a new copy of the values if // necessary to make them addressable. + addr = vx.CanAddr() || vy.CanAddr() vax = makeAddressable(vx) vay = makeAddressable(vy) } @@ -397,6 +419,7 @@ func (s *state) compareStruct(t reflect.Type, vx, vy reflect.Value) { mayForceInit = true } step.mayForce = mayForce + step.paddr = addr step.pvx = vax step.pvy = vay step.field = t.Field(i) diff --git a/vendor/github.com/google/go-cmp/cmp/export_panic.go b/vendor/github.com/google/go-cmp/cmp/export_panic.go index dd032354..dfa5d213 100644 --- a/vendor/github.com/google/go-cmp/cmp/export_panic.go +++ b/vendor/github.com/google/go-cmp/cmp/export_panic.go @@ -10,6 +10,6 @@ import "reflect" const supportExporters = false -func retrieveUnexportedField(reflect.Value, reflect.StructField) reflect.Value { +func retrieveUnexportedField(reflect.Value, reflect.StructField, bool) reflect.Value { panic("no support for forcibly accessing unexported fields") } diff --git a/vendor/github.com/google/go-cmp/cmp/export_unsafe.go b/vendor/github.com/google/go-cmp/cmp/export_unsafe.go index 57020e26..351f1a34 100644 --- a/vendor/github.com/google/go-cmp/cmp/export_unsafe.go +++ b/vendor/github.com/google/go-cmp/cmp/export_unsafe.go @@ -17,9 +17,19 @@ const supportExporters = true // a struct such that the value has read-write permissions. // // The parent struct, v, must be addressable, while f must be a StructField -// describing the field to retrieve. -func retrieveUnexportedField(v reflect.Value, f reflect.StructField) reflect.Value { - // See https://github.com/google/go-cmp/issues/167 for discussion of the - // following expression. - return reflect.NewAt(f.Type, unsafe.Pointer(uintptr(unsafe.Pointer(v.UnsafeAddr()))+f.Offset)).Elem() +// describing the field to retrieve. If addr is false, +// then the returned value will be shallowed copied to be non-addressable. +func retrieveUnexportedField(v reflect.Value, f reflect.StructField, addr bool) reflect.Value { + ve := reflect.NewAt(f.Type, unsafe.Pointer(uintptr(unsafe.Pointer(v.UnsafeAddr()))+f.Offset)).Elem() + if !addr { + // A field is addressable if and only if the struct is addressable. + // If the original parent value was not addressable, shallow copy the + // value to make it non-addressable to avoid leaking an implementation + // detail of how forcibly exporting a field works. + if ve.Kind() == reflect.Interface && ve.IsNil() { + return reflect.Zero(f.Type) + } + return reflect.ValueOf(ve.Interface()).Convert(f.Type) + } + return ve } diff --git a/vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go b/vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go index 3d2e4266..730e223e 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go @@ -12,6 +12,13 @@ // is more important than obtaining a minimal Levenshtein distance. package diff +import ( + "math/rand" + "time" + + "github.com/google/go-cmp/cmp/internal/flags" +) + // EditType represents a single operation within an edit-script. type EditType uint8 @@ -112,6 +119,8 @@ func (r Result) Similar() bool { return r.NumSame+1 >= r.NumDiff } +var randInt = rand.New(rand.NewSource(time.Now().Unix())).Intn(2) + // Difference reports whether two lists of lengths nx and ny are equal // given the definition of equality provided as f. // @@ -159,6 +168,17 @@ func Difference(nx, ny int, f EqualFunc) (es EditScript) { // A vertical edge is equivalent to inserting a symbol from list Y. // A diagonal edge is equivalent to a matching symbol between both X and Y. + // To ensure flexibility in changing the algorithm in the future, + // introduce some degree of deliberate instability. + // This is achieved by fiddling the zigzag iterator to start searching + // the graph starting from the bottom-right versus than the top-left. + // The result may differ depending on the starting search location, + // but still produces a valid edit script. + zigzagInit := randInt // either 0 or 1 + if flags.Deterministic { + zigzagInit = 0 + } + // Invariants: // • 0 ≤ fwdPath.X ≤ (fwdFrontier.X, revFrontier.X) ≤ revPath.X ≤ nx // • 0 ≤ fwdPath.Y ≤ (fwdFrontier.Y, revFrontier.Y) ≤ revPath.Y ≤ ny @@ -209,7 +229,7 @@ func Difference(nx, ny int, f EqualFunc) (es EditScript) { if fwdFrontier.X >= revFrontier.X || fwdFrontier.Y >= revFrontier.Y || searchBudget == 0 { break } - for stop1, stop2, i := false, false, 0; !(stop1 && stop2) && searchBudget > 0; i++ { + for stop1, stop2, i := false, false, zigzagInit; !(stop1 && stop2) && searchBudget > 0; i++ { // Search in a diagonal pattern for a match. z := zigzag(i) p := point{fwdFrontier.X + z, fwdFrontier.Y - z} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/name.go b/vendor/github.com/google/go-cmp/cmp/internal/value/name.go new file mode 100644 index 00000000..8228e7d5 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/name.go @@ -0,0 +1,157 @@ +// Copyright 2020, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE.md file. + +package value + +import ( + "reflect" + "strconv" +) + +// TypeString is nearly identical to reflect.Type.String, +// but has an additional option to specify that full type names be used. +func TypeString(t reflect.Type, qualified bool) string { + return string(appendTypeName(nil, t, qualified, false)) +} + +func appendTypeName(b []byte, t reflect.Type, qualified, elideFunc bool) []byte { + // BUG: Go reflection provides no way to disambiguate two named types + // of the same name and within the same package, + // but declared within the namespace of different functions. + + // Named type. + if t.Name() != "" { + if qualified && t.PkgPath() != "" { + b = append(b, '"') + b = append(b, t.PkgPath()...) + b = append(b, '"') + b = append(b, '.') + b = append(b, t.Name()...) + } else { + b = append(b, t.String()...) + } + return b + } + + // Unnamed type. + switch k := t.Kind(); k { + case reflect.Bool, reflect.String, reflect.UnsafePointer, + reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, + reflect.Float32, reflect.Float64, reflect.Complex64, reflect.Complex128: + b = append(b, k.String()...) + case reflect.Chan: + if t.ChanDir() == reflect.RecvDir { + b = append(b, "<-"...) + } + b = append(b, "chan"...) + if t.ChanDir() == reflect.SendDir { + b = append(b, "<-"...) + } + b = append(b, ' ') + b = appendTypeName(b, t.Elem(), qualified, false) + case reflect.Func: + if !elideFunc { + b = append(b, "func"...) + } + b = append(b, '(') + for i := 0; i < t.NumIn(); i++ { + if i > 0 { + b = append(b, ", "...) + } + if i == t.NumIn()-1 && t.IsVariadic() { + b = append(b, "..."...) + b = appendTypeName(b, t.In(i).Elem(), qualified, false) + } else { + b = appendTypeName(b, t.In(i), qualified, false) + } + } + b = append(b, ')') + switch t.NumOut() { + case 0: + // Do nothing + case 1: + b = append(b, ' ') + b = appendTypeName(b, t.Out(0), qualified, false) + default: + b = append(b, " ("...) + for i := 0; i < t.NumOut(); i++ { + if i > 0 { + b = append(b, ", "...) + } + b = appendTypeName(b, t.Out(i), qualified, false) + } + b = append(b, ')') + } + case reflect.Struct: + b = append(b, "struct{ "...) + for i := 0; i < t.NumField(); i++ { + if i > 0 { + b = append(b, "; "...) + } + sf := t.Field(i) + if !sf.Anonymous { + if qualified && sf.PkgPath != "" { + b = append(b, '"') + b = append(b, sf.PkgPath...) + b = append(b, '"') + b = append(b, '.') + } + b = append(b, sf.Name...) + b = append(b, ' ') + } + b = appendTypeName(b, sf.Type, qualified, false) + if sf.Tag != "" { + b = append(b, ' ') + b = strconv.AppendQuote(b, string(sf.Tag)) + } + } + if b[len(b)-1] == ' ' { + b = b[:len(b)-1] + } else { + b = append(b, ' ') + } + b = append(b, '}') + case reflect.Slice, reflect.Array: + b = append(b, '[') + if k == reflect.Array { + b = strconv.AppendUint(b, uint64(t.Len()), 10) + } + b = append(b, ']') + b = appendTypeName(b, t.Elem(), qualified, false) + case reflect.Map: + b = append(b, "map["...) + b = appendTypeName(b, t.Key(), qualified, false) + b = append(b, ']') + b = appendTypeName(b, t.Elem(), qualified, false) + case reflect.Ptr: + b = append(b, '*') + b = appendTypeName(b, t.Elem(), qualified, false) + case reflect.Interface: + b = append(b, "interface{ "...) + for i := 0; i < t.NumMethod(); i++ { + if i > 0 { + b = append(b, "; "...) + } + m := t.Method(i) + if qualified && m.PkgPath != "" { + b = append(b, '"') + b = append(b, m.PkgPath...) + b = append(b, '"') + b = append(b, '.') + } + b = append(b, m.Name...) + b = appendTypeName(b, m.Type, qualified, true) + } + if b[len(b)-1] == ' ' { + b = b[:len(b)-1] + } else { + b = append(b, ' ') + } + b = append(b, '}') + default: + panic("invalid kind: " + k.String()) + } + return b +} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go index 0a01c479..e9e384a1 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go @@ -21,3 +21,13 @@ func PointerOf(v reflect.Value) Pointer { // assumes that the GC implementation does not use a moving collector. return Pointer{v.Pointer(), v.Type()} } + +// IsNil reports whether the pointer is nil. +func (p Pointer) IsNil() bool { + return p.p == 0 +} + +// Uintptr returns the pointer as a uintptr. +func (p Pointer) Uintptr() uintptr { + return p.p +} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go index da134ae2..b50c17ec 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go @@ -24,3 +24,13 @@ func PointerOf(v reflect.Value) Pointer { // which is necessary if the GC ever uses a moving collector. return Pointer{unsafe.Pointer(v.Pointer()), v.Type()} } + +// IsNil reports whether the pointer is nil. +func (p Pointer) IsNil() bool { + return p.p == nil +} + +// Uintptr returns the pointer as a uintptr. +func (p Pointer) Uintptr() uintptr { + return uintptr(p.p) +} diff --git a/vendor/github.com/google/go-cmp/cmp/options.go b/vendor/github.com/google/go-cmp/cmp/options.go index abbd2a63..4b0407a7 100644 --- a/vendor/github.com/google/go-cmp/cmp/options.go +++ b/vendor/github.com/google/go-cmp/cmp/options.go @@ -225,11 +225,14 @@ func (validator) apply(s *state, vx, vy reflect.Value) { // Unable to Interface implies unexported field without visibility access. if !vx.CanInterface() || !vy.CanInterface() { - const help = "consider using a custom Comparer; if you control the implementation of type, you can also consider using an Exporter, AllowUnexported, or cmpopts.IgnoreUnexported" + help := "consider using a custom Comparer; if you control the implementation of type, you can also consider using an Exporter, AllowUnexported, or cmpopts.IgnoreUnexported" var name string if t := s.curPath.Index(-2).Type(); t.Name() != "" { // Named type with unexported fields. name = fmt.Sprintf("%q.%v", t.PkgPath(), t.Name()) // e.g., "path/to/package".MyType + if _, ok := reflect.New(t).Interface().(error); ok { + help = "consider using cmpopts.EquateErrors to compare error values" + } } else { // Unnamed type with unexported fields. Derive PkgPath from field. var pkgPath string diff --git a/vendor/github.com/google/go-cmp/cmp/path.go b/vendor/github.com/google/go-cmp/cmp/path.go index 509d6b85..603dbb00 100644 --- a/vendor/github.com/google/go-cmp/cmp/path.go +++ b/vendor/github.com/google/go-cmp/cmp/path.go @@ -177,7 +177,8 @@ type structField struct { // pvx, pvy, and field are only valid if unexported is true. unexported bool mayForce bool // Forcibly allow visibility - pvx, pvy reflect.Value // Parent values + paddr bool // Was parent addressable? + pvx, pvy reflect.Value // Parent values (always addressible) field reflect.StructField // Field information } @@ -189,8 +190,8 @@ func (sf StructField) Values() (vx, vy reflect.Value) { // Forcibly obtain read-write access to an unexported struct field. if sf.mayForce { - vx = retrieveUnexportedField(sf.pvx, sf.field) - vy = retrieveUnexportedField(sf.pvy, sf.field) + vx = retrieveUnexportedField(sf.pvx, sf.field, sf.paddr) + vy = retrieveUnexportedField(sf.pvy, sf.field, sf.paddr) return vx, vy // CanInterface reports true } return sf.vx, sf.vy // CanInterface reports false diff --git a/vendor/github.com/google/go-cmp/cmp/report.go b/vendor/github.com/google/go-cmp/cmp/report.go index 6ddf2999..aafcb363 100644 --- a/vendor/github.com/google/go-cmp/cmp/report.go +++ b/vendor/github.com/google/go-cmp/cmp/report.go @@ -41,7 +41,10 @@ func (r *defaultReporter) String() string { if r.root.NumDiff == 0 { return "" } - return formatOptions{}.FormatDiff(r.root).String() + ptrs := new(pointerReferences) + text := formatOptions{}.FormatDiff(r.root, ptrs) + resolveReferences(text) + return text.String() } func assert(ok bool) { diff --git a/vendor/github.com/google/go-cmp/cmp/report_compare.go b/vendor/github.com/google/go-cmp/cmp/report_compare.go index d3fa154d..9e218096 100644 --- a/vendor/github.com/google/go-cmp/cmp/report_compare.go +++ b/vendor/github.com/google/go-cmp/cmp/report_compare.go @@ -11,14 +11,6 @@ import ( "github.com/google/go-cmp/cmp/internal/value" ) -// TODO: Enforce limits? -// * Enforce maximum number of records to print per node? -// * Enforce maximum size in bytes allowed? -// * As a heuristic, use less verbosity for equal nodes than unequal nodes. -// TODO: Enforce unique outputs? -// * Avoid Stringer methods if it results in same output? -// * Print pointer address if outputs still equal? - // numContextRecords is the number of surrounding equal records to print. const numContextRecords = 2 @@ -71,19 +63,56 @@ func (opts formatOptions) WithTypeMode(t typeMode) formatOptions { opts.TypeMode = t return opts } +func (opts formatOptions) WithVerbosity(level int) formatOptions { + opts.VerbosityLevel = level + opts.LimitVerbosity = true + return opts +} +func (opts formatOptions) verbosity() uint { + switch { + case opts.VerbosityLevel < 0: + return 0 + case opts.VerbosityLevel > 16: + return 16 // some reasonable maximum to avoid shift overflow + default: + return uint(opts.VerbosityLevel) + } +} + +const maxVerbosityPreset = 3 + +// verbosityPreset modifies the verbosity settings given an index +// between 0 and maxVerbosityPreset, inclusive. +func verbosityPreset(opts formatOptions, i int) formatOptions { + opts.VerbosityLevel = int(opts.verbosity()) + 2*i + if i > 0 { + opts.AvoidStringer = true + } + if i >= maxVerbosityPreset { + opts.PrintAddresses = true + opts.QualifiedNames = true + } + return opts +} // FormatDiff converts a valueNode tree into a textNode tree, where the later // is a textual representation of the differences detected in the former. -func (opts formatOptions) FormatDiff(v *valueNode) textNode { +func (opts formatOptions) FormatDiff(v *valueNode, ptrs *pointerReferences) (out textNode) { + if opts.DiffMode == diffIdentical { + opts = opts.WithVerbosity(1) + } else { + opts = opts.WithVerbosity(3) + } + // Check whether we have specialized formatting for this node. // This is not necessary, but helpful for producing more readable outputs. if opts.CanFormatDiffSlice(v) { return opts.FormatDiffSlice(v) } - var withinSlice bool - if v.parent != nil && (v.parent.Type.Kind() == reflect.Slice || v.parent.Type.Kind() == reflect.Array) { - withinSlice = true + var parentKind reflect.Kind + if v.parent != nil && v.parent.TransformerName == "" { + parentKind = v.parent.Type.Kind() } // For leaf nodes, format the value based on the reflect.Values alone. @@ -92,8 +121,8 @@ func (opts formatOptions) FormatDiff(v *valueNode) textNode { case diffUnknown, diffIdentical: // Format Equal. if v.NumDiff == 0 { - outx := opts.FormatValue(v.ValueX, withinSlice, visitedPointers{}) - outy := opts.FormatValue(v.ValueY, withinSlice, visitedPointers{}) + outx := opts.FormatValue(v.ValueX, parentKind, ptrs) + outy := opts.FormatValue(v.ValueY, parentKind, ptrs) if v.NumIgnored > 0 && v.NumSame == 0 { return textEllipsis } else if outx.Len() < outy.Len() { @@ -106,8 +135,13 @@ func (opts formatOptions) FormatDiff(v *valueNode) textNode { // Format unequal. assert(opts.DiffMode == diffUnknown) var list textList - outx := opts.WithTypeMode(elideType).FormatValue(v.ValueX, withinSlice, visitedPointers{}) - outy := opts.WithTypeMode(elideType).FormatValue(v.ValueY, withinSlice, visitedPointers{}) + outx := opts.WithTypeMode(elideType).FormatValue(v.ValueX, parentKind, ptrs) + outy := opts.WithTypeMode(elideType).FormatValue(v.ValueY, parentKind, ptrs) + for i := 0; i <= maxVerbosityPreset && outx != nil && outy != nil && outx.Equal(outy); i++ { + opts2 := verbosityPreset(opts, i).WithTypeMode(elideType) + outx = opts2.FormatValue(v.ValueX, parentKind, ptrs) + outy = opts2.FormatValue(v.ValueY, parentKind, ptrs) + } if outx != nil { list = append(list, textRecord{Diff: '-', Value: outx}) } @@ -116,34 +150,57 @@ func (opts formatOptions) FormatDiff(v *valueNode) textNode { } return opts.WithTypeMode(emitType).FormatType(v.Type, list) case diffRemoved: - return opts.FormatValue(v.ValueX, withinSlice, visitedPointers{}) + return opts.FormatValue(v.ValueX, parentKind, ptrs) case diffInserted: - return opts.FormatValue(v.ValueY, withinSlice, visitedPointers{}) + return opts.FormatValue(v.ValueY, parentKind, ptrs) default: panic("invalid diff mode") } } + // Register slice element to support cycle detection. + if parentKind == reflect.Slice { + ptrRefs := ptrs.PushPair(v.ValueX, v.ValueY, opts.DiffMode, true) + defer ptrs.Pop() + defer func() { out = wrapTrunkReferences(ptrRefs, out) }() + } + // Descend into the child value node. if v.TransformerName != "" { - out := opts.WithTypeMode(emitType).FormatDiff(v.Value) - out = textWrap{"Inverse(" + v.TransformerName + ", ", out, ")"} + out := opts.WithTypeMode(emitType).FormatDiff(v.Value, ptrs) + out = &textWrap{Prefix: "Inverse(" + v.TransformerName + ", ", Value: out, Suffix: ")"} return opts.FormatType(v.Type, out) } else { switch k := v.Type.Kind(); k { - case reflect.Struct, reflect.Array, reflect.Slice, reflect.Map: - return opts.FormatType(v.Type, opts.formatDiffList(v.Records, k)) + case reflect.Struct, reflect.Array, reflect.Slice: + out = opts.formatDiffList(v.Records, k, ptrs) + out = opts.FormatType(v.Type, out) + case reflect.Map: + // Register map to support cycle detection. + ptrRefs := ptrs.PushPair(v.ValueX, v.ValueY, opts.DiffMode, false) + defer ptrs.Pop() + + out = opts.formatDiffList(v.Records, k, ptrs) + out = wrapTrunkReferences(ptrRefs, out) + out = opts.FormatType(v.Type, out) case reflect.Ptr: - return textWrap{"&", opts.FormatDiff(v.Value), ""} + // Register pointer to support cycle detection. + ptrRefs := ptrs.PushPair(v.ValueX, v.ValueY, opts.DiffMode, false) + defer ptrs.Pop() + + out = opts.FormatDiff(v.Value, ptrs) + out = wrapTrunkReferences(ptrRefs, out) + out = &textWrap{Prefix: "&", Value: out} case reflect.Interface: - return opts.WithTypeMode(emitType).FormatDiff(v.Value) + out = opts.WithTypeMode(emitType).FormatDiff(v.Value, ptrs) default: panic(fmt.Sprintf("%v cannot have children", k)) } + return out } } -func (opts formatOptions) formatDiffList(recs []reportRecord, k reflect.Kind) textNode { +func (opts formatOptions) formatDiffList(recs []reportRecord, k reflect.Kind, ptrs *pointerReferences) textNode { // Derive record name based on the data structure kind. var name string var formatKey func(reflect.Value) string @@ -159,7 +216,17 @@ func (opts formatOptions) formatDiffList(recs []reportRecord, k reflect.Kind) te case reflect.Map: name = "entry" opts = opts.WithTypeMode(elideType) - formatKey = formatMapKey + formatKey = func(v reflect.Value) string { return formatMapKey(v, false, ptrs) } + } + + maxLen := -1 + if opts.LimitVerbosity { + if opts.DiffMode == diffIdentical { + maxLen = ((1 << opts.verbosity()) >> 1) << 2 // 0, 4, 8, 16, 32, etc... + } else { + maxLen = (1 << opts.verbosity()) << 1 // 2, 4, 8, 16, 32, 64, etc... + } + opts.VerbosityLevel-- } // Handle unification. @@ -168,6 +235,11 @@ func (opts formatOptions) formatDiffList(recs []reportRecord, k reflect.Kind) te var list textList var deferredEllipsis bool // Add final "..." to indicate records were dropped for _, r := range recs { + if len(list) == maxLen { + deferredEllipsis = true + break + } + // Elide struct fields that are zero value. if k == reflect.Struct { var isZero bool @@ -191,23 +263,31 @@ func (opts formatOptions) formatDiffList(recs []reportRecord, k reflect.Kind) te } continue } - if out := opts.FormatDiff(r.Value); out != nil { + if out := opts.FormatDiff(r.Value, ptrs); out != nil { list = append(list, textRecord{Key: formatKey(r.Key), Value: out}) } } if deferredEllipsis { list.AppendEllipsis(diffStats{}) } - return textWrap{"{", list, "}"} + return &textWrap{Prefix: "{", Value: list, Suffix: "}"} case diffUnknown: default: panic("invalid diff mode") } // Handle differencing. + var numDiffs int var list textList + var keys []reflect.Value // invariant: len(list) == len(keys) groups := coalesceAdjacentRecords(name, recs) + maxGroup := diffStats{Name: name} for i, ds := range groups { + if maxLen >= 0 && numDiffs >= maxLen { + maxGroup = maxGroup.Append(ds) + continue + } + // Handle equal records. if ds.NumDiff() == 0 { // Compute the number of leading and trailing records to print. @@ -231,16 +311,21 @@ func (opts formatOptions) formatDiffList(recs []reportRecord, k reflect.Kind) te // Format the equal values. for _, r := range recs[:numLo] { - out := opts.WithDiffMode(diffIdentical).FormatDiff(r.Value) + out := opts.WithDiffMode(diffIdentical).FormatDiff(r.Value, ptrs) list = append(list, textRecord{Key: formatKey(r.Key), Value: out}) + keys = append(keys, r.Key) } if numEqual > numLo+numHi { ds.NumIdentical -= numLo + numHi list.AppendEllipsis(ds) + for len(keys) < len(list) { + keys = append(keys, reflect.Value{}) + } } for _, r := range recs[numEqual-numHi : numEqual] { - out := opts.WithDiffMode(diffIdentical).FormatDiff(r.Value) + out := opts.WithDiffMode(diffIdentical).FormatDiff(r.Value, ptrs) list = append(list, textRecord{Key: formatKey(r.Key), Value: out}) + keys = append(keys, r.Key) } recs = recs[numEqual:] continue @@ -252,24 +337,70 @@ func (opts formatOptions) formatDiffList(recs []reportRecord, k reflect.Kind) te case opts.CanFormatDiffSlice(r.Value): out := opts.FormatDiffSlice(r.Value) list = append(list, textRecord{Key: formatKey(r.Key), Value: out}) + keys = append(keys, r.Key) case r.Value.NumChildren == r.Value.MaxDepth: - outx := opts.WithDiffMode(diffRemoved).FormatDiff(r.Value) - outy := opts.WithDiffMode(diffInserted).FormatDiff(r.Value) + outx := opts.WithDiffMode(diffRemoved).FormatDiff(r.Value, ptrs) + outy := opts.WithDiffMode(diffInserted).FormatDiff(r.Value, ptrs) + for i := 0; i <= maxVerbosityPreset && outx != nil && outy != nil && outx.Equal(outy); i++ { + opts2 := verbosityPreset(opts, i) + outx = opts2.WithDiffMode(diffRemoved).FormatDiff(r.Value, ptrs) + outy = opts2.WithDiffMode(diffInserted).FormatDiff(r.Value, ptrs) + } if outx != nil { list = append(list, textRecord{Diff: diffRemoved, Key: formatKey(r.Key), Value: outx}) + keys = append(keys, r.Key) } if outy != nil { list = append(list, textRecord{Diff: diffInserted, Key: formatKey(r.Key), Value: outy}) + keys = append(keys, r.Key) } default: - out := opts.FormatDiff(r.Value) + out := opts.FormatDiff(r.Value, ptrs) list = append(list, textRecord{Key: formatKey(r.Key), Value: out}) + keys = append(keys, r.Key) } } recs = recs[ds.NumDiff():] + numDiffs += ds.NumDiff() } - assert(len(recs) == 0) - return textWrap{"{", list, "}"} + if maxGroup.IsZero() { + assert(len(recs) == 0) + } else { + list.AppendEllipsis(maxGroup) + for len(keys) < len(list) { + keys = append(keys, reflect.Value{}) + } + } + assert(len(list) == len(keys)) + + // For maps, the default formatting logic uses fmt.Stringer which may + // produce ambiguous output. Avoid calling String to disambiguate. + if k == reflect.Map { + var ambiguous bool + seenKeys := map[string]reflect.Value{} + for i, currKey := range keys { + if currKey.IsValid() { + strKey := list[i].Key + prevKey, seen := seenKeys[strKey] + if seen && prevKey.CanInterface() && currKey.CanInterface() { + ambiguous = prevKey.Interface() != currKey.Interface() + if ambiguous { + break + } + } + seenKeys[strKey] = currKey + } + } + if ambiguous { + for i, k := range keys { + if k.IsValid() { + list[i].Key = formatMapKey(k, true, ptrs) + } + } + } + } + + return &textWrap{Prefix: "{", Value: list, Suffix: "}"} } // coalesceAdjacentRecords coalesces the list of records into groups of diff --git a/vendor/github.com/google/go-cmp/cmp/report_references.go b/vendor/github.com/google/go-cmp/cmp/report_references.go new file mode 100644 index 00000000..d620c2c2 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/report_references.go @@ -0,0 +1,264 @@ +// Copyright 2020, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE.md file. + +package cmp + +import ( + "fmt" + "reflect" + "strings" + + "github.com/google/go-cmp/cmp/internal/flags" + "github.com/google/go-cmp/cmp/internal/value" +) + +const ( + pointerDelimPrefix = "⟪" + pointerDelimSuffix = "⟫" +) + +// formatPointer prints the address of the pointer. +func formatPointer(p value.Pointer, withDelims bool) string { + v := p.Uintptr() + if flags.Deterministic { + v = 0xdeadf00f // Only used for stable testing purposes + } + if withDelims { + return pointerDelimPrefix + formatHex(uint64(v)) + pointerDelimSuffix + } + return formatHex(uint64(v)) +} + +// pointerReferences is a stack of pointers visited so far. +type pointerReferences [][2]value.Pointer + +func (ps *pointerReferences) PushPair(vx, vy reflect.Value, d diffMode, deref bool) (pp [2]value.Pointer) { + if deref && vx.IsValid() { + vx = vx.Addr() + } + if deref && vy.IsValid() { + vy = vy.Addr() + } + switch d { + case diffUnknown, diffIdentical: + pp = [2]value.Pointer{value.PointerOf(vx), value.PointerOf(vy)} + case diffRemoved: + pp = [2]value.Pointer{value.PointerOf(vx), value.Pointer{}} + case diffInserted: + pp = [2]value.Pointer{value.Pointer{}, value.PointerOf(vy)} + } + *ps = append(*ps, pp) + return pp +} + +func (ps *pointerReferences) Push(v reflect.Value) (p value.Pointer, seen bool) { + p = value.PointerOf(v) + for _, pp := range *ps { + if p == pp[0] || p == pp[1] { + return p, true + } + } + *ps = append(*ps, [2]value.Pointer{p, p}) + return p, false +} + +func (ps *pointerReferences) Pop() { + *ps = (*ps)[:len(*ps)-1] +} + +// trunkReferences is metadata for a textNode indicating that the sub-tree +// represents the value for either pointer in a pair of references. +type trunkReferences struct{ pp [2]value.Pointer } + +// trunkReference is metadata for a textNode indicating that the sub-tree +// represents the value for the given pointer reference. +type trunkReference struct{ p value.Pointer } + +// leafReference is metadata for a textNode indicating that the value is +// truncated as it refers to another part of the tree (i.e., a trunk). +type leafReference struct{ p value.Pointer } + +func wrapTrunkReferences(pp [2]value.Pointer, s textNode) textNode { + switch { + case pp[0].IsNil(): + return &textWrap{Value: s, Metadata: trunkReference{pp[1]}} + case pp[1].IsNil(): + return &textWrap{Value: s, Metadata: trunkReference{pp[0]}} + case pp[0] == pp[1]: + return &textWrap{Value: s, Metadata: trunkReference{pp[0]}} + default: + return &textWrap{Value: s, Metadata: trunkReferences{pp}} + } +} +func wrapTrunkReference(p value.Pointer, printAddress bool, s textNode) textNode { + var prefix string + if printAddress { + prefix = formatPointer(p, true) + } + return &textWrap{Prefix: prefix, Value: s, Metadata: trunkReference{p}} +} +func makeLeafReference(p value.Pointer, printAddress bool) textNode { + out := &textWrap{Prefix: "(", Value: textEllipsis, Suffix: ")"} + var prefix string + if printAddress { + prefix = formatPointer(p, true) + } + return &textWrap{Prefix: prefix, Value: out, Metadata: leafReference{p}} +} + +// resolveReferences walks the textNode tree searching for any leaf reference +// metadata and resolves each against the corresponding trunk references. +// Since pointer addresses in memory are not particularly readable to the user, +// it replaces each pointer value with an arbitrary and unique reference ID. +func resolveReferences(s textNode) { + var walkNodes func(textNode, func(textNode)) + walkNodes = func(s textNode, f func(textNode)) { + f(s) + switch s := s.(type) { + case *textWrap: + walkNodes(s.Value, f) + case textList: + for _, r := range s { + walkNodes(r.Value, f) + } + } + } + + // Collect all trunks and leaves with reference metadata. + var trunks, leaves []*textWrap + walkNodes(s, func(s textNode) { + if s, ok := s.(*textWrap); ok { + switch s.Metadata.(type) { + case leafReference: + leaves = append(leaves, s) + case trunkReference, trunkReferences: + trunks = append(trunks, s) + } + } + }) + + // No leaf references to resolve. + if len(leaves) == 0 { + return + } + + // Collect the set of all leaf references to resolve. + leafPtrs := make(map[value.Pointer]bool) + for _, leaf := range leaves { + leafPtrs[leaf.Metadata.(leafReference).p] = true + } + + // Collect the set of trunk pointers that are always paired together. + // This allows us to assign a single ID to both pointers for brevity. + // If a pointer in a pair ever occurs by itself or as a different pair, + // then the pair is broken. + pairedTrunkPtrs := make(map[value.Pointer]value.Pointer) + unpair := func(p value.Pointer) { + if !pairedTrunkPtrs[p].IsNil() { + pairedTrunkPtrs[pairedTrunkPtrs[p]] = value.Pointer{} // invalidate other half + } + pairedTrunkPtrs[p] = value.Pointer{} // invalidate this half + } + for _, trunk := range trunks { + switch p := trunk.Metadata.(type) { + case trunkReference: + unpair(p.p) // standalone pointer cannot be part of a pair + case trunkReferences: + p0, ok0 := pairedTrunkPtrs[p.pp[0]] + p1, ok1 := pairedTrunkPtrs[p.pp[1]] + switch { + case !ok0 && !ok1: + // Register the newly seen pair. + pairedTrunkPtrs[p.pp[0]] = p.pp[1] + pairedTrunkPtrs[p.pp[1]] = p.pp[0] + case ok0 && ok1 && p0 == p.pp[1] && p1 == p.pp[0]: + // Exact pair already seen; do nothing. + default: + // Pair conflicts with some other pair; break all pairs. + unpair(p.pp[0]) + unpair(p.pp[1]) + } + } + } + + // Correlate each pointer referenced by leaves to a unique identifier, + // and print the IDs for each trunk that matches those pointers. + var nextID uint + ptrIDs := make(map[value.Pointer]uint) + newID := func() uint { + id := nextID + nextID++ + return id + } + for _, trunk := range trunks { + switch p := trunk.Metadata.(type) { + case trunkReference: + if print := leafPtrs[p.p]; print { + id, ok := ptrIDs[p.p] + if !ok { + id = newID() + ptrIDs[p.p] = id + } + trunk.Prefix = updateReferencePrefix(trunk.Prefix, formatReference(id)) + } + case trunkReferences: + print0 := leafPtrs[p.pp[0]] + print1 := leafPtrs[p.pp[1]] + if print0 || print1 { + id0, ok0 := ptrIDs[p.pp[0]] + id1, ok1 := ptrIDs[p.pp[1]] + isPair := pairedTrunkPtrs[p.pp[0]] == p.pp[1] && pairedTrunkPtrs[p.pp[1]] == p.pp[0] + if isPair { + var id uint + assert(ok0 == ok1) // must be seen together or not at all + if ok0 { + assert(id0 == id1) // must have the same ID + id = id0 + } else { + id = newID() + ptrIDs[p.pp[0]] = id + ptrIDs[p.pp[1]] = id + } + trunk.Prefix = updateReferencePrefix(trunk.Prefix, formatReference(id)) + } else { + if print0 && !ok0 { + id0 = newID() + ptrIDs[p.pp[0]] = id0 + } + if print1 && !ok1 { + id1 = newID() + ptrIDs[p.pp[1]] = id1 + } + switch { + case print0 && print1: + trunk.Prefix = updateReferencePrefix(trunk.Prefix, formatReference(id0)+","+formatReference(id1)) + case print0: + trunk.Prefix = updateReferencePrefix(trunk.Prefix, formatReference(id0)) + case print1: + trunk.Prefix = updateReferencePrefix(trunk.Prefix, formatReference(id1)) + } + } + } + } + } + + // Update all leaf references with the unique identifier. + for _, leaf := range leaves { + if id, ok := ptrIDs[leaf.Metadata.(leafReference).p]; ok { + leaf.Prefix = updateReferencePrefix(leaf.Prefix, formatReference(id)) + } + } +} + +func formatReference(id uint) string { + return fmt.Sprintf("ref#%d", id) +} + +func updateReferencePrefix(prefix, ref string) string { + if prefix == "" { + return pointerDelimPrefix + ref + pointerDelimSuffix + } + suffix := strings.TrimPrefix(prefix, pointerDelimPrefix) + return pointerDelimPrefix + ref + ": " + suffix +} diff --git a/vendor/github.com/google/go-cmp/cmp/report_reflect.go b/vendor/github.com/google/go-cmp/cmp/report_reflect.go index 8f108833..786f6712 100644 --- a/vendor/github.com/google/go-cmp/cmp/report_reflect.go +++ b/vendor/github.com/google/go-cmp/cmp/report_reflect.go @@ -5,13 +5,14 @@ package cmp import ( + "bytes" "fmt" "reflect" "strconv" "strings" "unicode" + "unicode/utf8" - "github.com/google/go-cmp/cmp/internal/flags" "github.com/google/go-cmp/cmp/internal/value" ) @@ -20,14 +21,22 @@ type formatValueOptions struct { // methods like error.Error or fmt.Stringer.String. AvoidStringer bool - // ShallowPointers controls whether to avoid descending into pointers. - // Useful when printing map keys, where pointer comparison is performed - // on the pointer address rather than the pointed-at value. - ShallowPointers bool - // PrintAddresses controls whether to print the address of all pointers, // slice elements, and maps. PrintAddresses bool + + // QualifiedNames controls whether FormatType uses the fully qualified name + // (including the full package path as opposed to just the package name). + QualifiedNames bool + + // VerbosityLevel controls the amount of output to produce. + // A higher value produces more output. A value of zero or lower produces + // no output (represented using an ellipsis). + // If LimitVerbosity is false, then the level is treated as infinite. + VerbosityLevel int + + // LimitVerbosity specifies that formatting should respect VerbosityLevel. + LimitVerbosity bool } // FormatType prints the type as if it were wrapping s. @@ -44,12 +53,15 @@ func (opts formatOptions) FormatType(t reflect.Type, s textNode) textNode { default: return s } + if opts.DiffMode == diffIdentical { + return s // elide type for identical nodes + } case elideType: return s } // Determine the type label, applying special handling for unnamed types. - typeName := t.String() + typeName := value.TypeString(t, opts.QualifiedNames) if t.Name() == "" { // According to Go grammar, certain type literals contain symbols that // do not strongly bind to the next lexicographical token (e.g., *T). @@ -57,39 +69,77 @@ func (opts formatOptions) FormatType(t reflect.Type, s textNode) textNode { case reflect.Chan, reflect.Func, reflect.Ptr: typeName = "(" + typeName + ")" } - typeName = strings.Replace(typeName, "struct {", "struct{", -1) - typeName = strings.Replace(typeName, "interface {", "interface{", -1) } + return &textWrap{Prefix: typeName, Value: wrapParens(s)} +} - // Avoid wrap the value in parenthesis if unnecessary. - if s, ok := s.(textWrap); ok { - hasParens := strings.HasPrefix(s.Prefix, "(") && strings.HasSuffix(s.Suffix, ")") - hasBraces := strings.HasPrefix(s.Prefix, "{") && strings.HasSuffix(s.Suffix, "}") +// wrapParens wraps s with a set of parenthesis, but avoids it if the +// wrapped node itself is already surrounded by a pair of parenthesis or braces. +// It handles unwrapping one level of pointer-reference nodes. +func wrapParens(s textNode) textNode { + var refNode *textWrap + if s2, ok := s.(*textWrap); ok { + // Unwrap a single pointer reference node. + switch s2.Metadata.(type) { + case leafReference, trunkReference, trunkReferences: + refNode = s2 + if s3, ok := refNode.Value.(*textWrap); ok { + s2 = s3 + } + } + + // Already has delimiters that make parenthesis unnecessary. + hasParens := strings.HasPrefix(s2.Prefix, "(") && strings.HasSuffix(s2.Suffix, ")") + hasBraces := strings.HasPrefix(s2.Prefix, "{") && strings.HasSuffix(s2.Suffix, "}") if hasParens || hasBraces { - return textWrap{typeName, s, ""} + return s } } - return textWrap{typeName + "(", s, ")"} + if refNode != nil { + refNode.Value = &textWrap{Prefix: "(", Value: refNode.Value, Suffix: ")"} + return s + } + return &textWrap{Prefix: "(", Value: s, Suffix: ")"} } // FormatValue prints the reflect.Value, taking extra care to avoid descending -// into pointers already in m. As pointers are visited, m is also updated. -func (opts formatOptions) FormatValue(v reflect.Value, withinSlice bool, m visitedPointers) (out textNode) { +// into pointers already in ptrs. As pointers are visited, ptrs is also updated. +func (opts formatOptions) FormatValue(v reflect.Value, parentKind reflect.Kind, ptrs *pointerReferences) (out textNode) { if !v.IsValid() { return nil } t := v.Type() + // Check slice element for cycles. + if parentKind == reflect.Slice { + ptrRef, visited := ptrs.Push(v.Addr()) + if visited { + return makeLeafReference(ptrRef, false) + } + defer ptrs.Pop() + defer func() { out = wrapTrunkReference(ptrRef, false, out) }() + } + // Check whether there is an Error or String method to call. if !opts.AvoidStringer && v.CanInterface() { // Avoid calling Error or String methods on nil receivers since many // implementations crash when doing so. if (t.Kind() != reflect.Ptr && t.Kind() != reflect.Interface) || !v.IsNil() { - switch v := v.Interface().(type) { - case error: - return textLine("e" + formatString(v.Error())) - case fmt.Stringer: - return textLine("s" + formatString(v.String())) + var prefix, strVal string + func() { + // Swallow and ignore any panics from String or Error. + defer func() { recover() }() + switch v := v.Interface().(type) { + case error: + strVal = v.Error() + prefix = "e" + case fmt.Stringer: + strVal = v.String() + prefix = "s" + } + }() + if prefix != "" { + return opts.formatString(prefix, strVal) } } } @@ -102,7 +152,6 @@ func (opts formatOptions) FormatValue(v reflect.Value, withinSlice bool, m visit } }() - var ptr string switch t.Kind() { case reflect.Bool: return textLine(fmt.Sprint(v.Bool())) @@ -111,7 +160,7 @@ func (opts formatOptions) FormatValue(v reflect.Value, withinSlice bool, m visit case reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uint64: return textLine(fmt.Sprint(v.Uint())) case reflect.Uint8: - if withinSlice { + if parentKind == reflect.Slice || parentKind == reflect.Array { return textLine(formatHex(v.Uint())) } return textLine(fmt.Sprint(v.Uint())) @@ -122,77 +171,121 @@ func (opts formatOptions) FormatValue(v reflect.Value, withinSlice bool, m visit case reflect.Complex64, reflect.Complex128: return textLine(fmt.Sprint(v.Complex())) case reflect.String: - return textLine(formatString(v.String())) + return opts.formatString("", v.String()) case reflect.UnsafePointer, reflect.Chan, reflect.Func: - return textLine(formatPointer(v)) + return textLine(formatPointer(value.PointerOf(v), true)) case reflect.Struct: var list textList + v := makeAddressable(v) // needed for retrieveUnexportedField + maxLen := v.NumField() + if opts.LimitVerbosity { + maxLen = ((1 << opts.verbosity()) >> 1) << 2 // 0, 4, 8, 16, 32, etc... + opts.VerbosityLevel-- + } for i := 0; i < v.NumField(); i++ { vv := v.Field(i) if value.IsZero(vv) { continue // Elide fields with zero values } - s := opts.WithTypeMode(autoType).FormatValue(vv, false, m) - list = append(list, textRecord{Key: t.Field(i).Name, Value: s}) + if len(list) == maxLen { + list.AppendEllipsis(diffStats{}) + break + } + sf := t.Field(i) + if supportExporters && !isExported(sf.Name) { + vv = retrieveUnexportedField(v, sf, true) + } + s := opts.WithTypeMode(autoType).FormatValue(vv, t.Kind(), ptrs) + list = append(list, textRecord{Key: sf.Name, Value: s}) } - return textWrap{"{", list, "}"} + return &textWrap{Prefix: "{", Value: list, Suffix: "}"} case reflect.Slice: if v.IsNil() { return textNil } - if opts.PrintAddresses { - ptr = formatPointer(v) + + // Check whether this is a []byte of text data. + if t.Elem() == reflect.TypeOf(byte(0)) { + b := v.Bytes() + isPrintSpace := func(r rune) bool { return unicode.IsPrint(r) && unicode.IsSpace(r) } + if len(b) > 0 && utf8.Valid(b) && len(bytes.TrimFunc(b, isPrintSpace)) == 0 { + out = opts.formatString("", string(b)) + return opts.WithTypeMode(emitType).FormatType(t, out) + } } + fallthrough case reflect.Array: + maxLen := v.Len() + if opts.LimitVerbosity { + maxLen = ((1 << opts.verbosity()) >> 1) << 2 // 0, 4, 8, 16, 32, etc... + opts.VerbosityLevel-- + } var list textList for i := 0; i < v.Len(); i++ { - vi := v.Index(i) - if vi.CanAddr() { // Check for cyclic elements - p := vi.Addr() - if m.Visit(p) { - var out textNode - out = textLine(formatPointer(p)) - out = opts.WithTypeMode(emitType).FormatType(p.Type(), out) - out = textWrap{"*", out, ""} - list = append(list, textRecord{Value: out}) - continue - } + if len(list) == maxLen { + list.AppendEllipsis(diffStats{}) + break } - s := opts.WithTypeMode(elideType).FormatValue(vi, true, m) + s := opts.WithTypeMode(elideType).FormatValue(v.Index(i), t.Kind(), ptrs) list = append(list, textRecord{Value: s}) } - return textWrap{ptr + "{", list, "}"} + + out = &textWrap{Prefix: "{", Value: list, Suffix: "}"} + if t.Kind() == reflect.Slice && opts.PrintAddresses { + header := fmt.Sprintf("ptr:%v, len:%d, cap:%d", formatPointer(value.PointerOf(v), false), v.Len(), v.Cap()) + out = &textWrap{Prefix: pointerDelimPrefix + header + pointerDelimSuffix, Value: out} + } + return out case reflect.Map: if v.IsNil() { return textNil } - if m.Visit(v) { - return textLine(formatPointer(v)) + + // Check pointer for cycles. + ptrRef, visited := ptrs.Push(v) + if visited { + return makeLeafReference(ptrRef, opts.PrintAddresses) } + defer ptrs.Pop() + maxLen := v.Len() + if opts.LimitVerbosity { + maxLen = ((1 << opts.verbosity()) >> 1) << 2 // 0, 4, 8, 16, 32, etc... + opts.VerbosityLevel-- + } var list textList for _, k := range value.SortKeys(v.MapKeys()) { - sk := formatMapKey(k) - sv := opts.WithTypeMode(elideType).FormatValue(v.MapIndex(k), false, m) + if len(list) == maxLen { + list.AppendEllipsis(diffStats{}) + break + } + sk := formatMapKey(k, false, ptrs) + sv := opts.WithTypeMode(elideType).FormatValue(v.MapIndex(k), t.Kind(), ptrs) list = append(list, textRecord{Key: sk, Value: sv}) } - if opts.PrintAddresses { - ptr = formatPointer(v) - } - return textWrap{ptr + "{", list, "}"} + + out = &textWrap{Prefix: "{", Value: list, Suffix: "}"} + out = wrapTrunkReference(ptrRef, opts.PrintAddresses, out) + return out case reflect.Ptr: if v.IsNil() { return textNil } - if m.Visit(v) || opts.ShallowPointers { - return textLine(formatPointer(v)) - } - if opts.PrintAddresses { - ptr = formatPointer(v) + + // Check pointer for cycles. + ptrRef, visited := ptrs.Push(v) + if visited { + out = makeLeafReference(ptrRef, opts.PrintAddresses) + return &textWrap{Prefix: "&", Value: out} } + defer ptrs.Pop() + skipType = true // Let the underlying value print the type instead - return textWrap{"&" + ptr, opts.FormatValue(v.Elem(), false, m), ""} + out = opts.FormatValue(v.Elem(), t.Kind(), ptrs) + out = wrapTrunkReference(ptrRef, opts.PrintAddresses, out) + out = &textWrap{Prefix: "&", Value: out} + return out case reflect.Interface: if v.IsNil() { return textNil @@ -200,19 +293,65 @@ func (opts formatOptions) FormatValue(v reflect.Value, withinSlice bool, m visit // Interfaces accept different concrete types, // so configure the underlying value to explicitly print the type. skipType = true // Print the concrete type instead - return opts.WithTypeMode(emitType).FormatValue(v.Elem(), false, m) + return opts.WithTypeMode(emitType).FormatValue(v.Elem(), t.Kind(), ptrs) default: panic(fmt.Sprintf("%v kind not handled", v.Kind())) } } +func (opts formatOptions) formatString(prefix, s string) textNode { + maxLen := len(s) + maxLines := strings.Count(s, "\n") + 1 + if opts.LimitVerbosity { + maxLen = (1 << opts.verbosity()) << 5 // 32, 64, 128, 256, etc... + maxLines = (1 << opts.verbosity()) << 2 // 4, 8, 16, 32, 64, etc... + } + + // For multiline strings, use the triple-quote syntax, + // but only use it when printing removed or inserted nodes since + // we only want the extra verbosity for those cases. + lines := strings.Split(strings.TrimSuffix(s, "\n"), "\n") + isTripleQuoted := len(lines) >= 4 && (opts.DiffMode == '-' || opts.DiffMode == '+') + for i := 0; i < len(lines) && isTripleQuoted; i++ { + lines[i] = strings.TrimPrefix(strings.TrimSuffix(lines[i], "\r"), "\r") // trim leading/trailing carriage returns for legacy Windows endline support + isPrintable := func(r rune) bool { + return unicode.IsPrint(r) || r == '\t' // specially treat tab as printable + } + line := lines[i] + isTripleQuoted = !strings.HasPrefix(strings.TrimPrefix(line, prefix), `"""`) && !strings.HasPrefix(line, "...") && strings.TrimFunc(line, isPrintable) == "" && len(line) <= maxLen + } + if isTripleQuoted { + var list textList + list = append(list, textRecord{Diff: opts.DiffMode, Value: textLine(prefix + `"""`), ElideComma: true}) + for i, line := range lines { + if numElided := len(lines) - i; i == maxLines-1 && numElided > 1 { + comment := commentString(fmt.Sprintf("%d elided lines", numElided)) + list = append(list, textRecord{Diff: opts.DiffMode, Value: textEllipsis, ElideComma: true, Comment: comment}) + break + } + list = append(list, textRecord{Diff: opts.DiffMode, Value: textLine(line), ElideComma: true}) + } + list = append(list, textRecord{Diff: opts.DiffMode, Value: textLine(prefix + `"""`), ElideComma: true}) + return &textWrap{Prefix: "(", Value: list, Suffix: ")"} + } + + // Format the string as a single-line quoted string. + if len(s) > maxLen+len(textEllipsis) { + return textLine(prefix + formatString(s[:maxLen]) + string(textEllipsis)) + } + return textLine(prefix + formatString(s)) +} + // formatMapKey formats v as if it were a map key. // The result is guaranteed to be a single line. -func formatMapKey(v reflect.Value) string { +func formatMapKey(v reflect.Value, disambiguate bool, ptrs *pointerReferences) string { var opts formatOptions + opts.DiffMode = diffIdentical opts.TypeMode = elideType - opts.ShallowPointers = true - s := opts.FormatValue(v, false, visitedPointers{}).String() + opts.PrintAddresses = disambiguate + opts.AvoidStringer = disambiguate + opts.QualifiedNames = disambiguate + s := opts.FormatValue(v, reflect.Map, ptrs).String() return strings.TrimSpace(s) } @@ -230,7 +369,7 @@ func formatString(s string) string { rawInvalid := func(r rune) bool { return r == '`' || r == '\n' || !(unicode.IsPrint(r) || r == '\t') } - if strings.IndexFunc(s, rawInvalid) < 0 { + if utf8.ValidString(s) && strings.IndexFunc(s, rawInvalid) < 0 { return "`" + s + "`" } return qs @@ -259,23 +398,3 @@ func formatHex(u uint64) string { } return fmt.Sprintf(f, u) } - -// formatPointer prints the address of the pointer. -func formatPointer(v reflect.Value) string { - p := v.Pointer() - if flags.Deterministic { - p = 0xdeadf00f // Only used for stable testing purposes - } - return fmt.Sprintf("⟪0x%x⟫", p) -} - -type visitedPointers map[value.Pointer]struct{} - -// Visit inserts pointer v into the visited map and reports whether it had -// already been visited before. -func (m visitedPointers) Visit(v reflect.Value) bool { - p := value.PointerOf(v) - _, visited := m[p] - m[p] = struct{}{} - return visited -} diff --git a/vendor/github.com/google/go-cmp/cmp/report_slices.go b/vendor/github.com/google/go-cmp/cmp/report_slices.go index 6f0847e6..35315dad 100644 --- a/vendor/github.com/google/go-cmp/cmp/report_slices.go +++ b/vendor/github.com/google/go-cmp/cmp/report_slices.go @@ -8,6 +8,7 @@ import ( "bytes" "fmt" "reflect" + "strconv" "strings" "unicode" "unicode/utf8" @@ -23,11 +24,25 @@ func (opts formatOptions) CanFormatDiffSlice(v *valueNode) bool { return false // Must be formatting in diff mode case v.NumDiff == 0: return false // No differences detected - case v.NumIgnored+v.NumCompared+v.NumTransformed > 0: - // TODO: Handle the case where someone uses bytes.Equal on a large slice. - return false // Some custom option was used to determined equality case !v.ValueX.IsValid() || !v.ValueY.IsValid(): return false // Both values must be valid + case v.Type.Kind() == reflect.Slice && (v.ValueX.Len() == 0 || v.ValueY.Len() == 0): + return false // Both slice values have to be non-empty + case v.NumIgnored > 0: + return false // Some ignore option was used + case v.NumTransformed > 0: + return false // Some transform option was used + case v.NumCompared > 1: + return false // More than one comparison was used + case v.NumCompared == 1 && v.Type.Name() != "": + // The need for cmp to check applicability of options on every element + // in a slice is a significant performance detriment for large []byte. + // The workaround is to specify Comparer(bytes.Equal), + // which enables cmp to compare []byte more efficiently. + // If they differ, we still want to provide batched diffing. + // The logic disallows named types since they tend to have their own + // String method, with nicer formatting than what this provides. + return false } switch t := v.Type; t.Kind() { @@ -82,7 +97,7 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode { } if isText || isBinary { var numLines, lastLineIdx, maxLineLen int - isBinary = false + isBinary = !utf8.ValidString(sx) || !utf8.ValidString(sy) for i, r := range sx + sy { if !(unicode.IsPrint(r) || unicode.IsSpace(r)) || r == utf8.RuneError { isBinary = true @@ -97,7 +112,7 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode { } } isText = !isBinary - isLinedText = isText && numLines >= 4 && maxLineLen <= 256 + isLinedText = isText && numLines >= 4 && maxLineLen <= 1024 } // Format the string into printable records. @@ -117,6 +132,83 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode { }, ) delim = "\n" + + // If possible, use a custom triple-quote (""") syntax for printing + // differences in a string literal. This format is more readable, + // but has edge-cases where differences are visually indistinguishable. + // This format is avoided under the following conditions: + // • A line starts with `"""` + // • A line starts with "..." + // • A line contains non-printable characters + // • Adjacent different lines differ only by whitespace + // + // For example: + // """ + // ... // 3 identical lines + // foo + // bar + // - baz + // + BAZ + // """ + isTripleQuoted := true + prevRemoveLines := map[string]bool{} + prevInsertLines := map[string]bool{} + var list2 textList + list2 = append(list2, textRecord{Value: textLine(`"""`), ElideComma: true}) + for _, r := range list { + if !r.Value.Equal(textEllipsis) { + line, _ := strconv.Unquote(string(r.Value.(textLine))) + line = strings.TrimPrefix(strings.TrimSuffix(line, "\r"), "\r") // trim leading/trailing carriage returns for legacy Windows endline support + normLine := strings.Map(func(r rune) rune { + if unicode.IsSpace(r) { + return -1 // drop whitespace to avoid visually indistinguishable output + } + return r + }, line) + isPrintable := func(r rune) bool { + return unicode.IsPrint(r) || r == '\t' // specially treat tab as printable + } + isTripleQuoted = !strings.HasPrefix(line, `"""`) && !strings.HasPrefix(line, "...") && strings.TrimFunc(line, isPrintable) == "" + switch r.Diff { + case diffRemoved: + isTripleQuoted = isTripleQuoted && !prevInsertLines[normLine] + prevRemoveLines[normLine] = true + case diffInserted: + isTripleQuoted = isTripleQuoted && !prevRemoveLines[normLine] + prevInsertLines[normLine] = true + } + if !isTripleQuoted { + break + } + r.Value = textLine(line) + r.ElideComma = true + } + if !(r.Diff == diffRemoved || r.Diff == diffInserted) { // start a new non-adjacent difference group + prevRemoveLines = map[string]bool{} + prevInsertLines = map[string]bool{} + } + list2 = append(list2, r) + } + if r := list2[len(list2)-1]; r.Diff == diffIdentical && len(r.Value.(textLine)) == 0 { + list2 = list2[:len(list2)-1] // elide single empty line at the end + } + list2 = append(list2, textRecord{Value: textLine(`"""`), ElideComma: true}) + if isTripleQuoted { + var out textNode = &textWrap{Prefix: "(", Value: list2, Suffix: ")"} + switch t.Kind() { + case reflect.String: + if t != reflect.TypeOf(string("")) { + out = opts.FormatType(t, out) + } + case reflect.Slice: + // Always emit type for slices since the triple-quote syntax + // looks like a string (not a slice). + opts = opts.WithTypeMode(emitType) + out = opts.FormatType(t, out) + } + return out + } + // If the text appears to be single-lined text, // then perform differencing in approximately fixed-sized chunks. // The output is printed as quoted strings. @@ -129,6 +221,7 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode { }, ) delim = "" + // If the text appears to be binary data, // then perform differencing in approximately fixed-sized chunks. // The output is inspired by hexdump. @@ -145,6 +238,7 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode { return textRecord{Diff: d, Value: textLine(s), Comment: comment} }, ) + // For all other slices of primitive types, // then perform differencing in approximately fixed-sized chunks. // The size of each chunk depends on the width of the element kind. @@ -187,7 +281,7 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode { } // Wrap the output with appropriate type information. - var out textNode = textWrap{"{", list, "}"} + var out textNode = &textWrap{Prefix: "{", Value: list, Suffix: "}"} if !isText { // The "{...}" byte-sequence literal is not valid Go syntax for strings. // Emit the type for extra clarity (e.g. "string{...}"). @@ -198,12 +292,12 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode { } switch t.Kind() { case reflect.String: - out = textWrap{"strings.Join(", out, fmt.Sprintf(", %q)", delim)} + out = &textWrap{Prefix: "strings.Join(", Value: out, Suffix: fmt.Sprintf(", %q)", delim)} if t != reflect.TypeOf(string("")) { out = opts.FormatType(t, out) } case reflect.Slice: - out = textWrap{"bytes.Join(", out, fmt.Sprintf(", %q)", delim)} + out = &textWrap{Prefix: "bytes.Join(", Value: out, Suffix: fmt.Sprintf(", %q)", delim)} if t != reflect.TypeOf([]byte(nil)) { out = opts.FormatType(t, out) } @@ -244,9 +338,22 @@ func (opts formatOptions) formatDiffSlice( return n0 - v.Len() } + var numDiffs int + maxLen := -1 + if opts.LimitVerbosity { + maxLen = (1 << opts.verbosity()) << 2 // 4, 8, 16, 32, 64, etc... + opts.VerbosityLevel-- + } + groups := coalesceAdjacentEdits(name, es) groups = coalesceInterveningIdentical(groups, chunkSize/4) + maxGroup := diffStats{Name: name} for i, ds := range groups { + if maxLen >= 0 && numDiffs >= maxLen { + maxGroup = maxGroup.Append(ds) + continue + } + // Print equal. if ds.NumDiff() == 0 { // Compute the number of leading and trailing equal bytes to print. @@ -275,12 +382,18 @@ func (opts formatOptions) formatDiffSlice( } // Print unequal. + len0 := len(list) nx := appendChunks(vx.Slice(0, ds.NumIdentical+ds.NumRemoved+ds.NumModified), diffRemoved) vx = vx.Slice(nx, vx.Len()) ny := appendChunks(vy.Slice(0, ds.NumIdentical+ds.NumInserted+ds.NumModified), diffInserted) vy = vy.Slice(ny, vy.Len()) + numDiffs += len(list) - len0 + } + if maxGroup.IsZero() { + assert(vx.Len() == 0 && vy.Len() == 0) + } else { + list.AppendEllipsis(maxGroup) } - assert(vx.Len() == 0 && vy.Len() == 0) return list } diff --git a/vendor/github.com/google/go-cmp/cmp/report_text.go b/vendor/github.com/google/go-cmp/cmp/report_text.go index 8b8fcab7..8b12c05c 100644 --- a/vendor/github.com/google/go-cmp/cmp/report_text.go +++ b/vendor/github.com/google/go-cmp/cmp/report_text.go @@ -10,12 +10,15 @@ import ( "math/rand" "strings" "time" + "unicode/utf8" "github.com/google/go-cmp/cmp/internal/flags" ) var randBool = rand.New(rand.NewSource(time.Now().Unix())).Intn(2) == 0 +const maxColumnLength = 80 + type indentMode int func (n indentMode) appendIndent(b []byte, d diffMode) []byte { @@ -91,21 +94,22 @@ type textNode interface { // textWrap is a wrapper that concatenates a prefix and/or a suffix // to the underlying node. type textWrap struct { - Prefix string // e.g., "bytes.Buffer{" - Value textNode // textWrap | textList | textLine - Suffix string // e.g., "}" + Prefix string // e.g., "bytes.Buffer{" + Value textNode // textWrap | textList | textLine + Suffix string // e.g., "}" + Metadata interface{} // arbitrary metadata; has no effect on formatting } -func (s textWrap) Len() int { +func (s *textWrap) Len() int { return len(s.Prefix) + s.Value.Len() + len(s.Suffix) } -func (s1 textWrap) Equal(s2 textNode) bool { - if s2, ok := s2.(textWrap); ok { +func (s1 *textWrap) Equal(s2 textNode) bool { + if s2, ok := s2.(*textWrap); ok { return s1.Prefix == s2.Prefix && s1.Value.Equal(s2.Value) && s1.Suffix == s2.Suffix } return false } -func (s textWrap) String() string { +func (s *textWrap) String() string { var d diffMode var n indentMode _, s2 := s.formatCompactTo(nil, d) @@ -114,7 +118,7 @@ func (s textWrap) String() string { b = append(b, '\n') // Trailing newline return string(b) } -func (s textWrap) formatCompactTo(b []byte, d diffMode) ([]byte, textNode) { +func (s *textWrap) formatCompactTo(b []byte, d diffMode) ([]byte, textNode) { n0 := len(b) // Original buffer length b = append(b, s.Prefix...) b, s.Value = s.Value.formatCompactTo(b, d) @@ -124,7 +128,7 @@ func (s textWrap) formatCompactTo(b []byte, d diffMode) ([]byte, textNode) { } return b, s } -func (s textWrap) formatExpandedTo(b []byte, d diffMode, n indentMode) []byte { +func (s *textWrap) formatExpandedTo(b []byte, d diffMode, n indentMode) []byte { b = append(b, s.Prefix...) b = s.Value.formatExpandedTo(b, d, n) b = append(b, s.Suffix...) @@ -136,22 +140,23 @@ func (s textWrap) formatExpandedTo(b []byte, d diffMode, n indentMode) []byte { // of the textList.formatCompactTo method. type textList []textRecord type textRecord struct { - Diff diffMode // e.g., 0 or '-' or '+' - Key string // e.g., "MyField" - Value textNode // textWrap | textLine - Comment fmt.Stringer // e.g., "6 identical fields" + Diff diffMode // e.g., 0 or '-' or '+' + Key string // e.g., "MyField" + Value textNode // textWrap | textLine + ElideComma bool // avoid trailing comma + Comment fmt.Stringer // e.g., "6 identical fields" } // AppendEllipsis appends a new ellipsis node to the list if none already // exists at the end. If cs is non-zero it coalesces the statistics with the // previous diffStats. func (s *textList) AppendEllipsis(ds diffStats) { - hasStats := ds != diffStats{} + hasStats := !ds.IsZero() if len(*s) == 0 || !(*s)[len(*s)-1].Value.Equal(textEllipsis) { if hasStats { - *s = append(*s, textRecord{Value: textEllipsis, Comment: ds}) + *s = append(*s, textRecord{Value: textEllipsis, ElideComma: true, Comment: ds}) } else { - *s = append(*s, textRecord{Value: textEllipsis}) + *s = append(*s, textRecord{Value: textEllipsis, ElideComma: true}) } return } @@ -191,7 +196,7 @@ func (s1 textList) Equal(s2 textNode) bool { } func (s textList) String() string { - return textWrap{"{", s, "}"}.String() + return (&textWrap{Prefix: "{", Value: s, Suffix: "}"}).String() } func (s textList) formatCompactTo(b []byte, d diffMode) ([]byte, textNode) { @@ -221,7 +226,7 @@ func (s textList) formatCompactTo(b []byte, d diffMode) ([]byte, textNode) { } // Force multi-lined output when printing a removed/inserted node that // is sufficiently long. - if (d == diffInserted || d == diffRemoved) && len(b[n0:]) > 80 { + if (d == diffInserted || d == diffRemoved) && len(b[n0:]) > maxColumnLength { multiLine = true } if !multiLine { @@ -236,16 +241,50 @@ func (s textList) formatExpandedTo(b []byte, d diffMode, n indentMode) []byte { _, isLine := r.Value.(textLine) return r.Key == "" || !isLine }, - func(r textRecord) int { return len(r.Key) }, + func(r textRecord) int { return utf8.RuneCountInString(r.Key) }, ) alignValueLens := s.alignLens( func(r textRecord) bool { _, isLine := r.Value.(textLine) return !isLine || r.Value.Equal(textEllipsis) || r.Comment == nil }, - func(r textRecord) int { return len(r.Value.(textLine)) }, + func(r textRecord) int { return utf8.RuneCount(r.Value.(textLine)) }, ) + // Format lists of simple lists in a batched form. + // If the list is sequence of only textLine values, + // then batch multiple values on a single line. + var isSimple bool + for _, r := range s { + _, isLine := r.Value.(textLine) + isSimple = r.Diff == 0 && r.Key == "" && isLine && r.Comment == nil + if !isSimple { + break + } + } + if isSimple { + n++ + var batch []byte + emitBatch := func() { + if len(batch) > 0 { + b = n.appendIndent(append(b, '\n'), d) + b = append(b, bytes.TrimRight(batch, " ")...) + batch = batch[:0] + } + } + for _, r := range s { + line := r.Value.(textLine) + if len(batch)+len(line)+len(", ") > maxColumnLength { + emitBatch() + } + batch = append(batch, line...) + batch = append(batch, ", "...) + } + emitBatch() + n-- + return n.appendIndent(append(b, '\n'), d) + } + // Format the list as a multi-lined output. n++ for i, r := range s { @@ -256,7 +295,7 @@ func (s textList) formatExpandedTo(b []byte, d diffMode, n indentMode) []byte { b = alignKeyLens[i].appendChar(b, ' ') b = r.Value.formatExpandedTo(b, d|r.Diff, n) - if !r.Value.Equal(textEllipsis) { + if !r.ElideComma { b = append(b, ',') } b = alignValueLens[i].appendChar(b, ' ') @@ -332,6 +371,11 @@ type diffStats struct { NumModified int } +func (s diffStats) IsZero() bool { + s.Name = "" + return s == diffStats{} +} + func (s diffStats) NumDiff() int { return s.NumRemoved + s.NumInserted + s.NumModified } diff --git a/vendor/github.com/google/uuid/README.md b/vendor/github.com/google/uuid/README.md index 9d92c11f..f765a46f 100644 --- a/vendor/github.com/google/uuid/README.md +++ b/vendor/github.com/google/uuid/README.md @@ -16,4 +16,4 @@ change is the ability to represent an invalid UUID (vs a NIL UUID). Full `go doc` style documentation for the package can be viewed online without installing this package by using the GoDoc site here: -http://godoc.org/github.com/google/uuid +http://pkg.go.dev/github.com/google/uuid diff --git a/vendor/github.com/google/uuid/marshal.go b/vendor/github.com/google/uuid/marshal.go index 7f9e0c6c..14bd3407 100644 --- a/vendor/github.com/google/uuid/marshal.go +++ b/vendor/github.com/google/uuid/marshal.go @@ -16,10 +16,11 @@ func (uuid UUID) MarshalText() ([]byte, error) { // UnmarshalText implements encoding.TextUnmarshaler. func (uuid *UUID) UnmarshalText(data []byte) error { id, err := ParseBytes(data) - if err == nil { - *uuid = id + if err != nil { + return err } - return err + *uuid = id + return nil } // MarshalBinary implements encoding.BinaryMarshaler. diff --git a/vendor/github.com/google/uuid/version1.go b/vendor/github.com/google/uuid/version1.go index 199a1ac6..46310962 100644 --- a/vendor/github.com/google/uuid/version1.go +++ b/vendor/github.com/google/uuid/version1.go @@ -17,12 +17,6 @@ import ( // // In most cases, New should be used. func NewUUID() (UUID, error) { - nodeMu.Lock() - if nodeID == zeroID { - setNodeInterface("") - } - nodeMu.Unlock() - var uuid UUID now, seq, err := GetTime() if err != nil { @@ -38,7 +32,13 @@ func NewUUID() (UUID, error) { binary.BigEndian.PutUint16(uuid[4:], timeMid) binary.BigEndian.PutUint16(uuid[6:], timeHi) binary.BigEndian.PutUint16(uuid[8:], seq) + + nodeMu.Lock() + if nodeID == zeroID { + setNodeInterface("") + } copy(uuid[10:], nodeID[:]) + nodeMu.Unlock() return uuid, nil } diff --git a/vendor/github.com/google/uuid/version4.go b/vendor/github.com/google/uuid/version4.go index 84af91c9..c110465d 100644 --- a/vendor/github.com/google/uuid/version4.go +++ b/vendor/github.com/google/uuid/version4.go @@ -27,8 +27,13 @@ func New() UUID { // equivalent to the odds of creating a few tens of trillions of UUIDs in a // year and having one duplicate. func NewRandom() (UUID, error) { + return NewRandomFromReader(rander) +} + +// NewRandomFromReader returns a UUID based on bytes read from a given io.Reader. +func NewRandomFromReader(r io.Reader) (UUID, error) { var uuid UUID - _, err := io.ReadFull(rander, uuid[:]) + _, err := io.ReadFull(r, uuid[:]) if err != nil { return Nil, err } diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go b/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go index 4fd44c45..af6c0eee 100644 --- a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. All Rights Reserved. +// Copyright 2020 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ package openapi_v2 import ( "fmt" "github.com/googleapis/gnostic/compiler" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" "regexp" "strings" ) @@ -30,7 +30,7 @@ func Version() string { } // NewAdditionalPropertiesItem creates an object of type AdditionalPropertiesItem if possible, returning an error if not. -func NewAdditionalPropertiesItem(in interface{}, context *compiler.Context) (*AdditionalPropertiesItem, error) { +func NewAdditionalPropertiesItem(in *yaml.Node, context *compiler.Context) (*AdditionalPropertiesItem, error) { errors := make([]error, 0) x := &AdditionalPropertiesItem{} matched := false @@ -49,9 +49,10 @@ func NewAdditionalPropertiesItem(in interface{}, context *compiler.Context) (*Ad } } // bool boolean = 2; - boolValue, ok := in.(bool) + boolValue, ok := compiler.BoolForScalarNode(in) if ok { x.Oneof = &AdditionalPropertiesItem_Boolean{Boolean: boolValue} + matched = true } if matched { // since the oneof matched one of its possibilities, discard any matching errors @@ -61,16 +62,16 @@ func NewAdditionalPropertiesItem(in interface{}, context *compiler.Context) (*Ad } // NewAny creates an object of type Any if possible, returning an error if not. -func NewAny(in interface{}, context *compiler.Context) (*Any, error) { +func NewAny(in *yaml.Node, context *compiler.Context) (*Any, error) { errors := make([]error, 0) x := &Any{} - bytes, _ := yaml.Marshal(in) + bytes := compiler.Marshal(in) x.Yaml = string(bytes) return x, compiler.NewErrorGroupOrNil(errors) } // NewApiKeySecurity creates an object of type ApiKeySecurity if possible, returning an error if not. -func NewApiKeySecurity(in interface{}, context *compiler.Context) (*ApiKeySecurity, error) { +func NewApiKeySecurity(in *yaml.Node, context *compiler.Context) (*ApiKeySecurity, error) { errors := make([]error, 0) x := &ApiKeySecurity{} m, ok := compiler.UnpackMap(in) @@ -94,68 +95,68 @@ func NewApiKeySecurity(in interface{}, context *compiler.Context) (*ApiKeySecuri // string type = 1; v1 := compiler.MapValueForKey(m, "type") if v1 != nil { - x.Type, ok = v1.(string) + x.Type, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [apiKey] if ok && !compiler.StringArrayContainsValue([]string{"apiKey"}, x.Type) { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string name = 2; v2 := compiler.MapValueForKey(m, "name") if v2 != nil { - x.Name, ok = v2.(string) + x.Name, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } // string in = 3; v3 := compiler.MapValueForKey(m, "in") if v3 != nil { - x.In, ok = v3.(string) + x.In, ok = compiler.StringForScalarNode(v3) if !ok { - message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v3, v3) + message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v3)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [header query] if ok && !compiler.StringArrayContainsValue([]string{"header", "query"}, x.In) { - message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v3, v3) + message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v3)) errors = append(errors, compiler.NewError(context, message)) } } // string description = 4; v4 := compiler.MapValueForKey(m, "description") if v4 != nil { - x.Description, ok = v4.(string) + x.Description, ok = compiler.StringForScalarNode(v4) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } } // repeated NamedAny vendor_extension = 5; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -175,7 +176,7 @@ func NewApiKeySecurity(in interface{}, context *compiler.Context) (*ApiKeySecuri } // NewBasicAuthenticationSecurity creates an object of type BasicAuthenticationSecurity if possible, returning an error if not. -func NewBasicAuthenticationSecurity(in interface{}, context *compiler.Context) (*BasicAuthenticationSecurity, error) { +func NewBasicAuthenticationSecurity(in *yaml.Node, context *compiler.Context) (*BasicAuthenticationSecurity, error) { errors := make([]error, 0) x := &BasicAuthenticationSecurity{} m, ok := compiler.UnpackMap(in) @@ -199,44 +200,44 @@ func NewBasicAuthenticationSecurity(in interface{}, context *compiler.Context) ( // string type = 1; v1 := compiler.MapValueForKey(m, "type") if v1 != nil { - x.Type, ok = v1.(string) + x.Type, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [basic] if ok && !compiler.StringArrayContainsValue([]string{"basic"}, x.Type) { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string description = 2; v2 := compiler.MapValueForKey(m, "description") if v2 != nil { - x.Description, ok = v2.(string) + x.Description, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } // repeated NamedAny vendor_extension = 3; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -256,7 +257,7 @@ func NewBasicAuthenticationSecurity(in interface{}, context *compiler.Context) ( } // NewBodyParameter creates an object of type BodyParameter if possible, returning an error if not. -func NewBodyParameter(in interface{}, context *compiler.Context) (*BodyParameter, error) { +func NewBodyParameter(in *yaml.Node, context *compiler.Context) (*BodyParameter, error) { errors := make([]error, 0) x := &BodyParameter{} m, ok := compiler.UnpackMap(in) @@ -280,42 +281,42 @@ func NewBodyParameter(in interface{}, context *compiler.Context) (*BodyParameter // string description = 1; v1 := compiler.MapValueForKey(m, "description") if v1 != nil { - x.Description, ok = v1.(string) + x.Description, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string name = 2; v2 := compiler.MapValueForKey(m, "name") if v2 != nil { - x.Name, ok = v2.(string) + x.Name, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } // string in = 3; v3 := compiler.MapValueForKey(m, "in") if v3 != nil { - x.In, ok = v3.(string) + x.In, ok = compiler.StringForScalarNode(v3) if !ok { - message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v3, v3) + message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v3)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [body] if ok && !compiler.StringArrayContainsValue([]string{"body"}, x.In) { - message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v3, v3) + message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v3)) errors = append(errors, compiler.NewError(context, message)) } } // bool required = 4; v4 := compiler.MapValueForKey(m, "required") if v4 != nil { - x.Required, ok = v4.(bool) + x.Required, ok = compiler.BoolForScalarNode(v4) if !ok { - message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } } @@ -331,20 +332,20 @@ func NewBodyParameter(in interface{}, context *compiler.Context) (*BodyParameter // repeated NamedAny vendor_extension = 6; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -364,7 +365,7 @@ func NewBodyParameter(in interface{}, context *compiler.Context) (*BodyParameter } // NewContact creates an object of type Contact if possible, returning an error if not. -func NewContact(in interface{}, context *compiler.Context) (*Contact, error) { +func NewContact(in *yaml.Node, context *compiler.Context) (*Contact, error) { errors := make([]error, 0) x := &Contact{} m, ok := compiler.UnpackMap(in) @@ -382,47 +383,47 @@ func NewContact(in interface{}, context *compiler.Context) (*Contact, error) { // string name = 1; v1 := compiler.MapValueForKey(m, "name") if v1 != nil { - x.Name, ok = v1.(string) + x.Name, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string url = 2; v2 := compiler.MapValueForKey(m, "url") if v2 != nil { - x.Url, ok = v2.(string) + x.Url, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for url: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for url: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } // string email = 3; v3 := compiler.MapValueForKey(m, "email") if v3 != nil { - x.Email, ok = v3.(string) + x.Email, ok = compiler.StringForScalarNode(v3) if !ok { - message := fmt.Sprintf("has unexpected value for email: %+v (%T)", v3, v3) + message := fmt.Sprintf("has unexpected value for email: %s", compiler.Display(v3)) errors = append(errors, compiler.NewError(context, message)) } } // repeated NamedAny vendor_extension = 4; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -442,7 +443,7 @@ func NewContact(in interface{}, context *compiler.Context) (*Contact, error) { } // NewDefault creates an object of type Default if possible, returning an error if not. -func NewDefault(in interface{}, context *compiler.Context) (*Default, error) { +func NewDefault(in *yaml.Node, context *compiler.Context) (*Default, error) { errors := make([]error, 0) x := &Default{} m, ok := compiler.UnpackMap(in) @@ -453,19 +454,19 @@ func NewDefault(in interface{}, context *compiler.Context) (*Default, error) { // repeated NamedAny additional_properties = 1; // MAP: Any x.AdditionalProperties = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -484,7 +485,7 @@ func NewDefault(in interface{}, context *compiler.Context) (*Default, error) { } // NewDefinitions creates an object of type Definitions if possible, returning an error if not. -func NewDefinitions(in interface{}, context *compiler.Context) (*Definitions, error) { +func NewDefinitions(in *yaml.Node, context *compiler.Context) (*Definitions, error) { errors := make([]error, 0) x := &Definitions{} m, ok := compiler.UnpackMap(in) @@ -495,10 +496,10 @@ func NewDefinitions(in interface{}, context *compiler.Context) (*Definitions, er // repeated NamedSchema additional_properties = 1; // MAP: Schema x.AdditionalProperties = make([]*NamedSchema, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] pair := &NamedSchema{} pair.Name = k var err error @@ -514,7 +515,7 @@ func NewDefinitions(in interface{}, context *compiler.Context) (*Definitions, er } // NewDocument creates an object of type Document if possible, returning an error if not. -func NewDocument(in interface{}, context *compiler.Context) (*Document, error) { +func NewDocument(in *yaml.Node, context *compiler.Context) (*Document, error) { errors := make([]error, 0) x := &Document{} m, ok := compiler.UnpackMap(in) @@ -538,15 +539,15 @@ func NewDocument(in interface{}, context *compiler.Context) (*Document, error) { // string swagger = 1; v1 := compiler.MapValueForKey(m, "swagger") if v1 != nil { - x.Swagger, ok = v1.(string) + x.Swagger, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for swagger: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for swagger: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [2.0] if ok && !compiler.StringArrayContainsValue([]string{"2.0"}, x.Swagger) { - message := fmt.Sprintf("has unexpected value for swagger: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for swagger: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } @@ -562,57 +563,57 @@ func NewDocument(in interface{}, context *compiler.Context) (*Document, error) { // string host = 3; v3 := compiler.MapValueForKey(m, "host") if v3 != nil { - x.Host, ok = v3.(string) + x.Host, ok = compiler.StringForScalarNode(v3) if !ok { - message := fmt.Sprintf("has unexpected value for host: %+v (%T)", v3, v3) + message := fmt.Sprintf("has unexpected value for host: %s", compiler.Display(v3)) errors = append(errors, compiler.NewError(context, message)) } } // string base_path = 4; v4 := compiler.MapValueForKey(m, "basePath") if v4 != nil { - x.BasePath, ok = v4.(string) + x.BasePath, ok = compiler.StringForScalarNode(v4) if !ok { - message := fmt.Sprintf("has unexpected value for basePath: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for basePath: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } } // repeated string schemes = 5; v5 := compiler.MapValueForKey(m, "schemes") if v5 != nil { - v, ok := v5.([]interface{}) + v, ok := compiler.SequenceNodeForNode(v5) if ok { - x.Schemes = compiler.ConvertInterfaceArrayToStringArray(v) + x.Schemes = compiler.StringArrayForSequenceNode(v) } else { - message := fmt.Sprintf("has unexpected value for schemes: %+v (%T)", v5, v5) + message := fmt.Sprintf("has unexpected value for schemes: %s", compiler.Display(v5)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [http https ws wss] if ok && !compiler.StringArrayContainsValues([]string{"http", "https", "ws", "wss"}, x.Schemes) { - message := fmt.Sprintf("has unexpected value for schemes: %+v", v5) + message := fmt.Sprintf("has unexpected value for schemes: %s", compiler.Display(v5)) errors = append(errors, compiler.NewError(context, message)) } } // repeated string consumes = 6; v6 := compiler.MapValueForKey(m, "consumes") if v6 != nil { - v, ok := v6.([]interface{}) + v, ok := compiler.SequenceNodeForNode(v6) if ok { - x.Consumes = compiler.ConvertInterfaceArrayToStringArray(v) + x.Consumes = compiler.StringArrayForSequenceNode(v) } else { - message := fmt.Sprintf("has unexpected value for consumes: %+v (%T)", v6, v6) + message := fmt.Sprintf("has unexpected value for consumes: %s", compiler.Display(v6)) errors = append(errors, compiler.NewError(context, message)) } } // repeated string produces = 7; v7 := compiler.MapValueForKey(m, "produces") if v7 != nil { - v, ok := v7.([]interface{}) + v, ok := compiler.SequenceNodeForNode(v7) if ok { - x.Produces = compiler.ConvertInterfaceArrayToStringArray(v) + x.Produces = compiler.StringArrayForSequenceNode(v) } else { - message := fmt.Sprintf("has unexpected value for produces: %+v (%T)", v7, v7) + message := fmt.Sprintf("has unexpected value for produces: %s", compiler.Display(v7)) errors = append(errors, compiler.NewError(context, message)) } } @@ -657,9 +658,9 @@ func NewDocument(in interface{}, context *compiler.Context) (*Document, error) { if v12 != nil { // repeated SecurityRequirement x.Security = make([]*SecurityRequirement, 0) - a, ok := v12.([]interface{}) + a, ok := compiler.SequenceNodeForNode(v12) if ok { - for _, item := range a { + for _, item := range a.Content { y, err := NewSecurityRequirement(item, compiler.NewContext("security", context)) if err != nil { errors = append(errors, err) @@ -682,9 +683,9 @@ func NewDocument(in interface{}, context *compiler.Context) (*Document, error) { if v14 != nil { // repeated Tag x.Tags = make([]*Tag, 0) - a, ok := v14.([]interface{}) + a, ok := compiler.SequenceNodeForNode(v14) if ok { - for _, item := range a { + for _, item := range a.Content { y, err := NewTag(item, compiler.NewContext("tags", context)) if err != nil { errors = append(errors, err) @@ -705,20 +706,20 @@ func NewDocument(in interface{}, context *compiler.Context) (*Document, error) { // repeated NamedAny vendor_extension = 16; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -738,7 +739,7 @@ func NewDocument(in interface{}, context *compiler.Context) (*Document, error) { } // NewExamples creates an object of type Examples if possible, returning an error if not. -func NewExamples(in interface{}, context *compiler.Context) (*Examples, error) { +func NewExamples(in *yaml.Node, context *compiler.Context) (*Examples, error) { errors := make([]error, 0) x := &Examples{} m, ok := compiler.UnpackMap(in) @@ -749,19 +750,19 @@ func NewExamples(in interface{}, context *compiler.Context) (*Examples, error) { // repeated NamedAny additional_properties = 1; // MAP: Any x.AdditionalProperties = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -780,7 +781,7 @@ func NewExamples(in interface{}, context *compiler.Context) (*Examples, error) { } // NewExternalDocs creates an object of type ExternalDocs if possible, returning an error if not. -func NewExternalDocs(in interface{}, context *compiler.Context) (*ExternalDocs, error) { +func NewExternalDocs(in *yaml.Node, context *compiler.Context) (*ExternalDocs, error) { errors := make([]error, 0) x := &ExternalDocs{} m, ok := compiler.UnpackMap(in) @@ -804,38 +805,38 @@ func NewExternalDocs(in interface{}, context *compiler.Context) (*ExternalDocs, // string description = 1; v1 := compiler.MapValueForKey(m, "description") if v1 != nil { - x.Description, ok = v1.(string) + x.Description, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string url = 2; v2 := compiler.MapValueForKey(m, "url") if v2 != nil { - x.Url, ok = v2.(string) + x.Url, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for url: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for url: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } // repeated NamedAny vendor_extension = 3; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -855,7 +856,7 @@ func NewExternalDocs(in interface{}, context *compiler.Context) (*ExternalDocs, } // NewFileSchema creates an object of type FileSchema if possible, returning an error if not. -func NewFileSchema(in interface{}, context *compiler.Context) (*FileSchema, error) { +func NewFileSchema(in *yaml.Node, context *compiler.Context) (*FileSchema, error) { errors := make([]error, 0) x := &FileSchema{} m, ok := compiler.UnpackMap(in) @@ -879,27 +880,27 @@ func NewFileSchema(in interface{}, context *compiler.Context) (*FileSchema, erro // string format = 1; v1 := compiler.MapValueForKey(m, "format") if v1 != nil { - x.Format, ok = v1.(string) + x.Format, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string title = 2; v2 := compiler.MapValueForKey(m, "title") if v2 != nil { - x.Title, ok = v2.(string) + x.Title, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for title: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for title: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } // string description = 3; v3 := compiler.MapValueForKey(m, "description") if v3 != nil { - x.Description, ok = v3.(string) + x.Description, ok = compiler.StringForScalarNode(v3) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3)) errors = append(errors, compiler.NewError(context, message)) } } @@ -915,35 +916,35 @@ func NewFileSchema(in interface{}, context *compiler.Context) (*FileSchema, erro // repeated string required = 5; v5 := compiler.MapValueForKey(m, "required") if v5 != nil { - v, ok := v5.([]interface{}) + v, ok := compiler.SequenceNodeForNode(v5) if ok { - x.Required = compiler.ConvertInterfaceArrayToStringArray(v) + x.Required = compiler.StringArrayForSequenceNode(v) } else { - message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v5, v5) + message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v5)) errors = append(errors, compiler.NewError(context, message)) } } // string type = 6; v6 := compiler.MapValueForKey(m, "type") if v6 != nil { - x.Type, ok = v6.(string) + x.Type, ok = compiler.StringForScalarNode(v6) if !ok { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v6)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [file] if ok && !compiler.StringArrayContainsValue([]string{"file"}, x.Type) { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v6)) errors = append(errors, compiler.NewError(context, message)) } } // bool read_only = 7; v7 := compiler.MapValueForKey(m, "readOnly") if v7 != nil { - x.ReadOnly, ok = v7.(bool) + x.ReadOnly, ok = compiler.BoolForScalarNode(v7) if !ok { - message := fmt.Sprintf("has unexpected value for readOnly: %+v (%T)", v7, v7) + message := fmt.Sprintf("has unexpected value for readOnly: %s", compiler.Display(v7)) errors = append(errors, compiler.NewError(context, message)) } } @@ -968,20 +969,20 @@ func NewFileSchema(in interface{}, context *compiler.Context) (*FileSchema, erro // repeated NamedAny vendor_extension = 10; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -1001,7 +1002,7 @@ func NewFileSchema(in interface{}, context *compiler.Context) (*FileSchema, erro } // NewFormDataParameterSubSchema creates an object of type FormDataParameterSubSchema if possible, returning an error if not. -func NewFormDataParameterSubSchema(in interface{}, context *compiler.Context) (*FormDataParameterSubSchema, error) { +func NewFormDataParameterSubSchema(in *yaml.Node, context *compiler.Context) (*FormDataParameterSubSchema, error) { errors := make([]error, 0) x := &FormDataParameterSubSchema{} m, ok := compiler.UnpackMap(in) @@ -1019,75 +1020,75 @@ func NewFormDataParameterSubSchema(in interface{}, context *compiler.Context) (* // bool required = 1; v1 := compiler.MapValueForKey(m, "required") if v1 != nil { - x.Required, ok = v1.(bool) + x.Required, ok = compiler.BoolForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string in = 2; v2 := compiler.MapValueForKey(m, "in") if v2 != nil { - x.In, ok = v2.(string) + x.In, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [formData] if ok && !compiler.StringArrayContainsValue([]string{"formData"}, x.In) { - message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } // string description = 3; v3 := compiler.MapValueForKey(m, "description") if v3 != nil { - x.Description, ok = v3.(string) + x.Description, ok = compiler.StringForScalarNode(v3) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3)) errors = append(errors, compiler.NewError(context, message)) } } // string name = 4; v4 := compiler.MapValueForKey(m, "name") if v4 != nil { - x.Name, ok = v4.(string) + x.Name, ok = compiler.StringForScalarNode(v4) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } } // bool allow_empty_value = 5; v5 := compiler.MapValueForKey(m, "allowEmptyValue") if v5 != nil { - x.AllowEmptyValue, ok = v5.(bool) + x.AllowEmptyValue, ok = compiler.BoolForScalarNode(v5) if !ok { - message := fmt.Sprintf("has unexpected value for allowEmptyValue: %+v (%T)", v5, v5) + message := fmt.Sprintf("has unexpected value for allowEmptyValue: %s", compiler.Display(v5)) errors = append(errors, compiler.NewError(context, message)) } } // string type = 6; v6 := compiler.MapValueForKey(m, "type") if v6 != nil { - x.Type, ok = v6.(string) + x.Type, ok = compiler.StringForScalarNode(v6) if !ok { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v6)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [string number boolean integer array file] if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "boolean", "integer", "array", "file"}, x.Type) { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v6)) errors = append(errors, compiler.NewError(context, message)) } } // string format = 7; v7 := compiler.MapValueForKey(m, "format") if v7 != nil { - x.Format, ok = v7.(string) + x.Format, ok = compiler.StringForScalarNode(v7) if !ok { - message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v7, v7) + message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v7)) errors = append(errors, compiler.NewError(context, message)) } } @@ -1103,15 +1104,15 @@ func NewFormDataParameterSubSchema(in interface{}, context *compiler.Context) (* // string collection_format = 9; v9 := compiler.MapValueForKey(m, "collectionFormat") if v9 != nil { - x.CollectionFormat, ok = v9.(string) + x.CollectionFormat, ok = compiler.StringForScalarNode(v9) if !ok { - message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v9, v9) + message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v9)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [csv ssv tsv pipes multi] if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes", "multi"}, x.CollectionFormat) { - message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v9, v9) + message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v9)) errors = append(errors, compiler.NewError(context, message)) } } @@ -1127,126 +1128,102 @@ func NewFormDataParameterSubSchema(in interface{}, context *compiler.Context) (* // float maximum = 11; v11 := compiler.MapValueForKey(m, "maximum") if v11 != nil { - switch v11 := v11.(type) { - case float64: - x.Maximum = v11 - case float32: - x.Maximum = float64(v11) - case uint64: - x.Maximum = float64(v11) - case uint32: - x.Maximum = float64(v11) - case int64: - x.Maximum = float64(v11) - case int32: - x.Maximum = float64(v11) - case int: - x.Maximum = float64(v11) - default: - message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v11, v11) + v, ok := compiler.FloatForScalarNode(v11) + if ok { + x.Maximum = v + } else { + message := fmt.Sprintf("has unexpected value for maximum: %s", compiler.Display(v11)) errors = append(errors, compiler.NewError(context, message)) } } // bool exclusive_maximum = 12; v12 := compiler.MapValueForKey(m, "exclusiveMaximum") if v12 != nil { - x.ExclusiveMaximum, ok = v12.(bool) + x.ExclusiveMaximum, ok = compiler.BoolForScalarNode(v12) if !ok { - message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v12, v12) + message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %s", compiler.Display(v12)) errors = append(errors, compiler.NewError(context, message)) } } // float minimum = 13; v13 := compiler.MapValueForKey(m, "minimum") if v13 != nil { - switch v13 := v13.(type) { - case float64: - x.Minimum = v13 - case float32: - x.Minimum = float64(v13) - case uint64: - x.Minimum = float64(v13) - case uint32: - x.Minimum = float64(v13) - case int64: - x.Minimum = float64(v13) - case int32: - x.Minimum = float64(v13) - case int: - x.Minimum = float64(v13) - default: - message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v13, v13) + v, ok := compiler.FloatForScalarNode(v13) + if ok { + x.Minimum = v + } else { + message := fmt.Sprintf("has unexpected value for minimum: %s", compiler.Display(v13)) errors = append(errors, compiler.NewError(context, message)) } } // bool exclusive_minimum = 14; v14 := compiler.MapValueForKey(m, "exclusiveMinimum") if v14 != nil { - x.ExclusiveMinimum, ok = v14.(bool) + x.ExclusiveMinimum, ok = compiler.BoolForScalarNode(v14) if !ok { - message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v14, v14) + message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %s", compiler.Display(v14)) errors = append(errors, compiler.NewError(context, message)) } } // int64 max_length = 15; v15 := compiler.MapValueForKey(m, "maxLength") if v15 != nil { - t, ok := v15.(int) + t, ok := compiler.IntForScalarNode(v15) if ok { x.MaxLength = int64(t) } else { - message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v15, v15) + message := fmt.Sprintf("has unexpected value for maxLength: %s", compiler.Display(v15)) errors = append(errors, compiler.NewError(context, message)) } } // int64 min_length = 16; v16 := compiler.MapValueForKey(m, "minLength") if v16 != nil { - t, ok := v16.(int) + t, ok := compiler.IntForScalarNode(v16) if ok { x.MinLength = int64(t) } else { - message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v16, v16) + message := fmt.Sprintf("has unexpected value for minLength: %s", compiler.Display(v16)) errors = append(errors, compiler.NewError(context, message)) } } // string pattern = 17; v17 := compiler.MapValueForKey(m, "pattern") if v17 != nil { - x.Pattern, ok = v17.(string) + x.Pattern, ok = compiler.StringForScalarNode(v17) if !ok { - message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v17, v17) + message := fmt.Sprintf("has unexpected value for pattern: %s", compiler.Display(v17)) errors = append(errors, compiler.NewError(context, message)) } } // int64 max_items = 18; v18 := compiler.MapValueForKey(m, "maxItems") if v18 != nil { - t, ok := v18.(int) + t, ok := compiler.IntForScalarNode(v18) if ok { x.MaxItems = int64(t) } else { - message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v18, v18) + message := fmt.Sprintf("has unexpected value for maxItems: %s", compiler.Display(v18)) errors = append(errors, compiler.NewError(context, message)) } } // int64 min_items = 19; v19 := compiler.MapValueForKey(m, "minItems") if v19 != nil { - t, ok := v19.(int) + t, ok := compiler.IntForScalarNode(v19) if ok { x.MinItems = int64(t) } else { - message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v19, v19) + message := fmt.Sprintf("has unexpected value for minItems: %s", compiler.Display(v19)) errors = append(errors, compiler.NewError(context, message)) } } // bool unique_items = 20; v20 := compiler.MapValueForKey(m, "uniqueItems") if v20 != nil { - x.UniqueItems, ok = v20.(bool) + x.UniqueItems, ok = compiler.BoolForScalarNode(v20) if !ok { - message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v20, v20) + message := fmt.Sprintf("has unexpected value for uniqueItems: %s", compiler.Display(v20)) errors = append(errors, compiler.NewError(context, message)) } } @@ -1255,9 +1232,9 @@ func NewFormDataParameterSubSchema(in interface{}, context *compiler.Context) (* if v21 != nil { // repeated Any x.Enum = make([]*Any, 0) - a, ok := v21.([]interface{}) + a, ok := compiler.SequenceNodeForNode(v21) if ok { - for _, item := range a { + for _, item := range a.Content { y, err := NewAny(item, compiler.NewContext("enum", context)) if err != nil { errors = append(errors, err) @@ -1269,43 +1246,31 @@ func NewFormDataParameterSubSchema(in interface{}, context *compiler.Context) (* // float multiple_of = 22; v22 := compiler.MapValueForKey(m, "multipleOf") if v22 != nil { - switch v22 := v22.(type) { - case float64: - x.MultipleOf = v22 - case float32: - x.MultipleOf = float64(v22) - case uint64: - x.MultipleOf = float64(v22) - case uint32: - x.MultipleOf = float64(v22) - case int64: - x.MultipleOf = float64(v22) - case int32: - x.MultipleOf = float64(v22) - case int: - x.MultipleOf = float64(v22) - default: - message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v22, v22) + v, ok := compiler.FloatForScalarNode(v22) + if ok { + x.MultipleOf = v + } else { + message := fmt.Sprintf("has unexpected value for multipleOf: %s", compiler.Display(v22)) errors = append(errors, compiler.NewError(context, message)) } } // repeated NamedAny vendor_extension = 23; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -1325,7 +1290,7 @@ func NewFormDataParameterSubSchema(in interface{}, context *compiler.Context) (* } // NewHeader creates an object of type Header if possible, returning an error if not. -func NewHeader(in interface{}, context *compiler.Context) (*Header, error) { +func NewHeader(in *yaml.Node, context *compiler.Context) (*Header, error) { errors := make([]error, 0) x := &Header{} m, ok := compiler.UnpackMap(in) @@ -1349,24 +1314,24 @@ func NewHeader(in interface{}, context *compiler.Context) (*Header, error) { // string type = 1; v1 := compiler.MapValueForKey(m, "type") if v1 != nil { - x.Type, ok = v1.(string) + x.Type, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [string number integer boolean array] if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "integer", "boolean", "array"}, x.Type) { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string format = 2; v2 := compiler.MapValueForKey(m, "format") if v2 != nil { - x.Format, ok = v2.(string) + x.Format, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } @@ -1382,15 +1347,15 @@ func NewHeader(in interface{}, context *compiler.Context) (*Header, error) { // string collection_format = 4; v4 := compiler.MapValueForKey(m, "collectionFormat") if v4 != nil { - x.CollectionFormat, ok = v4.(string) + x.CollectionFormat, ok = compiler.StringForScalarNode(v4) if !ok { - message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [csv ssv tsv pipes] if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes"}, x.CollectionFormat) { - message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } } @@ -1406,126 +1371,102 @@ func NewHeader(in interface{}, context *compiler.Context) (*Header, error) { // float maximum = 6; v6 := compiler.MapValueForKey(m, "maximum") if v6 != nil { - switch v6 := v6.(type) { - case float64: - x.Maximum = v6 - case float32: - x.Maximum = float64(v6) - case uint64: - x.Maximum = float64(v6) - case uint32: - x.Maximum = float64(v6) - case int64: - x.Maximum = float64(v6) - case int32: - x.Maximum = float64(v6) - case int: - x.Maximum = float64(v6) - default: - message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v6, v6) + v, ok := compiler.FloatForScalarNode(v6) + if ok { + x.Maximum = v + } else { + message := fmt.Sprintf("has unexpected value for maximum: %s", compiler.Display(v6)) errors = append(errors, compiler.NewError(context, message)) } } // bool exclusive_maximum = 7; v7 := compiler.MapValueForKey(m, "exclusiveMaximum") if v7 != nil { - x.ExclusiveMaximum, ok = v7.(bool) + x.ExclusiveMaximum, ok = compiler.BoolForScalarNode(v7) if !ok { - message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v7, v7) + message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %s", compiler.Display(v7)) errors = append(errors, compiler.NewError(context, message)) } } // float minimum = 8; v8 := compiler.MapValueForKey(m, "minimum") if v8 != nil { - switch v8 := v8.(type) { - case float64: - x.Minimum = v8 - case float32: - x.Minimum = float64(v8) - case uint64: - x.Minimum = float64(v8) - case uint32: - x.Minimum = float64(v8) - case int64: - x.Minimum = float64(v8) - case int32: - x.Minimum = float64(v8) - case int: - x.Minimum = float64(v8) - default: - message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v8, v8) + v, ok := compiler.FloatForScalarNode(v8) + if ok { + x.Minimum = v + } else { + message := fmt.Sprintf("has unexpected value for minimum: %s", compiler.Display(v8)) errors = append(errors, compiler.NewError(context, message)) } } // bool exclusive_minimum = 9; v9 := compiler.MapValueForKey(m, "exclusiveMinimum") if v9 != nil { - x.ExclusiveMinimum, ok = v9.(bool) + x.ExclusiveMinimum, ok = compiler.BoolForScalarNode(v9) if !ok { - message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v9, v9) + message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %s", compiler.Display(v9)) errors = append(errors, compiler.NewError(context, message)) } } // int64 max_length = 10; v10 := compiler.MapValueForKey(m, "maxLength") if v10 != nil { - t, ok := v10.(int) + t, ok := compiler.IntForScalarNode(v10) if ok { x.MaxLength = int64(t) } else { - message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v10, v10) + message := fmt.Sprintf("has unexpected value for maxLength: %s", compiler.Display(v10)) errors = append(errors, compiler.NewError(context, message)) } } // int64 min_length = 11; v11 := compiler.MapValueForKey(m, "minLength") if v11 != nil { - t, ok := v11.(int) + t, ok := compiler.IntForScalarNode(v11) if ok { x.MinLength = int64(t) } else { - message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v11, v11) + message := fmt.Sprintf("has unexpected value for minLength: %s", compiler.Display(v11)) errors = append(errors, compiler.NewError(context, message)) } } // string pattern = 12; v12 := compiler.MapValueForKey(m, "pattern") if v12 != nil { - x.Pattern, ok = v12.(string) + x.Pattern, ok = compiler.StringForScalarNode(v12) if !ok { - message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v12, v12) + message := fmt.Sprintf("has unexpected value for pattern: %s", compiler.Display(v12)) errors = append(errors, compiler.NewError(context, message)) } } // int64 max_items = 13; v13 := compiler.MapValueForKey(m, "maxItems") if v13 != nil { - t, ok := v13.(int) + t, ok := compiler.IntForScalarNode(v13) if ok { x.MaxItems = int64(t) } else { - message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v13, v13) + message := fmt.Sprintf("has unexpected value for maxItems: %s", compiler.Display(v13)) errors = append(errors, compiler.NewError(context, message)) } } // int64 min_items = 14; v14 := compiler.MapValueForKey(m, "minItems") if v14 != nil { - t, ok := v14.(int) + t, ok := compiler.IntForScalarNode(v14) if ok { x.MinItems = int64(t) } else { - message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v14, v14) + message := fmt.Sprintf("has unexpected value for minItems: %s", compiler.Display(v14)) errors = append(errors, compiler.NewError(context, message)) } } // bool unique_items = 15; v15 := compiler.MapValueForKey(m, "uniqueItems") if v15 != nil { - x.UniqueItems, ok = v15.(bool) + x.UniqueItems, ok = compiler.BoolForScalarNode(v15) if !ok { - message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v15, v15) + message := fmt.Sprintf("has unexpected value for uniqueItems: %s", compiler.Display(v15)) errors = append(errors, compiler.NewError(context, message)) } } @@ -1534,9 +1475,9 @@ func NewHeader(in interface{}, context *compiler.Context) (*Header, error) { if v16 != nil { // repeated Any x.Enum = make([]*Any, 0) - a, ok := v16.([]interface{}) + a, ok := compiler.SequenceNodeForNode(v16) if ok { - for _, item := range a { + for _, item := range a.Content { y, err := NewAny(item, compiler.NewContext("enum", context)) if err != nil { errors = append(errors, err) @@ -1548,52 +1489,40 @@ func NewHeader(in interface{}, context *compiler.Context) (*Header, error) { // float multiple_of = 17; v17 := compiler.MapValueForKey(m, "multipleOf") if v17 != nil { - switch v17 := v17.(type) { - case float64: - x.MultipleOf = v17 - case float32: - x.MultipleOf = float64(v17) - case uint64: - x.MultipleOf = float64(v17) - case uint32: - x.MultipleOf = float64(v17) - case int64: - x.MultipleOf = float64(v17) - case int32: - x.MultipleOf = float64(v17) - case int: - x.MultipleOf = float64(v17) - default: - message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v17, v17) + v, ok := compiler.FloatForScalarNode(v17) + if ok { + x.MultipleOf = v + } else { + message := fmt.Sprintf("has unexpected value for multipleOf: %s", compiler.Display(v17)) errors = append(errors, compiler.NewError(context, message)) } } // string description = 18; v18 := compiler.MapValueForKey(m, "description") if v18 != nil { - x.Description, ok = v18.(string) + x.Description, ok = compiler.StringForScalarNode(v18) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v18, v18) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v18)) errors = append(errors, compiler.NewError(context, message)) } } // repeated NamedAny vendor_extension = 19; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -1613,7 +1542,7 @@ func NewHeader(in interface{}, context *compiler.Context) (*Header, error) { } // NewHeaderParameterSubSchema creates an object of type HeaderParameterSubSchema if possible, returning an error if not. -func NewHeaderParameterSubSchema(in interface{}, context *compiler.Context) (*HeaderParameterSubSchema, error) { +func NewHeaderParameterSubSchema(in *yaml.Node, context *compiler.Context) (*HeaderParameterSubSchema, error) { errors := make([]error, 0) x := &HeaderParameterSubSchema{} m, ok := compiler.UnpackMap(in) @@ -1631,66 +1560,66 @@ func NewHeaderParameterSubSchema(in interface{}, context *compiler.Context) (*He // bool required = 1; v1 := compiler.MapValueForKey(m, "required") if v1 != nil { - x.Required, ok = v1.(bool) + x.Required, ok = compiler.BoolForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string in = 2; v2 := compiler.MapValueForKey(m, "in") if v2 != nil { - x.In, ok = v2.(string) + x.In, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [header] if ok && !compiler.StringArrayContainsValue([]string{"header"}, x.In) { - message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } // string description = 3; v3 := compiler.MapValueForKey(m, "description") if v3 != nil { - x.Description, ok = v3.(string) + x.Description, ok = compiler.StringForScalarNode(v3) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3)) errors = append(errors, compiler.NewError(context, message)) } } // string name = 4; v4 := compiler.MapValueForKey(m, "name") if v4 != nil { - x.Name, ok = v4.(string) + x.Name, ok = compiler.StringForScalarNode(v4) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } } // string type = 5; v5 := compiler.MapValueForKey(m, "type") if v5 != nil { - x.Type, ok = v5.(string) + x.Type, ok = compiler.StringForScalarNode(v5) if !ok { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v5, v5) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v5)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [string number boolean integer array] if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "boolean", "integer", "array"}, x.Type) { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v5, v5) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v5)) errors = append(errors, compiler.NewError(context, message)) } } // string format = 6; v6 := compiler.MapValueForKey(m, "format") if v6 != nil { - x.Format, ok = v6.(string) + x.Format, ok = compiler.StringForScalarNode(v6) if !ok { - message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v6, v6) + message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v6)) errors = append(errors, compiler.NewError(context, message)) } } @@ -1706,15 +1635,15 @@ func NewHeaderParameterSubSchema(in interface{}, context *compiler.Context) (*He // string collection_format = 8; v8 := compiler.MapValueForKey(m, "collectionFormat") if v8 != nil { - x.CollectionFormat, ok = v8.(string) + x.CollectionFormat, ok = compiler.StringForScalarNode(v8) if !ok { - message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v8, v8) + message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v8)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [csv ssv tsv pipes] if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes"}, x.CollectionFormat) { - message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v8, v8) + message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v8)) errors = append(errors, compiler.NewError(context, message)) } } @@ -1730,126 +1659,102 @@ func NewHeaderParameterSubSchema(in interface{}, context *compiler.Context) (*He // float maximum = 10; v10 := compiler.MapValueForKey(m, "maximum") if v10 != nil { - switch v10 := v10.(type) { - case float64: - x.Maximum = v10 - case float32: - x.Maximum = float64(v10) - case uint64: - x.Maximum = float64(v10) - case uint32: - x.Maximum = float64(v10) - case int64: - x.Maximum = float64(v10) - case int32: - x.Maximum = float64(v10) - case int: - x.Maximum = float64(v10) - default: - message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v10, v10) + v, ok := compiler.FloatForScalarNode(v10) + if ok { + x.Maximum = v + } else { + message := fmt.Sprintf("has unexpected value for maximum: %s", compiler.Display(v10)) errors = append(errors, compiler.NewError(context, message)) } } // bool exclusive_maximum = 11; v11 := compiler.MapValueForKey(m, "exclusiveMaximum") if v11 != nil { - x.ExclusiveMaximum, ok = v11.(bool) + x.ExclusiveMaximum, ok = compiler.BoolForScalarNode(v11) if !ok { - message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v11, v11) + message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %s", compiler.Display(v11)) errors = append(errors, compiler.NewError(context, message)) } } // float minimum = 12; v12 := compiler.MapValueForKey(m, "minimum") if v12 != nil { - switch v12 := v12.(type) { - case float64: - x.Minimum = v12 - case float32: - x.Minimum = float64(v12) - case uint64: - x.Minimum = float64(v12) - case uint32: - x.Minimum = float64(v12) - case int64: - x.Minimum = float64(v12) - case int32: - x.Minimum = float64(v12) - case int: - x.Minimum = float64(v12) - default: - message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v12, v12) + v, ok := compiler.FloatForScalarNode(v12) + if ok { + x.Minimum = v + } else { + message := fmt.Sprintf("has unexpected value for minimum: %s", compiler.Display(v12)) errors = append(errors, compiler.NewError(context, message)) } } // bool exclusive_minimum = 13; v13 := compiler.MapValueForKey(m, "exclusiveMinimum") if v13 != nil { - x.ExclusiveMinimum, ok = v13.(bool) + x.ExclusiveMinimum, ok = compiler.BoolForScalarNode(v13) if !ok { - message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v13, v13) + message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %s", compiler.Display(v13)) errors = append(errors, compiler.NewError(context, message)) } } // int64 max_length = 14; v14 := compiler.MapValueForKey(m, "maxLength") if v14 != nil { - t, ok := v14.(int) + t, ok := compiler.IntForScalarNode(v14) if ok { x.MaxLength = int64(t) } else { - message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v14, v14) + message := fmt.Sprintf("has unexpected value for maxLength: %s", compiler.Display(v14)) errors = append(errors, compiler.NewError(context, message)) } } // int64 min_length = 15; v15 := compiler.MapValueForKey(m, "minLength") if v15 != nil { - t, ok := v15.(int) + t, ok := compiler.IntForScalarNode(v15) if ok { x.MinLength = int64(t) } else { - message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v15, v15) + message := fmt.Sprintf("has unexpected value for minLength: %s", compiler.Display(v15)) errors = append(errors, compiler.NewError(context, message)) } } // string pattern = 16; v16 := compiler.MapValueForKey(m, "pattern") if v16 != nil { - x.Pattern, ok = v16.(string) + x.Pattern, ok = compiler.StringForScalarNode(v16) if !ok { - message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v16, v16) + message := fmt.Sprintf("has unexpected value for pattern: %s", compiler.Display(v16)) errors = append(errors, compiler.NewError(context, message)) } } // int64 max_items = 17; v17 := compiler.MapValueForKey(m, "maxItems") if v17 != nil { - t, ok := v17.(int) + t, ok := compiler.IntForScalarNode(v17) if ok { x.MaxItems = int64(t) } else { - message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v17, v17) + message := fmt.Sprintf("has unexpected value for maxItems: %s", compiler.Display(v17)) errors = append(errors, compiler.NewError(context, message)) } } // int64 min_items = 18; v18 := compiler.MapValueForKey(m, "minItems") if v18 != nil { - t, ok := v18.(int) + t, ok := compiler.IntForScalarNode(v18) if ok { x.MinItems = int64(t) } else { - message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v18, v18) + message := fmt.Sprintf("has unexpected value for minItems: %s", compiler.Display(v18)) errors = append(errors, compiler.NewError(context, message)) } } // bool unique_items = 19; v19 := compiler.MapValueForKey(m, "uniqueItems") if v19 != nil { - x.UniqueItems, ok = v19.(bool) + x.UniqueItems, ok = compiler.BoolForScalarNode(v19) if !ok { - message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v19, v19) + message := fmt.Sprintf("has unexpected value for uniqueItems: %s", compiler.Display(v19)) errors = append(errors, compiler.NewError(context, message)) } } @@ -1858,9 +1763,9 @@ func NewHeaderParameterSubSchema(in interface{}, context *compiler.Context) (*He if v20 != nil { // repeated Any x.Enum = make([]*Any, 0) - a, ok := v20.([]interface{}) + a, ok := compiler.SequenceNodeForNode(v20) if ok { - for _, item := range a { + for _, item := range a.Content { y, err := NewAny(item, compiler.NewContext("enum", context)) if err != nil { errors = append(errors, err) @@ -1872,43 +1777,31 @@ func NewHeaderParameterSubSchema(in interface{}, context *compiler.Context) (*He // float multiple_of = 21; v21 := compiler.MapValueForKey(m, "multipleOf") if v21 != nil { - switch v21 := v21.(type) { - case float64: - x.MultipleOf = v21 - case float32: - x.MultipleOf = float64(v21) - case uint64: - x.MultipleOf = float64(v21) - case uint32: - x.MultipleOf = float64(v21) - case int64: - x.MultipleOf = float64(v21) - case int32: - x.MultipleOf = float64(v21) - case int: - x.MultipleOf = float64(v21) - default: - message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v21, v21) + v, ok := compiler.FloatForScalarNode(v21) + if ok { + x.MultipleOf = v + } else { + message := fmt.Sprintf("has unexpected value for multipleOf: %s", compiler.Display(v21)) errors = append(errors, compiler.NewError(context, message)) } } // repeated NamedAny vendor_extension = 22; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -1928,7 +1821,7 @@ func NewHeaderParameterSubSchema(in interface{}, context *compiler.Context) (*He } // NewHeaders creates an object of type Headers if possible, returning an error if not. -func NewHeaders(in interface{}, context *compiler.Context) (*Headers, error) { +func NewHeaders(in *yaml.Node, context *compiler.Context) (*Headers, error) { errors := make([]error, 0) x := &Headers{} m, ok := compiler.UnpackMap(in) @@ -1939,10 +1832,10 @@ func NewHeaders(in interface{}, context *compiler.Context) (*Headers, error) { // repeated NamedHeader additional_properties = 1; // MAP: Header x.AdditionalProperties = make([]*NamedHeader, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] pair := &NamedHeader{} pair.Name = k var err error @@ -1958,7 +1851,7 @@ func NewHeaders(in interface{}, context *compiler.Context) (*Headers, error) { } // NewInfo creates an object of type Info if possible, returning an error if not. -func NewInfo(in interface{}, context *compiler.Context) (*Info, error) { +func NewInfo(in *yaml.Node, context *compiler.Context) (*Info, error) { errors := make([]error, 0) x := &Info{} m, ok := compiler.UnpackMap(in) @@ -1982,36 +1875,36 @@ func NewInfo(in interface{}, context *compiler.Context) (*Info, error) { // string title = 1; v1 := compiler.MapValueForKey(m, "title") if v1 != nil { - x.Title, ok = v1.(string) + x.Title, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for title: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for title: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string version = 2; v2 := compiler.MapValueForKey(m, "version") if v2 != nil { - x.Version, ok = v2.(string) + x.Version, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for version: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for version: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } // string description = 3; v3 := compiler.MapValueForKey(m, "description") if v3 != nil { - x.Description, ok = v3.(string) + x.Description, ok = compiler.StringForScalarNode(v3) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3)) errors = append(errors, compiler.NewError(context, message)) } } // string terms_of_service = 4; v4 := compiler.MapValueForKey(m, "termsOfService") if v4 != nil { - x.TermsOfService, ok = v4.(string) + x.TermsOfService, ok = compiler.StringForScalarNode(v4) if !ok { - message := fmt.Sprintf("has unexpected value for termsOfService: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for termsOfService: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } } @@ -2036,20 +1929,20 @@ func NewInfo(in interface{}, context *compiler.Context) (*Info, error) { // repeated NamedAny vendor_extension = 7; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -2069,7 +1962,7 @@ func NewInfo(in interface{}, context *compiler.Context) (*Info, error) { } // NewItemsItem creates an object of type ItemsItem if possible, returning an error if not. -func NewItemsItem(in interface{}, context *compiler.Context) (*ItemsItem, error) { +func NewItemsItem(in *yaml.Node, context *compiler.Context) (*ItemsItem, error) { errors := make([]error, 0) x := &ItemsItem{} m, ok := compiler.UnpackMap(in) @@ -2088,7 +1981,7 @@ func NewItemsItem(in interface{}, context *compiler.Context) (*ItemsItem, error) } // NewJsonReference creates an object of type JsonReference if possible, returning an error if not. -func NewJsonReference(in interface{}, context *compiler.Context) (*JsonReference, error) { +func NewJsonReference(in *yaml.Node, context *compiler.Context) (*JsonReference, error) { errors := make([]error, 0) x := &JsonReference{} m, ok := compiler.UnpackMap(in) @@ -2102,28 +1995,21 @@ func NewJsonReference(in interface{}, context *compiler.Context) (*JsonReference message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) errors = append(errors, compiler.NewError(context, message)) } - allowedKeys := []string{"$ref", "description"} - var allowedPatterns []*regexp.Regexp - invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) - if len(invalidKeys) > 0 { - message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) - errors = append(errors, compiler.NewError(context, message)) - } // string _ref = 1; v1 := compiler.MapValueForKey(m, "$ref") if v1 != nil { - x.XRef, ok = v1.(string) + x.XRef, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for $ref: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for $ref: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string description = 2; v2 := compiler.MapValueForKey(m, "description") if v2 != nil { - x.Description, ok = v2.(string) + x.Description, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } @@ -2132,7 +2018,7 @@ func NewJsonReference(in interface{}, context *compiler.Context) (*JsonReference } // NewLicense creates an object of type License if possible, returning an error if not. -func NewLicense(in interface{}, context *compiler.Context) (*License, error) { +func NewLicense(in *yaml.Node, context *compiler.Context) (*License, error) { errors := make([]error, 0) x := &License{} m, ok := compiler.UnpackMap(in) @@ -2156,38 +2042,38 @@ func NewLicense(in interface{}, context *compiler.Context) (*License, error) { // string name = 1; v1 := compiler.MapValueForKey(m, "name") if v1 != nil { - x.Name, ok = v1.(string) + x.Name, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string url = 2; v2 := compiler.MapValueForKey(m, "url") if v2 != nil { - x.Url, ok = v2.(string) + x.Url, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for url: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for url: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } // repeated NamedAny vendor_extension = 3; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -2207,7 +2093,7 @@ func NewLicense(in interface{}, context *compiler.Context) (*License, error) { } // NewNamedAny creates an object of type NamedAny if possible, returning an error if not. -func NewNamedAny(in interface{}, context *compiler.Context) (*NamedAny, error) { +func NewNamedAny(in *yaml.Node, context *compiler.Context) (*NamedAny, error) { errors := make([]error, 0) x := &NamedAny{} m, ok := compiler.UnpackMap(in) @@ -2225,9 +2111,9 @@ func NewNamedAny(in interface{}, context *compiler.Context) (*NamedAny, error) { // string name = 1; v1 := compiler.MapValueForKey(m, "name") if v1 != nil { - x.Name, ok = v1.(string) + x.Name, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } @@ -2245,7 +2131,7 @@ func NewNamedAny(in interface{}, context *compiler.Context) (*NamedAny, error) { } // NewNamedHeader creates an object of type NamedHeader if possible, returning an error if not. -func NewNamedHeader(in interface{}, context *compiler.Context) (*NamedHeader, error) { +func NewNamedHeader(in *yaml.Node, context *compiler.Context) (*NamedHeader, error) { errors := make([]error, 0) x := &NamedHeader{} m, ok := compiler.UnpackMap(in) @@ -2263,9 +2149,9 @@ func NewNamedHeader(in interface{}, context *compiler.Context) (*NamedHeader, er // string name = 1; v1 := compiler.MapValueForKey(m, "name") if v1 != nil { - x.Name, ok = v1.(string) + x.Name, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } @@ -2283,7 +2169,7 @@ func NewNamedHeader(in interface{}, context *compiler.Context) (*NamedHeader, er } // NewNamedParameter creates an object of type NamedParameter if possible, returning an error if not. -func NewNamedParameter(in interface{}, context *compiler.Context) (*NamedParameter, error) { +func NewNamedParameter(in *yaml.Node, context *compiler.Context) (*NamedParameter, error) { errors := make([]error, 0) x := &NamedParameter{} m, ok := compiler.UnpackMap(in) @@ -2301,9 +2187,9 @@ func NewNamedParameter(in interface{}, context *compiler.Context) (*NamedParamet // string name = 1; v1 := compiler.MapValueForKey(m, "name") if v1 != nil { - x.Name, ok = v1.(string) + x.Name, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } @@ -2321,7 +2207,7 @@ func NewNamedParameter(in interface{}, context *compiler.Context) (*NamedParamet } // NewNamedPathItem creates an object of type NamedPathItem if possible, returning an error if not. -func NewNamedPathItem(in interface{}, context *compiler.Context) (*NamedPathItem, error) { +func NewNamedPathItem(in *yaml.Node, context *compiler.Context) (*NamedPathItem, error) { errors := make([]error, 0) x := &NamedPathItem{} m, ok := compiler.UnpackMap(in) @@ -2339,9 +2225,9 @@ func NewNamedPathItem(in interface{}, context *compiler.Context) (*NamedPathItem // string name = 1; v1 := compiler.MapValueForKey(m, "name") if v1 != nil { - x.Name, ok = v1.(string) + x.Name, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } @@ -2359,7 +2245,7 @@ func NewNamedPathItem(in interface{}, context *compiler.Context) (*NamedPathItem } // NewNamedResponse creates an object of type NamedResponse if possible, returning an error if not. -func NewNamedResponse(in interface{}, context *compiler.Context) (*NamedResponse, error) { +func NewNamedResponse(in *yaml.Node, context *compiler.Context) (*NamedResponse, error) { errors := make([]error, 0) x := &NamedResponse{} m, ok := compiler.UnpackMap(in) @@ -2377,9 +2263,9 @@ func NewNamedResponse(in interface{}, context *compiler.Context) (*NamedResponse // string name = 1; v1 := compiler.MapValueForKey(m, "name") if v1 != nil { - x.Name, ok = v1.(string) + x.Name, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } @@ -2397,7 +2283,7 @@ func NewNamedResponse(in interface{}, context *compiler.Context) (*NamedResponse } // NewNamedResponseValue creates an object of type NamedResponseValue if possible, returning an error if not. -func NewNamedResponseValue(in interface{}, context *compiler.Context) (*NamedResponseValue, error) { +func NewNamedResponseValue(in *yaml.Node, context *compiler.Context) (*NamedResponseValue, error) { errors := make([]error, 0) x := &NamedResponseValue{} m, ok := compiler.UnpackMap(in) @@ -2415,9 +2301,9 @@ func NewNamedResponseValue(in interface{}, context *compiler.Context) (*NamedRes // string name = 1; v1 := compiler.MapValueForKey(m, "name") if v1 != nil { - x.Name, ok = v1.(string) + x.Name, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } @@ -2435,7 +2321,7 @@ func NewNamedResponseValue(in interface{}, context *compiler.Context) (*NamedRes } // NewNamedSchema creates an object of type NamedSchema if possible, returning an error if not. -func NewNamedSchema(in interface{}, context *compiler.Context) (*NamedSchema, error) { +func NewNamedSchema(in *yaml.Node, context *compiler.Context) (*NamedSchema, error) { errors := make([]error, 0) x := &NamedSchema{} m, ok := compiler.UnpackMap(in) @@ -2453,9 +2339,9 @@ func NewNamedSchema(in interface{}, context *compiler.Context) (*NamedSchema, er // string name = 1; v1 := compiler.MapValueForKey(m, "name") if v1 != nil { - x.Name, ok = v1.(string) + x.Name, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } @@ -2473,7 +2359,7 @@ func NewNamedSchema(in interface{}, context *compiler.Context) (*NamedSchema, er } // NewNamedSecurityDefinitionsItem creates an object of type NamedSecurityDefinitionsItem if possible, returning an error if not. -func NewNamedSecurityDefinitionsItem(in interface{}, context *compiler.Context) (*NamedSecurityDefinitionsItem, error) { +func NewNamedSecurityDefinitionsItem(in *yaml.Node, context *compiler.Context) (*NamedSecurityDefinitionsItem, error) { errors := make([]error, 0) x := &NamedSecurityDefinitionsItem{} m, ok := compiler.UnpackMap(in) @@ -2491,9 +2377,9 @@ func NewNamedSecurityDefinitionsItem(in interface{}, context *compiler.Context) // string name = 1; v1 := compiler.MapValueForKey(m, "name") if v1 != nil { - x.Name, ok = v1.(string) + x.Name, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } @@ -2511,7 +2397,7 @@ func NewNamedSecurityDefinitionsItem(in interface{}, context *compiler.Context) } // NewNamedString creates an object of type NamedString if possible, returning an error if not. -func NewNamedString(in interface{}, context *compiler.Context) (*NamedString, error) { +func NewNamedString(in *yaml.Node, context *compiler.Context) (*NamedString, error) { errors := make([]error, 0) x := &NamedString{} m, ok := compiler.UnpackMap(in) @@ -2529,18 +2415,18 @@ func NewNamedString(in interface{}, context *compiler.Context) (*NamedString, er // string name = 1; v1 := compiler.MapValueForKey(m, "name") if v1 != nil { - x.Name, ok = v1.(string) + x.Name, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string value = 2; v2 := compiler.MapValueForKey(m, "value") if v2 != nil { - x.Value, ok = v2.(string) + x.Value, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for value: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for value: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } @@ -2549,7 +2435,7 @@ func NewNamedString(in interface{}, context *compiler.Context) (*NamedString, er } // NewNamedStringArray creates an object of type NamedStringArray if possible, returning an error if not. -func NewNamedStringArray(in interface{}, context *compiler.Context) (*NamedStringArray, error) { +func NewNamedStringArray(in *yaml.Node, context *compiler.Context) (*NamedStringArray, error) { errors := make([]error, 0) x := &NamedStringArray{} m, ok := compiler.UnpackMap(in) @@ -2567,9 +2453,9 @@ func NewNamedStringArray(in interface{}, context *compiler.Context) (*NamedStrin // string name = 1; v1 := compiler.MapValueForKey(m, "name") if v1 != nil { - x.Name, ok = v1.(string) + x.Name, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } @@ -2587,7 +2473,7 @@ func NewNamedStringArray(in interface{}, context *compiler.Context) (*NamedStrin } // NewNonBodyParameter creates an object of type NonBodyParameter if possible, returning an error if not. -func NewNonBodyParameter(in interface{}, context *compiler.Context) (*NonBodyParameter, error) { +func NewNonBodyParameter(in *yaml.Node, context *compiler.Context) (*NonBodyParameter, error) { errors := make([]error, 0) x := &NonBodyParameter{} matched := false @@ -2655,7 +2541,7 @@ func NewNonBodyParameter(in interface{}, context *compiler.Context) (*NonBodyPar } // NewOauth2AccessCodeSecurity creates an object of type Oauth2AccessCodeSecurity if possible, returning an error if not. -func NewOauth2AccessCodeSecurity(in interface{}, context *compiler.Context) (*Oauth2AccessCodeSecurity, error) { +func NewOauth2AccessCodeSecurity(in *yaml.Node, context *compiler.Context) (*Oauth2AccessCodeSecurity, error) { errors := make([]error, 0) x := &Oauth2AccessCodeSecurity{} m, ok := compiler.UnpackMap(in) @@ -2679,30 +2565,30 @@ func NewOauth2AccessCodeSecurity(in interface{}, context *compiler.Context) (*Oa // string type = 1; v1 := compiler.MapValueForKey(m, "type") if v1 != nil { - x.Type, ok = v1.(string) + x.Type, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [oauth2] if ok && !compiler.StringArrayContainsValue([]string{"oauth2"}, x.Type) { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string flow = 2; v2 := compiler.MapValueForKey(m, "flow") if v2 != nil { - x.Flow, ok = v2.(string) + x.Flow, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for flow: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [accessCode] if ok && !compiler.StringArrayContainsValue([]string{"accessCode"}, x.Flow) { - message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for flow: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } @@ -2718,47 +2604,47 @@ func NewOauth2AccessCodeSecurity(in interface{}, context *compiler.Context) (*Oa // string authorization_url = 4; v4 := compiler.MapValueForKey(m, "authorizationUrl") if v4 != nil { - x.AuthorizationUrl, ok = v4.(string) + x.AuthorizationUrl, ok = compiler.StringForScalarNode(v4) if !ok { - message := fmt.Sprintf("has unexpected value for authorizationUrl: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for authorizationUrl: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } } // string token_url = 5; v5 := compiler.MapValueForKey(m, "tokenUrl") if v5 != nil { - x.TokenUrl, ok = v5.(string) + x.TokenUrl, ok = compiler.StringForScalarNode(v5) if !ok { - message := fmt.Sprintf("has unexpected value for tokenUrl: %+v (%T)", v5, v5) + message := fmt.Sprintf("has unexpected value for tokenUrl: %s", compiler.Display(v5)) errors = append(errors, compiler.NewError(context, message)) } } // string description = 6; v6 := compiler.MapValueForKey(m, "description") if v6 != nil { - x.Description, ok = v6.(string) + x.Description, ok = compiler.StringForScalarNode(v6) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v6, v6) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v6)) errors = append(errors, compiler.NewError(context, message)) } } // repeated NamedAny vendor_extension = 7; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -2778,7 +2664,7 @@ func NewOauth2AccessCodeSecurity(in interface{}, context *compiler.Context) (*Oa } // NewOauth2ApplicationSecurity creates an object of type Oauth2ApplicationSecurity if possible, returning an error if not. -func NewOauth2ApplicationSecurity(in interface{}, context *compiler.Context) (*Oauth2ApplicationSecurity, error) { +func NewOauth2ApplicationSecurity(in *yaml.Node, context *compiler.Context) (*Oauth2ApplicationSecurity, error) { errors := make([]error, 0) x := &Oauth2ApplicationSecurity{} m, ok := compiler.UnpackMap(in) @@ -2802,30 +2688,30 @@ func NewOauth2ApplicationSecurity(in interface{}, context *compiler.Context) (*O // string type = 1; v1 := compiler.MapValueForKey(m, "type") if v1 != nil { - x.Type, ok = v1.(string) + x.Type, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [oauth2] if ok && !compiler.StringArrayContainsValue([]string{"oauth2"}, x.Type) { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string flow = 2; v2 := compiler.MapValueForKey(m, "flow") if v2 != nil { - x.Flow, ok = v2.(string) + x.Flow, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for flow: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [application] if ok && !compiler.StringArrayContainsValue([]string{"application"}, x.Flow) { - message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for flow: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } @@ -2841,38 +2727,38 @@ func NewOauth2ApplicationSecurity(in interface{}, context *compiler.Context) (*O // string token_url = 4; v4 := compiler.MapValueForKey(m, "tokenUrl") if v4 != nil { - x.TokenUrl, ok = v4.(string) + x.TokenUrl, ok = compiler.StringForScalarNode(v4) if !ok { - message := fmt.Sprintf("has unexpected value for tokenUrl: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for tokenUrl: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } } // string description = 5; v5 := compiler.MapValueForKey(m, "description") if v5 != nil { - x.Description, ok = v5.(string) + x.Description, ok = compiler.StringForScalarNode(v5) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v5, v5) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v5)) errors = append(errors, compiler.NewError(context, message)) } } // repeated NamedAny vendor_extension = 6; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -2892,7 +2778,7 @@ func NewOauth2ApplicationSecurity(in interface{}, context *compiler.Context) (*O } // NewOauth2ImplicitSecurity creates an object of type Oauth2ImplicitSecurity if possible, returning an error if not. -func NewOauth2ImplicitSecurity(in interface{}, context *compiler.Context) (*Oauth2ImplicitSecurity, error) { +func NewOauth2ImplicitSecurity(in *yaml.Node, context *compiler.Context) (*Oauth2ImplicitSecurity, error) { errors := make([]error, 0) x := &Oauth2ImplicitSecurity{} m, ok := compiler.UnpackMap(in) @@ -2916,30 +2802,30 @@ func NewOauth2ImplicitSecurity(in interface{}, context *compiler.Context) (*Oaut // string type = 1; v1 := compiler.MapValueForKey(m, "type") if v1 != nil { - x.Type, ok = v1.(string) + x.Type, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [oauth2] if ok && !compiler.StringArrayContainsValue([]string{"oauth2"}, x.Type) { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string flow = 2; v2 := compiler.MapValueForKey(m, "flow") if v2 != nil { - x.Flow, ok = v2.(string) + x.Flow, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for flow: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [implicit] if ok && !compiler.StringArrayContainsValue([]string{"implicit"}, x.Flow) { - message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for flow: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } @@ -2955,38 +2841,38 @@ func NewOauth2ImplicitSecurity(in interface{}, context *compiler.Context) (*Oaut // string authorization_url = 4; v4 := compiler.MapValueForKey(m, "authorizationUrl") if v4 != nil { - x.AuthorizationUrl, ok = v4.(string) + x.AuthorizationUrl, ok = compiler.StringForScalarNode(v4) if !ok { - message := fmt.Sprintf("has unexpected value for authorizationUrl: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for authorizationUrl: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } } // string description = 5; v5 := compiler.MapValueForKey(m, "description") if v5 != nil { - x.Description, ok = v5.(string) + x.Description, ok = compiler.StringForScalarNode(v5) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v5, v5) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v5)) errors = append(errors, compiler.NewError(context, message)) } } // repeated NamedAny vendor_extension = 6; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -3006,7 +2892,7 @@ func NewOauth2ImplicitSecurity(in interface{}, context *compiler.Context) (*Oaut } // NewOauth2PasswordSecurity creates an object of type Oauth2PasswordSecurity if possible, returning an error if not. -func NewOauth2PasswordSecurity(in interface{}, context *compiler.Context) (*Oauth2PasswordSecurity, error) { +func NewOauth2PasswordSecurity(in *yaml.Node, context *compiler.Context) (*Oauth2PasswordSecurity, error) { errors := make([]error, 0) x := &Oauth2PasswordSecurity{} m, ok := compiler.UnpackMap(in) @@ -3030,30 +2916,30 @@ func NewOauth2PasswordSecurity(in interface{}, context *compiler.Context) (*Oaut // string type = 1; v1 := compiler.MapValueForKey(m, "type") if v1 != nil { - x.Type, ok = v1.(string) + x.Type, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [oauth2] if ok && !compiler.StringArrayContainsValue([]string{"oauth2"}, x.Type) { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string flow = 2; v2 := compiler.MapValueForKey(m, "flow") if v2 != nil { - x.Flow, ok = v2.(string) + x.Flow, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for flow: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [password] if ok && !compiler.StringArrayContainsValue([]string{"password"}, x.Flow) { - message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for flow: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } @@ -3069,38 +2955,38 @@ func NewOauth2PasswordSecurity(in interface{}, context *compiler.Context) (*Oaut // string token_url = 4; v4 := compiler.MapValueForKey(m, "tokenUrl") if v4 != nil { - x.TokenUrl, ok = v4.(string) + x.TokenUrl, ok = compiler.StringForScalarNode(v4) if !ok { - message := fmt.Sprintf("has unexpected value for tokenUrl: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for tokenUrl: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } } // string description = 5; v5 := compiler.MapValueForKey(m, "description") if v5 != nil { - x.Description, ok = v5.(string) + x.Description, ok = compiler.StringForScalarNode(v5) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v5, v5) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v5)) errors = append(errors, compiler.NewError(context, message)) } } // repeated NamedAny vendor_extension = 6; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -3120,7 +3006,7 @@ func NewOauth2PasswordSecurity(in interface{}, context *compiler.Context) (*Oaut } // NewOauth2Scopes creates an object of type Oauth2Scopes if possible, returning an error if not. -func NewOauth2Scopes(in interface{}, context *compiler.Context) (*Oauth2Scopes, error) { +func NewOauth2Scopes(in *yaml.Node, context *compiler.Context) (*Oauth2Scopes, error) { errors := make([]error, 0) x := &Oauth2Scopes{} m, ok := compiler.UnpackMap(in) @@ -3131,13 +3017,13 @@ func NewOauth2Scopes(in interface{}, context *compiler.Context) (*Oauth2Scopes, // repeated NamedString additional_properties = 1; // MAP: string x.AdditionalProperties = make([]*NamedString, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] pair := &NamedString{} pair.Name = k - pair.Value = v.(string) + pair.Value, _ = compiler.StringForScalarNode(v) x.AdditionalProperties = append(x.AdditionalProperties, pair) } } @@ -3146,7 +3032,7 @@ func NewOauth2Scopes(in interface{}, context *compiler.Context) (*Oauth2Scopes, } // NewOperation creates an object of type Operation if possible, returning an error if not. -func NewOperation(in interface{}, context *compiler.Context) (*Operation, error) { +func NewOperation(in *yaml.Node, context *compiler.Context) (*Operation, error) { errors := make([]error, 0) x := &Operation{} m, ok := compiler.UnpackMap(in) @@ -3170,29 +3056,29 @@ func NewOperation(in interface{}, context *compiler.Context) (*Operation, error) // repeated string tags = 1; v1 := compiler.MapValueForKey(m, "tags") if v1 != nil { - v, ok := v1.([]interface{}) + v, ok := compiler.SequenceNodeForNode(v1) if ok { - x.Tags = compiler.ConvertInterfaceArrayToStringArray(v) + x.Tags = compiler.StringArrayForSequenceNode(v) } else { - message := fmt.Sprintf("has unexpected value for tags: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for tags: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string summary = 2; v2 := compiler.MapValueForKey(m, "summary") if v2 != nil { - x.Summary, ok = v2.(string) + x.Summary, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for summary: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for summary: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } // string description = 3; v3 := compiler.MapValueForKey(m, "description") if v3 != nil { - x.Description, ok = v3.(string) + x.Description, ok = compiler.StringForScalarNode(v3) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3)) errors = append(errors, compiler.NewError(context, message)) } } @@ -3208,31 +3094,31 @@ func NewOperation(in interface{}, context *compiler.Context) (*Operation, error) // string operation_id = 5; v5 := compiler.MapValueForKey(m, "operationId") if v5 != nil { - x.OperationId, ok = v5.(string) + x.OperationId, ok = compiler.StringForScalarNode(v5) if !ok { - message := fmt.Sprintf("has unexpected value for operationId: %+v (%T)", v5, v5) + message := fmt.Sprintf("has unexpected value for operationId: %s", compiler.Display(v5)) errors = append(errors, compiler.NewError(context, message)) } } // repeated string produces = 6; v6 := compiler.MapValueForKey(m, "produces") if v6 != nil { - v, ok := v6.([]interface{}) + v, ok := compiler.SequenceNodeForNode(v6) if ok { - x.Produces = compiler.ConvertInterfaceArrayToStringArray(v) + x.Produces = compiler.StringArrayForSequenceNode(v) } else { - message := fmt.Sprintf("has unexpected value for produces: %+v (%T)", v6, v6) + message := fmt.Sprintf("has unexpected value for produces: %s", compiler.Display(v6)) errors = append(errors, compiler.NewError(context, message)) } } // repeated string consumes = 7; v7 := compiler.MapValueForKey(m, "consumes") if v7 != nil { - v, ok := v7.([]interface{}) + v, ok := compiler.SequenceNodeForNode(v7) if ok { - x.Consumes = compiler.ConvertInterfaceArrayToStringArray(v) + x.Consumes = compiler.StringArrayForSequenceNode(v) } else { - message := fmt.Sprintf("has unexpected value for consumes: %+v (%T)", v7, v7) + message := fmt.Sprintf("has unexpected value for consumes: %s", compiler.Display(v7)) errors = append(errors, compiler.NewError(context, message)) } } @@ -3241,9 +3127,9 @@ func NewOperation(in interface{}, context *compiler.Context) (*Operation, error) if v8 != nil { // repeated ParametersItem x.Parameters = make([]*ParametersItem, 0) - a, ok := v8.([]interface{}) + a, ok := compiler.SequenceNodeForNode(v8) if ok { - for _, item := range a { + for _, item := range a.Content { y, err := NewParametersItem(item, compiler.NewContext("parameters", context)) if err != nil { errors = append(errors, err) @@ -3264,26 +3150,26 @@ func NewOperation(in interface{}, context *compiler.Context) (*Operation, error) // repeated string schemes = 10; v10 := compiler.MapValueForKey(m, "schemes") if v10 != nil { - v, ok := v10.([]interface{}) + v, ok := compiler.SequenceNodeForNode(v10) if ok { - x.Schemes = compiler.ConvertInterfaceArrayToStringArray(v) + x.Schemes = compiler.StringArrayForSequenceNode(v) } else { - message := fmt.Sprintf("has unexpected value for schemes: %+v (%T)", v10, v10) + message := fmt.Sprintf("has unexpected value for schemes: %s", compiler.Display(v10)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [http https ws wss] if ok && !compiler.StringArrayContainsValues([]string{"http", "https", "ws", "wss"}, x.Schemes) { - message := fmt.Sprintf("has unexpected value for schemes: %+v", v10) + message := fmt.Sprintf("has unexpected value for schemes: %s", compiler.Display(v10)) errors = append(errors, compiler.NewError(context, message)) } } // bool deprecated = 11; v11 := compiler.MapValueForKey(m, "deprecated") if v11 != nil { - x.Deprecated, ok = v11.(bool) + x.Deprecated, ok = compiler.BoolForScalarNode(v11) if !ok { - message := fmt.Sprintf("has unexpected value for deprecated: %+v (%T)", v11, v11) + message := fmt.Sprintf("has unexpected value for deprecated: %s", compiler.Display(v11)) errors = append(errors, compiler.NewError(context, message)) } } @@ -3292,9 +3178,9 @@ func NewOperation(in interface{}, context *compiler.Context) (*Operation, error) if v12 != nil { // repeated SecurityRequirement x.Security = make([]*SecurityRequirement, 0) - a, ok := v12.([]interface{}) + a, ok := compiler.SequenceNodeForNode(v12) if ok { - for _, item := range a { + for _, item := range a.Content { y, err := NewSecurityRequirement(item, compiler.NewContext("security", context)) if err != nil { errors = append(errors, err) @@ -3306,20 +3192,20 @@ func NewOperation(in interface{}, context *compiler.Context) (*Operation, error) // repeated NamedAny vendor_extension = 13; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -3339,7 +3225,7 @@ func NewOperation(in interface{}, context *compiler.Context) (*Operation, error) } // NewParameter creates an object of type Parameter if possible, returning an error if not. -func NewParameter(in interface{}, context *compiler.Context) (*Parameter, error) { +func NewParameter(in *yaml.Node, context *compiler.Context) (*Parameter, error) { errors := make([]error, 0) x := &Parameter{} matched := false @@ -3379,7 +3265,7 @@ func NewParameter(in interface{}, context *compiler.Context) (*Parameter, error) } // NewParameterDefinitions creates an object of type ParameterDefinitions if possible, returning an error if not. -func NewParameterDefinitions(in interface{}, context *compiler.Context) (*ParameterDefinitions, error) { +func NewParameterDefinitions(in *yaml.Node, context *compiler.Context) (*ParameterDefinitions, error) { errors := make([]error, 0) x := &ParameterDefinitions{} m, ok := compiler.UnpackMap(in) @@ -3390,10 +3276,10 @@ func NewParameterDefinitions(in interface{}, context *compiler.Context) (*Parame // repeated NamedParameter additional_properties = 1; // MAP: Parameter x.AdditionalProperties = make([]*NamedParameter, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] pair := &NamedParameter{} pair.Name = k var err error @@ -3409,7 +3295,7 @@ func NewParameterDefinitions(in interface{}, context *compiler.Context) (*Parame } // NewParametersItem creates an object of type ParametersItem if possible, returning an error if not. -func NewParametersItem(in interface{}, context *compiler.Context) (*ParametersItem, error) { +func NewParametersItem(in *yaml.Node, context *compiler.Context) (*ParametersItem, error) { errors := make([]error, 0) x := &ParametersItem{} matched := false @@ -3449,7 +3335,7 @@ func NewParametersItem(in interface{}, context *compiler.Context) (*ParametersIt } // NewPathItem creates an object of type PathItem if possible, returning an error if not. -func NewPathItem(in interface{}, context *compiler.Context) (*PathItem, error) { +func NewPathItem(in *yaml.Node, context *compiler.Context) (*PathItem, error) { errors := make([]error, 0) x := &PathItem{} m, ok := compiler.UnpackMap(in) @@ -3467,9 +3353,9 @@ func NewPathItem(in interface{}, context *compiler.Context) (*PathItem, error) { // string _ref = 1; v1 := compiler.MapValueForKey(m, "$ref") if v1 != nil { - x.XRef, ok = v1.(string) + x.XRef, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for $ref: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for $ref: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } @@ -3541,9 +3427,9 @@ func NewPathItem(in interface{}, context *compiler.Context) (*PathItem, error) { if v9 != nil { // repeated ParametersItem x.Parameters = make([]*ParametersItem, 0) - a, ok := v9.([]interface{}) + a, ok := compiler.SequenceNodeForNode(v9) if ok { - for _, item := range a { + for _, item := range a.Content { y, err := NewParametersItem(item, compiler.NewContext("parameters", context)) if err != nil { errors = append(errors, err) @@ -3555,20 +3441,20 @@ func NewPathItem(in interface{}, context *compiler.Context) (*PathItem, error) { // repeated NamedAny vendor_extension = 10; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -3588,7 +3474,7 @@ func NewPathItem(in interface{}, context *compiler.Context) (*PathItem, error) { } // NewPathParameterSubSchema creates an object of type PathParameterSubSchema if possible, returning an error if not. -func NewPathParameterSubSchema(in interface{}, context *compiler.Context) (*PathParameterSubSchema, error) { +func NewPathParameterSubSchema(in *yaml.Node, context *compiler.Context) (*PathParameterSubSchema, error) { errors := make([]error, 0) x := &PathParameterSubSchema{} m, ok := compiler.UnpackMap(in) @@ -3612,66 +3498,66 @@ func NewPathParameterSubSchema(in interface{}, context *compiler.Context) (*Path // bool required = 1; v1 := compiler.MapValueForKey(m, "required") if v1 != nil { - x.Required, ok = v1.(bool) + x.Required, ok = compiler.BoolForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string in = 2; v2 := compiler.MapValueForKey(m, "in") if v2 != nil { - x.In, ok = v2.(string) + x.In, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [path] if ok && !compiler.StringArrayContainsValue([]string{"path"}, x.In) { - message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } // string description = 3; v3 := compiler.MapValueForKey(m, "description") if v3 != nil { - x.Description, ok = v3.(string) + x.Description, ok = compiler.StringForScalarNode(v3) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3)) errors = append(errors, compiler.NewError(context, message)) } } // string name = 4; v4 := compiler.MapValueForKey(m, "name") if v4 != nil { - x.Name, ok = v4.(string) + x.Name, ok = compiler.StringForScalarNode(v4) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } } // string type = 5; v5 := compiler.MapValueForKey(m, "type") if v5 != nil { - x.Type, ok = v5.(string) + x.Type, ok = compiler.StringForScalarNode(v5) if !ok { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v5, v5) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v5)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [string number boolean integer array] if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "boolean", "integer", "array"}, x.Type) { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v5, v5) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v5)) errors = append(errors, compiler.NewError(context, message)) } } // string format = 6; v6 := compiler.MapValueForKey(m, "format") if v6 != nil { - x.Format, ok = v6.(string) + x.Format, ok = compiler.StringForScalarNode(v6) if !ok { - message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v6, v6) + message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v6)) errors = append(errors, compiler.NewError(context, message)) } } @@ -3687,15 +3573,15 @@ func NewPathParameterSubSchema(in interface{}, context *compiler.Context) (*Path // string collection_format = 8; v8 := compiler.MapValueForKey(m, "collectionFormat") if v8 != nil { - x.CollectionFormat, ok = v8.(string) + x.CollectionFormat, ok = compiler.StringForScalarNode(v8) if !ok { - message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v8, v8) + message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v8)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [csv ssv tsv pipes] if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes"}, x.CollectionFormat) { - message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v8, v8) + message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v8)) errors = append(errors, compiler.NewError(context, message)) } } @@ -3711,126 +3597,102 @@ func NewPathParameterSubSchema(in interface{}, context *compiler.Context) (*Path // float maximum = 10; v10 := compiler.MapValueForKey(m, "maximum") if v10 != nil { - switch v10 := v10.(type) { - case float64: - x.Maximum = v10 - case float32: - x.Maximum = float64(v10) - case uint64: - x.Maximum = float64(v10) - case uint32: - x.Maximum = float64(v10) - case int64: - x.Maximum = float64(v10) - case int32: - x.Maximum = float64(v10) - case int: - x.Maximum = float64(v10) - default: - message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v10, v10) + v, ok := compiler.FloatForScalarNode(v10) + if ok { + x.Maximum = v + } else { + message := fmt.Sprintf("has unexpected value for maximum: %s", compiler.Display(v10)) errors = append(errors, compiler.NewError(context, message)) } } // bool exclusive_maximum = 11; v11 := compiler.MapValueForKey(m, "exclusiveMaximum") if v11 != nil { - x.ExclusiveMaximum, ok = v11.(bool) + x.ExclusiveMaximum, ok = compiler.BoolForScalarNode(v11) if !ok { - message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v11, v11) + message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %s", compiler.Display(v11)) errors = append(errors, compiler.NewError(context, message)) } } // float minimum = 12; v12 := compiler.MapValueForKey(m, "minimum") if v12 != nil { - switch v12 := v12.(type) { - case float64: - x.Minimum = v12 - case float32: - x.Minimum = float64(v12) - case uint64: - x.Minimum = float64(v12) - case uint32: - x.Minimum = float64(v12) - case int64: - x.Minimum = float64(v12) - case int32: - x.Minimum = float64(v12) - case int: - x.Minimum = float64(v12) - default: - message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v12, v12) + v, ok := compiler.FloatForScalarNode(v12) + if ok { + x.Minimum = v + } else { + message := fmt.Sprintf("has unexpected value for minimum: %s", compiler.Display(v12)) errors = append(errors, compiler.NewError(context, message)) } } // bool exclusive_minimum = 13; v13 := compiler.MapValueForKey(m, "exclusiveMinimum") if v13 != nil { - x.ExclusiveMinimum, ok = v13.(bool) + x.ExclusiveMinimum, ok = compiler.BoolForScalarNode(v13) if !ok { - message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v13, v13) + message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %s", compiler.Display(v13)) errors = append(errors, compiler.NewError(context, message)) } } // int64 max_length = 14; v14 := compiler.MapValueForKey(m, "maxLength") if v14 != nil { - t, ok := v14.(int) + t, ok := compiler.IntForScalarNode(v14) if ok { x.MaxLength = int64(t) } else { - message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v14, v14) + message := fmt.Sprintf("has unexpected value for maxLength: %s", compiler.Display(v14)) errors = append(errors, compiler.NewError(context, message)) } } // int64 min_length = 15; v15 := compiler.MapValueForKey(m, "minLength") if v15 != nil { - t, ok := v15.(int) + t, ok := compiler.IntForScalarNode(v15) if ok { x.MinLength = int64(t) } else { - message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v15, v15) + message := fmt.Sprintf("has unexpected value for minLength: %s", compiler.Display(v15)) errors = append(errors, compiler.NewError(context, message)) } } // string pattern = 16; v16 := compiler.MapValueForKey(m, "pattern") if v16 != nil { - x.Pattern, ok = v16.(string) + x.Pattern, ok = compiler.StringForScalarNode(v16) if !ok { - message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v16, v16) + message := fmt.Sprintf("has unexpected value for pattern: %s", compiler.Display(v16)) errors = append(errors, compiler.NewError(context, message)) } } // int64 max_items = 17; v17 := compiler.MapValueForKey(m, "maxItems") if v17 != nil { - t, ok := v17.(int) + t, ok := compiler.IntForScalarNode(v17) if ok { x.MaxItems = int64(t) } else { - message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v17, v17) + message := fmt.Sprintf("has unexpected value for maxItems: %s", compiler.Display(v17)) errors = append(errors, compiler.NewError(context, message)) } } // int64 min_items = 18; v18 := compiler.MapValueForKey(m, "minItems") if v18 != nil { - t, ok := v18.(int) + t, ok := compiler.IntForScalarNode(v18) if ok { x.MinItems = int64(t) } else { - message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v18, v18) + message := fmt.Sprintf("has unexpected value for minItems: %s", compiler.Display(v18)) errors = append(errors, compiler.NewError(context, message)) } } // bool unique_items = 19; v19 := compiler.MapValueForKey(m, "uniqueItems") if v19 != nil { - x.UniqueItems, ok = v19.(bool) + x.UniqueItems, ok = compiler.BoolForScalarNode(v19) if !ok { - message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v19, v19) + message := fmt.Sprintf("has unexpected value for uniqueItems: %s", compiler.Display(v19)) errors = append(errors, compiler.NewError(context, message)) } } @@ -3839,9 +3701,9 @@ func NewPathParameterSubSchema(in interface{}, context *compiler.Context) (*Path if v20 != nil { // repeated Any x.Enum = make([]*Any, 0) - a, ok := v20.([]interface{}) + a, ok := compiler.SequenceNodeForNode(v20) if ok { - for _, item := range a { + for _, item := range a.Content { y, err := NewAny(item, compiler.NewContext("enum", context)) if err != nil { errors = append(errors, err) @@ -3853,43 +3715,31 @@ func NewPathParameterSubSchema(in interface{}, context *compiler.Context) (*Path // float multiple_of = 21; v21 := compiler.MapValueForKey(m, "multipleOf") if v21 != nil { - switch v21 := v21.(type) { - case float64: - x.MultipleOf = v21 - case float32: - x.MultipleOf = float64(v21) - case uint64: - x.MultipleOf = float64(v21) - case uint32: - x.MultipleOf = float64(v21) - case int64: - x.MultipleOf = float64(v21) - case int32: - x.MultipleOf = float64(v21) - case int: - x.MultipleOf = float64(v21) - default: - message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v21, v21) + v, ok := compiler.FloatForScalarNode(v21) + if ok { + x.MultipleOf = v + } else { + message := fmt.Sprintf("has unexpected value for multipleOf: %s", compiler.Display(v21)) errors = append(errors, compiler.NewError(context, message)) } } // repeated NamedAny vendor_extension = 22; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -3909,7 +3759,7 @@ func NewPathParameterSubSchema(in interface{}, context *compiler.Context) (*Path } // NewPaths creates an object of type Paths if possible, returning an error if not. -func NewPaths(in interface{}, context *compiler.Context) (*Paths, error) { +func NewPaths(in *yaml.Node, context *compiler.Context) (*Paths, error) { errors := make([]error, 0) x := &Paths{} m, ok := compiler.UnpackMap(in) @@ -3927,20 +3777,20 @@ func NewPaths(in interface{}, context *compiler.Context) (*Paths, error) { // repeated NamedAny vendor_extension = 1; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -3958,10 +3808,10 @@ func NewPaths(in interface{}, context *compiler.Context) (*Paths, error) { // repeated NamedPathItem path = 2; // MAP: PathItem ^/ x.Path = make([]*NamedPathItem, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "/") { pair := &NamedPathItem{} pair.Name = k @@ -3979,7 +3829,7 @@ func NewPaths(in interface{}, context *compiler.Context) (*Paths, error) { } // NewPrimitivesItems creates an object of type PrimitivesItems if possible, returning an error if not. -func NewPrimitivesItems(in interface{}, context *compiler.Context) (*PrimitivesItems, error) { +func NewPrimitivesItems(in *yaml.Node, context *compiler.Context) (*PrimitivesItems, error) { errors := make([]error, 0) x := &PrimitivesItems{} m, ok := compiler.UnpackMap(in) @@ -3997,24 +3847,24 @@ func NewPrimitivesItems(in interface{}, context *compiler.Context) (*PrimitivesI // string type = 1; v1 := compiler.MapValueForKey(m, "type") if v1 != nil { - x.Type, ok = v1.(string) + x.Type, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [string number integer boolean array] if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "integer", "boolean", "array"}, x.Type) { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string format = 2; v2 := compiler.MapValueForKey(m, "format") if v2 != nil { - x.Format, ok = v2.(string) + x.Format, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } @@ -4030,15 +3880,15 @@ func NewPrimitivesItems(in interface{}, context *compiler.Context) (*PrimitivesI // string collection_format = 4; v4 := compiler.MapValueForKey(m, "collectionFormat") if v4 != nil { - x.CollectionFormat, ok = v4.(string) + x.CollectionFormat, ok = compiler.StringForScalarNode(v4) if !ok { - message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [csv ssv tsv pipes] if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes"}, x.CollectionFormat) { - message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } } @@ -4054,126 +3904,102 @@ func NewPrimitivesItems(in interface{}, context *compiler.Context) (*PrimitivesI // float maximum = 6; v6 := compiler.MapValueForKey(m, "maximum") if v6 != nil { - switch v6 := v6.(type) { - case float64: - x.Maximum = v6 - case float32: - x.Maximum = float64(v6) - case uint64: - x.Maximum = float64(v6) - case uint32: - x.Maximum = float64(v6) - case int64: - x.Maximum = float64(v6) - case int32: - x.Maximum = float64(v6) - case int: - x.Maximum = float64(v6) - default: - message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v6, v6) + v, ok := compiler.FloatForScalarNode(v6) + if ok { + x.Maximum = v + } else { + message := fmt.Sprintf("has unexpected value for maximum: %s", compiler.Display(v6)) errors = append(errors, compiler.NewError(context, message)) } } // bool exclusive_maximum = 7; v7 := compiler.MapValueForKey(m, "exclusiveMaximum") if v7 != nil { - x.ExclusiveMaximum, ok = v7.(bool) + x.ExclusiveMaximum, ok = compiler.BoolForScalarNode(v7) if !ok { - message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v7, v7) + message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %s", compiler.Display(v7)) errors = append(errors, compiler.NewError(context, message)) } } // float minimum = 8; v8 := compiler.MapValueForKey(m, "minimum") if v8 != nil { - switch v8 := v8.(type) { - case float64: - x.Minimum = v8 - case float32: - x.Minimum = float64(v8) - case uint64: - x.Minimum = float64(v8) - case uint32: - x.Minimum = float64(v8) - case int64: - x.Minimum = float64(v8) - case int32: - x.Minimum = float64(v8) - case int: - x.Minimum = float64(v8) - default: - message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v8, v8) + v, ok := compiler.FloatForScalarNode(v8) + if ok { + x.Minimum = v + } else { + message := fmt.Sprintf("has unexpected value for minimum: %s", compiler.Display(v8)) errors = append(errors, compiler.NewError(context, message)) } } // bool exclusive_minimum = 9; v9 := compiler.MapValueForKey(m, "exclusiveMinimum") if v9 != nil { - x.ExclusiveMinimum, ok = v9.(bool) + x.ExclusiveMinimum, ok = compiler.BoolForScalarNode(v9) if !ok { - message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v9, v9) + message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %s", compiler.Display(v9)) errors = append(errors, compiler.NewError(context, message)) } } // int64 max_length = 10; v10 := compiler.MapValueForKey(m, "maxLength") if v10 != nil { - t, ok := v10.(int) + t, ok := compiler.IntForScalarNode(v10) if ok { x.MaxLength = int64(t) } else { - message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v10, v10) + message := fmt.Sprintf("has unexpected value for maxLength: %s", compiler.Display(v10)) errors = append(errors, compiler.NewError(context, message)) } } // int64 min_length = 11; v11 := compiler.MapValueForKey(m, "minLength") if v11 != nil { - t, ok := v11.(int) + t, ok := compiler.IntForScalarNode(v11) if ok { x.MinLength = int64(t) } else { - message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v11, v11) + message := fmt.Sprintf("has unexpected value for minLength: %s", compiler.Display(v11)) errors = append(errors, compiler.NewError(context, message)) } } // string pattern = 12; v12 := compiler.MapValueForKey(m, "pattern") if v12 != nil { - x.Pattern, ok = v12.(string) + x.Pattern, ok = compiler.StringForScalarNode(v12) if !ok { - message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v12, v12) + message := fmt.Sprintf("has unexpected value for pattern: %s", compiler.Display(v12)) errors = append(errors, compiler.NewError(context, message)) } } // int64 max_items = 13; v13 := compiler.MapValueForKey(m, "maxItems") if v13 != nil { - t, ok := v13.(int) + t, ok := compiler.IntForScalarNode(v13) if ok { x.MaxItems = int64(t) } else { - message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v13, v13) + message := fmt.Sprintf("has unexpected value for maxItems: %s", compiler.Display(v13)) errors = append(errors, compiler.NewError(context, message)) } } // int64 min_items = 14; v14 := compiler.MapValueForKey(m, "minItems") if v14 != nil { - t, ok := v14.(int) + t, ok := compiler.IntForScalarNode(v14) if ok { x.MinItems = int64(t) } else { - message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v14, v14) + message := fmt.Sprintf("has unexpected value for minItems: %s", compiler.Display(v14)) errors = append(errors, compiler.NewError(context, message)) } } // bool unique_items = 15; v15 := compiler.MapValueForKey(m, "uniqueItems") if v15 != nil { - x.UniqueItems, ok = v15.(bool) + x.UniqueItems, ok = compiler.BoolForScalarNode(v15) if !ok { - message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v15, v15) + message := fmt.Sprintf("has unexpected value for uniqueItems: %s", compiler.Display(v15)) errors = append(errors, compiler.NewError(context, message)) } } @@ -4182,9 +4008,9 @@ func NewPrimitivesItems(in interface{}, context *compiler.Context) (*PrimitivesI if v16 != nil { // repeated Any x.Enum = make([]*Any, 0) - a, ok := v16.([]interface{}) + a, ok := compiler.SequenceNodeForNode(v16) if ok { - for _, item := range a { + for _, item := range a.Content { y, err := NewAny(item, compiler.NewContext("enum", context)) if err != nil { errors = append(errors, err) @@ -4196,43 +4022,31 @@ func NewPrimitivesItems(in interface{}, context *compiler.Context) (*PrimitivesI // float multiple_of = 17; v17 := compiler.MapValueForKey(m, "multipleOf") if v17 != nil { - switch v17 := v17.(type) { - case float64: - x.MultipleOf = v17 - case float32: - x.MultipleOf = float64(v17) - case uint64: - x.MultipleOf = float64(v17) - case uint32: - x.MultipleOf = float64(v17) - case int64: - x.MultipleOf = float64(v17) - case int32: - x.MultipleOf = float64(v17) - case int: - x.MultipleOf = float64(v17) - default: - message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v17, v17) + v, ok := compiler.FloatForScalarNode(v17) + if ok { + x.MultipleOf = v + } else { + message := fmt.Sprintf("has unexpected value for multipleOf: %s", compiler.Display(v17)) errors = append(errors, compiler.NewError(context, message)) } } // repeated NamedAny vendor_extension = 18; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -4252,7 +4066,7 @@ func NewPrimitivesItems(in interface{}, context *compiler.Context) (*PrimitivesI } // NewProperties creates an object of type Properties if possible, returning an error if not. -func NewProperties(in interface{}, context *compiler.Context) (*Properties, error) { +func NewProperties(in *yaml.Node, context *compiler.Context) (*Properties, error) { errors := make([]error, 0) x := &Properties{} m, ok := compiler.UnpackMap(in) @@ -4263,10 +4077,10 @@ func NewProperties(in interface{}, context *compiler.Context) (*Properties, erro // repeated NamedSchema additional_properties = 1; // MAP: Schema x.AdditionalProperties = make([]*NamedSchema, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] pair := &NamedSchema{} pair.Name = k var err error @@ -4282,7 +4096,7 @@ func NewProperties(in interface{}, context *compiler.Context) (*Properties, erro } // NewQueryParameterSubSchema creates an object of type QueryParameterSubSchema if possible, returning an error if not. -func NewQueryParameterSubSchema(in interface{}, context *compiler.Context) (*QueryParameterSubSchema, error) { +func NewQueryParameterSubSchema(in *yaml.Node, context *compiler.Context) (*QueryParameterSubSchema, error) { errors := make([]error, 0) x := &QueryParameterSubSchema{} m, ok := compiler.UnpackMap(in) @@ -4300,75 +4114,75 @@ func NewQueryParameterSubSchema(in interface{}, context *compiler.Context) (*Que // bool required = 1; v1 := compiler.MapValueForKey(m, "required") if v1 != nil { - x.Required, ok = v1.(bool) + x.Required, ok = compiler.BoolForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string in = 2; v2 := compiler.MapValueForKey(m, "in") if v2 != nil { - x.In, ok = v2.(string) + x.In, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [query] if ok && !compiler.StringArrayContainsValue([]string{"query"}, x.In) { - message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } // string description = 3; v3 := compiler.MapValueForKey(m, "description") if v3 != nil { - x.Description, ok = v3.(string) + x.Description, ok = compiler.StringForScalarNode(v3) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3)) errors = append(errors, compiler.NewError(context, message)) } } // string name = 4; v4 := compiler.MapValueForKey(m, "name") if v4 != nil { - x.Name, ok = v4.(string) + x.Name, ok = compiler.StringForScalarNode(v4) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } } // bool allow_empty_value = 5; v5 := compiler.MapValueForKey(m, "allowEmptyValue") if v5 != nil { - x.AllowEmptyValue, ok = v5.(bool) + x.AllowEmptyValue, ok = compiler.BoolForScalarNode(v5) if !ok { - message := fmt.Sprintf("has unexpected value for allowEmptyValue: %+v (%T)", v5, v5) + message := fmt.Sprintf("has unexpected value for allowEmptyValue: %s", compiler.Display(v5)) errors = append(errors, compiler.NewError(context, message)) } } // string type = 6; v6 := compiler.MapValueForKey(m, "type") if v6 != nil { - x.Type, ok = v6.(string) + x.Type, ok = compiler.StringForScalarNode(v6) if !ok { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v6)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [string number boolean integer array] if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "boolean", "integer", "array"}, x.Type) { - message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6) + message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v6)) errors = append(errors, compiler.NewError(context, message)) } } // string format = 7; v7 := compiler.MapValueForKey(m, "format") if v7 != nil { - x.Format, ok = v7.(string) + x.Format, ok = compiler.StringForScalarNode(v7) if !ok { - message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v7, v7) + message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v7)) errors = append(errors, compiler.NewError(context, message)) } } @@ -4384,15 +4198,15 @@ func NewQueryParameterSubSchema(in interface{}, context *compiler.Context) (*Que // string collection_format = 9; v9 := compiler.MapValueForKey(m, "collectionFormat") if v9 != nil { - x.CollectionFormat, ok = v9.(string) + x.CollectionFormat, ok = compiler.StringForScalarNode(v9) if !ok { - message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v9, v9) + message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v9)) errors = append(errors, compiler.NewError(context, message)) } // check for valid enum values // [csv ssv tsv pipes multi] if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes", "multi"}, x.CollectionFormat) { - message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v9, v9) + message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v9)) errors = append(errors, compiler.NewError(context, message)) } } @@ -4408,126 +4222,102 @@ func NewQueryParameterSubSchema(in interface{}, context *compiler.Context) (*Que // float maximum = 11; v11 := compiler.MapValueForKey(m, "maximum") if v11 != nil { - switch v11 := v11.(type) { - case float64: - x.Maximum = v11 - case float32: - x.Maximum = float64(v11) - case uint64: - x.Maximum = float64(v11) - case uint32: - x.Maximum = float64(v11) - case int64: - x.Maximum = float64(v11) - case int32: - x.Maximum = float64(v11) - case int: - x.Maximum = float64(v11) - default: - message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v11, v11) + v, ok := compiler.FloatForScalarNode(v11) + if ok { + x.Maximum = v + } else { + message := fmt.Sprintf("has unexpected value for maximum: %s", compiler.Display(v11)) errors = append(errors, compiler.NewError(context, message)) } } // bool exclusive_maximum = 12; v12 := compiler.MapValueForKey(m, "exclusiveMaximum") if v12 != nil { - x.ExclusiveMaximum, ok = v12.(bool) + x.ExclusiveMaximum, ok = compiler.BoolForScalarNode(v12) if !ok { - message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v12, v12) + message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %s", compiler.Display(v12)) errors = append(errors, compiler.NewError(context, message)) } } // float minimum = 13; v13 := compiler.MapValueForKey(m, "minimum") if v13 != nil { - switch v13 := v13.(type) { - case float64: - x.Minimum = v13 - case float32: - x.Minimum = float64(v13) - case uint64: - x.Minimum = float64(v13) - case uint32: - x.Minimum = float64(v13) - case int64: - x.Minimum = float64(v13) - case int32: - x.Minimum = float64(v13) - case int: - x.Minimum = float64(v13) - default: - message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v13, v13) + v, ok := compiler.FloatForScalarNode(v13) + if ok { + x.Minimum = v + } else { + message := fmt.Sprintf("has unexpected value for minimum: %s", compiler.Display(v13)) errors = append(errors, compiler.NewError(context, message)) } } // bool exclusive_minimum = 14; v14 := compiler.MapValueForKey(m, "exclusiveMinimum") if v14 != nil { - x.ExclusiveMinimum, ok = v14.(bool) + x.ExclusiveMinimum, ok = compiler.BoolForScalarNode(v14) if !ok { - message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v14, v14) + message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %s", compiler.Display(v14)) errors = append(errors, compiler.NewError(context, message)) } } // int64 max_length = 15; v15 := compiler.MapValueForKey(m, "maxLength") if v15 != nil { - t, ok := v15.(int) + t, ok := compiler.IntForScalarNode(v15) if ok { x.MaxLength = int64(t) } else { - message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v15, v15) + message := fmt.Sprintf("has unexpected value for maxLength: %s", compiler.Display(v15)) errors = append(errors, compiler.NewError(context, message)) } } // int64 min_length = 16; v16 := compiler.MapValueForKey(m, "minLength") if v16 != nil { - t, ok := v16.(int) + t, ok := compiler.IntForScalarNode(v16) if ok { x.MinLength = int64(t) } else { - message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v16, v16) + message := fmt.Sprintf("has unexpected value for minLength: %s", compiler.Display(v16)) errors = append(errors, compiler.NewError(context, message)) } } // string pattern = 17; v17 := compiler.MapValueForKey(m, "pattern") if v17 != nil { - x.Pattern, ok = v17.(string) + x.Pattern, ok = compiler.StringForScalarNode(v17) if !ok { - message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v17, v17) + message := fmt.Sprintf("has unexpected value for pattern: %s", compiler.Display(v17)) errors = append(errors, compiler.NewError(context, message)) } } // int64 max_items = 18; v18 := compiler.MapValueForKey(m, "maxItems") if v18 != nil { - t, ok := v18.(int) + t, ok := compiler.IntForScalarNode(v18) if ok { x.MaxItems = int64(t) } else { - message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v18, v18) + message := fmt.Sprintf("has unexpected value for maxItems: %s", compiler.Display(v18)) errors = append(errors, compiler.NewError(context, message)) } } // int64 min_items = 19; v19 := compiler.MapValueForKey(m, "minItems") if v19 != nil { - t, ok := v19.(int) + t, ok := compiler.IntForScalarNode(v19) if ok { x.MinItems = int64(t) } else { - message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v19, v19) + message := fmt.Sprintf("has unexpected value for minItems: %s", compiler.Display(v19)) errors = append(errors, compiler.NewError(context, message)) } } // bool unique_items = 20; v20 := compiler.MapValueForKey(m, "uniqueItems") if v20 != nil { - x.UniqueItems, ok = v20.(bool) + x.UniqueItems, ok = compiler.BoolForScalarNode(v20) if !ok { - message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v20, v20) + message := fmt.Sprintf("has unexpected value for uniqueItems: %s", compiler.Display(v20)) errors = append(errors, compiler.NewError(context, message)) } } @@ -4536,9 +4326,9 @@ func NewQueryParameterSubSchema(in interface{}, context *compiler.Context) (*Que if v21 != nil { // repeated Any x.Enum = make([]*Any, 0) - a, ok := v21.([]interface{}) + a, ok := compiler.SequenceNodeForNode(v21) if ok { - for _, item := range a { + for _, item := range a.Content { y, err := NewAny(item, compiler.NewContext("enum", context)) if err != nil { errors = append(errors, err) @@ -4550,43 +4340,31 @@ func NewQueryParameterSubSchema(in interface{}, context *compiler.Context) (*Que // float multiple_of = 22; v22 := compiler.MapValueForKey(m, "multipleOf") if v22 != nil { - switch v22 := v22.(type) { - case float64: - x.MultipleOf = v22 - case float32: - x.MultipleOf = float64(v22) - case uint64: - x.MultipleOf = float64(v22) - case uint32: - x.MultipleOf = float64(v22) - case int64: - x.MultipleOf = float64(v22) - case int32: - x.MultipleOf = float64(v22) - case int: - x.MultipleOf = float64(v22) - default: - message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v22, v22) + v, ok := compiler.FloatForScalarNode(v22) + if ok { + x.MultipleOf = v + } else { + message := fmt.Sprintf("has unexpected value for multipleOf: %s", compiler.Display(v22)) errors = append(errors, compiler.NewError(context, message)) } } // repeated NamedAny vendor_extension = 23; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -4606,7 +4384,7 @@ func NewQueryParameterSubSchema(in interface{}, context *compiler.Context) (*Que } // NewResponse creates an object of type Response if possible, returning an error if not. -func NewResponse(in interface{}, context *compiler.Context) (*Response, error) { +func NewResponse(in *yaml.Node, context *compiler.Context) (*Response, error) { errors := make([]error, 0) x := &Response{} m, ok := compiler.UnpackMap(in) @@ -4630,9 +4408,9 @@ func NewResponse(in interface{}, context *compiler.Context) (*Response, error) { // string description = 1; v1 := compiler.MapValueForKey(m, "description") if v1 != nil { - x.Description, ok = v1.(string) + x.Description, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } @@ -4666,20 +4444,20 @@ func NewResponse(in interface{}, context *compiler.Context) (*Response, error) { // repeated NamedAny vendor_extension = 5; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -4699,7 +4477,7 @@ func NewResponse(in interface{}, context *compiler.Context) (*Response, error) { } // NewResponseDefinitions creates an object of type ResponseDefinitions if possible, returning an error if not. -func NewResponseDefinitions(in interface{}, context *compiler.Context) (*ResponseDefinitions, error) { +func NewResponseDefinitions(in *yaml.Node, context *compiler.Context) (*ResponseDefinitions, error) { errors := make([]error, 0) x := &ResponseDefinitions{} m, ok := compiler.UnpackMap(in) @@ -4710,10 +4488,10 @@ func NewResponseDefinitions(in interface{}, context *compiler.Context) (*Respons // repeated NamedResponse additional_properties = 1; // MAP: Response x.AdditionalProperties = make([]*NamedResponse, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] pair := &NamedResponse{} pair.Name = k var err error @@ -4729,7 +4507,7 @@ func NewResponseDefinitions(in interface{}, context *compiler.Context) (*Respons } // NewResponseValue creates an object of type ResponseValue if possible, returning an error if not. -func NewResponseValue(in interface{}, context *compiler.Context) (*ResponseValue, error) { +func NewResponseValue(in *yaml.Node, context *compiler.Context) (*ResponseValue, error) { errors := make([]error, 0) x := &ResponseValue{} matched := false @@ -4769,7 +4547,7 @@ func NewResponseValue(in interface{}, context *compiler.Context) (*ResponseValue } // NewResponses creates an object of type Responses if possible, returning an error if not. -func NewResponses(in interface{}, context *compiler.Context) (*Responses, error) { +func NewResponses(in *yaml.Node, context *compiler.Context) (*Responses, error) { errors := make([]error, 0) x := &Responses{} m, ok := compiler.UnpackMap(in) @@ -4787,10 +4565,10 @@ func NewResponses(in interface{}, context *compiler.Context) (*Responses, error) // repeated NamedResponseValue response_code = 1; // MAP: ResponseValue ^([0-9]{3})$|^(default)$ x.ResponseCode = make([]*NamedResponseValue, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if pattern2.MatchString(k) { pair := &NamedResponseValue{} pair.Name = k @@ -4806,20 +4584,20 @@ func NewResponses(in interface{}, context *compiler.Context) (*Responses, error) // repeated NamedAny vendor_extension = 2; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -4839,7 +4617,7 @@ func NewResponses(in interface{}, context *compiler.Context) (*Responses, error) } // NewSchema creates an object of type Schema if possible, returning an error if not. -func NewSchema(in interface{}, context *compiler.Context) (*Schema, error) { +func NewSchema(in *yaml.Node, context *compiler.Context) (*Schema, error) { errors := make([]error, 0) x := &Schema{} m, ok := compiler.UnpackMap(in) @@ -4857,36 +4635,36 @@ func NewSchema(in interface{}, context *compiler.Context) (*Schema, error) { // string _ref = 1; v1 := compiler.MapValueForKey(m, "$ref") if v1 != nil { - x.XRef, ok = v1.(string) + x.XRef, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for $ref: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for $ref: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string format = 2; v2 := compiler.MapValueForKey(m, "format") if v2 != nil { - x.Format, ok = v2.(string) + x.Format, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } // string title = 3; v3 := compiler.MapValueForKey(m, "title") if v3 != nil { - x.Title, ok = v3.(string) + x.Title, ok = compiler.StringForScalarNode(v3) if !ok { - message := fmt.Sprintf("has unexpected value for title: %+v (%T)", v3, v3) + message := fmt.Sprintf("has unexpected value for title: %s", compiler.Display(v3)) errors = append(errors, compiler.NewError(context, message)) } } // string description = 4; v4 := compiler.MapValueForKey(m, "description") if v4 != nil { - x.Description, ok = v4.(string) + x.Description, ok = compiler.StringForScalarNode(v4) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } } @@ -4902,182 +4680,146 @@ func NewSchema(in interface{}, context *compiler.Context) (*Schema, error) { // float multiple_of = 6; v6 := compiler.MapValueForKey(m, "multipleOf") if v6 != nil { - switch v6 := v6.(type) { - case float64: - x.MultipleOf = v6 - case float32: - x.MultipleOf = float64(v6) - case uint64: - x.MultipleOf = float64(v6) - case uint32: - x.MultipleOf = float64(v6) - case int64: - x.MultipleOf = float64(v6) - case int32: - x.MultipleOf = float64(v6) - case int: - x.MultipleOf = float64(v6) - default: - message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v6, v6) + v, ok := compiler.FloatForScalarNode(v6) + if ok { + x.MultipleOf = v + } else { + message := fmt.Sprintf("has unexpected value for multipleOf: %s", compiler.Display(v6)) errors = append(errors, compiler.NewError(context, message)) } } // float maximum = 7; v7 := compiler.MapValueForKey(m, "maximum") if v7 != nil { - switch v7 := v7.(type) { - case float64: - x.Maximum = v7 - case float32: - x.Maximum = float64(v7) - case uint64: - x.Maximum = float64(v7) - case uint32: - x.Maximum = float64(v7) - case int64: - x.Maximum = float64(v7) - case int32: - x.Maximum = float64(v7) - case int: - x.Maximum = float64(v7) - default: - message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v7, v7) + v, ok := compiler.FloatForScalarNode(v7) + if ok { + x.Maximum = v + } else { + message := fmt.Sprintf("has unexpected value for maximum: %s", compiler.Display(v7)) errors = append(errors, compiler.NewError(context, message)) } } // bool exclusive_maximum = 8; v8 := compiler.MapValueForKey(m, "exclusiveMaximum") if v8 != nil { - x.ExclusiveMaximum, ok = v8.(bool) + x.ExclusiveMaximum, ok = compiler.BoolForScalarNode(v8) if !ok { - message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v8, v8) + message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %s", compiler.Display(v8)) errors = append(errors, compiler.NewError(context, message)) } } // float minimum = 9; v9 := compiler.MapValueForKey(m, "minimum") if v9 != nil { - switch v9 := v9.(type) { - case float64: - x.Minimum = v9 - case float32: - x.Minimum = float64(v9) - case uint64: - x.Minimum = float64(v9) - case uint32: - x.Minimum = float64(v9) - case int64: - x.Minimum = float64(v9) - case int32: - x.Minimum = float64(v9) - case int: - x.Minimum = float64(v9) - default: - message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v9, v9) + v, ok := compiler.FloatForScalarNode(v9) + if ok { + x.Minimum = v + } else { + message := fmt.Sprintf("has unexpected value for minimum: %s", compiler.Display(v9)) errors = append(errors, compiler.NewError(context, message)) } } // bool exclusive_minimum = 10; v10 := compiler.MapValueForKey(m, "exclusiveMinimum") if v10 != nil { - x.ExclusiveMinimum, ok = v10.(bool) + x.ExclusiveMinimum, ok = compiler.BoolForScalarNode(v10) if !ok { - message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v10, v10) + message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %s", compiler.Display(v10)) errors = append(errors, compiler.NewError(context, message)) } } // int64 max_length = 11; v11 := compiler.MapValueForKey(m, "maxLength") if v11 != nil { - t, ok := v11.(int) + t, ok := compiler.IntForScalarNode(v11) if ok { x.MaxLength = int64(t) } else { - message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v11, v11) + message := fmt.Sprintf("has unexpected value for maxLength: %s", compiler.Display(v11)) errors = append(errors, compiler.NewError(context, message)) } } // int64 min_length = 12; v12 := compiler.MapValueForKey(m, "minLength") if v12 != nil { - t, ok := v12.(int) + t, ok := compiler.IntForScalarNode(v12) if ok { x.MinLength = int64(t) } else { - message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v12, v12) + message := fmt.Sprintf("has unexpected value for minLength: %s", compiler.Display(v12)) errors = append(errors, compiler.NewError(context, message)) } } // string pattern = 13; v13 := compiler.MapValueForKey(m, "pattern") if v13 != nil { - x.Pattern, ok = v13.(string) + x.Pattern, ok = compiler.StringForScalarNode(v13) if !ok { - message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v13, v13) + message := fmt.Sprintf("has unexpected value for pattern: %s", compiler.Display(v13)) errors = append(errors, compiler.NewError(context, message)) } } // int64 max_items = 14; v14 := compiler.MapValueForKey(m, "maxItems") if v14 != nil { - t, ok := v14.(int) + t, ok := compiler.IntForScalarNode(v14) if ok { x.MaxItems = int64(t) } else { - message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v14, v14) + message := fmt.Sprintf("has unexpected value for maxItems: %s", compiler.Display(v14)) errors = append(errors, compiler.NewError(context, message)) } } // int64 min_items = 15; v15 := compiler.MapValueForKey(m, "minItems") if v15 != nil { - t, ok := v15.(int) + t, ok := compiler.IntForScalarNode(v15) if ok { x.MinItems = int64(t) } else { - message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v15, v15) + message := fmt.Sprintf("has unexpected value for minItems: %s", compiler.Display(v15)) errors = append(errors, compiler.NewError(context, message)) } } // bool unique_items = 16; v16 := compiler.MapValueForKey(m, "uniqueItems") if v16 != nil { - x.UniqueItems, ok = v16.(bool) + x.UniqueItems, ok = compiler.BoolForScalarNode(v16) if !ok { - message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v16, v16) + message := fmt.Sprintf("has unexpected value for uniqueItems: %s", compiler.Display(v16)) errors = append(errors, compiler.NewError(context, message)) } } // int64 max_properties = 17; v17 := compiler.MapValueForKey(m, "maxProperties") if v17 != nil { - t, ok := v17.(int) + t, ok := compiler.IntForScalarNode(v17) if ok { x.MaxProperties = int64(t) } else { - message := fmt.Sprintf("has unexpected value for maxProperties: %+v (%T)", v17, v17) + message := fmt.Sprintf("has unexpected value for maxProperties: %s", compiler.Display(v17)) errors = append(errors, compiler.NewError(context, message)) } } // int64 min_properties = 18; v18 := compiler.MapValueForKey(m, "minProperties") if v18 != nil { - t, ok := v18.(int) + t, ok := compiler.IntForScalarNode(v18) if ok { x.MinProperties = int64(t) } else { - message := fmt.Sprintf("has unexpected value for minProperties: %+v (%T)", v18, v18) + message := fmt.Sprintf("has unexpected value for minProperties: %s", compiler.Display(v18)) errors = append(errors, compiler.NewError(context, message)) } } // repeated string required = 19; v19 := compiler.MapValueForKey(m, "required") if v19 != nil { - v, ok := v19.([]interface{}) + v, ok := compiler.SequenceNodeForNode(v19) if ok { - x.Required = compiler.ConvertInterfaceArrayToStringArray(v) + x.Required = compiler.StringArrayForSequenceNode(v) } else { - message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v19, v19) + message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v19)) errors = append(errors, compiler.NewError(context, message)) } } @@ -5086,9 +4828,9 @@ func NewSchema(in interface{}, context *compiler.Context) (*Schema, error) { if v20 != nil { // repeated Any x.Enum = make([]*Any, 0) - a, ok := v20.([]interface{}) + a, ok := compiler.SequenceNodeForNode(v20) if ok { - for _, item := range a { + for _, item := range a.Content { y, err := NewAny(item, compiler.NewContext("enum", context)) if err != nil { errors = append(errors, err) @@ -5129,9 +4871,9 @@ func NewSchema(in interface{}, context *compiler.Context) (*Schema, error) { if v24 != nil { // repeated Schema x.AllOf = make([]*Schema, 0) - a, ok := v24.([]interface{}) + a, ok := compiler.SequenceNodeForNode(v24) if ok { - for _, item := range a { + for _, item := range a.Content { y, err := NewSchema(item, compiler.NewContext("allOf", context)) if err != nil { errors = append(errors, err) @@ -5152,18 +4894,18 @@ func NewSchema(in interface{}, context *compiler.Context) (*Schema, error) { // string discriminator = 26; v26 := compiler.MapValueForKey(m, "discriminator") if v26 != nil { - x.Discriminator, ok = v26.(string) + x.Discriminator, ok = compiler.StringForScalarNode(v26) if !ok { - message := fmt.Sprintf("has unexpected value for discriminator: %+v (%T)", v26, v26) + message := fmt.Sprintf("has unexpected value for discriminator: %s", compiler.Display(v26)) errors = append(errors, compiler.NewError(context, message)) } } // bool read_only = 27; v27 := compiler.MapValueForKey(m, "readOnly") if v27 != nil { - x.ReadOnly, ok = v27.(bool) + x.ReadOnly, ok = compiler.BoolForScalarNode(v27) if !ok { - message := fmt.Sprintf("has unexpected value for readOnly: %+v (%T)", v27, v27) + message := fmt.Sprintf("has unexpected value for readOnly: %s", compiler.Display(v27)) errors = append(errors, compiler.NewError(context, message)) } } @@ -5197,20 +4939,20 @@ func NewSchema(in interface{}, context *compiler.Context) (*Schema, error) { // repeated NamedAny vendor_extension = 31; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -5230,7 +4972,7 @@ func NewSchema(in interface{}, context *compiler.Context) (*Schema, error) { } // NewSchemaItem creates an object of type SchemaItem if possible, returning an error if not. -func NewSchemaItem(in interface{}, context *compiler.Context) (*SchemaItem, error) { +func NewSchemaItem(in *yaml.Node, context *compiler.Context) (*SchemaItem, error) { errors := make([]error, 0) x := &SchemaItem{} matched := false @@ -5270,7 +5012,7 @@ func NewSchemaItem(in interface{}, context *compiler.Context) (*SchemaItem, erro } // NewSecurityDefinitions creates an object of type SecurityDefinitions if possible, returning an error if not. -func NewSecurityDefinitions(in interface{}, context *compiler.Context) (*SecurityDefinitions, error) { +func NewSecurityDefinitions(in *yaml.Node, context *compiler.Context) (*SecurityDefinitions, error) { errors := make([]error, 0) x := &SecurityDefinitions{} m, ok := compiler.UnpackMap(in) @@ -5281,10 +5023,10 @@ func NewSecurityDefinitions(in interface{}, context *compiler.Context) (*Securit // repeated NamedSecurityDefinitionsItem additional_properties = 1; // MAP: SecurityDefinitionsItem x.AdditionalProperties = make([]*NamedSecurityDefinitionsItem, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] pair := &NamedSecurityDefinitionsItem{} pair.Name = k var err error @@ -5300,7 +5042,7 @@ func NewSecurityDefinitions(in interface{}, context *compiler.Context) (*Securit } // NewSecurityDefinitionsItem creates an object of type SecurityDefinitionsItem if possible, returning an error if not. -func NewSecurityDefinitionsItem(in interface{}, context *compiler.Context) (*SecurityDefinitionsItem, error) { +func NewSecurityDefinitionsItem(in *yaml.Node, context *compiler.Context) (*SecurityDefinitionsItem, error) { errors := make([]error, 0) x := &SecurityDefinitionsItem{} matched := false @@ -5396,7 +5138,7 @@ func NewSecurityDefinitionsItem(in interface{}, context *compiler.Context) (*Sec } // NewSecurityRequirement creates an object of type SecurityRequirement if possible, returning an error if not. -func NewSecurityRequirement(in interface{}, context *compiler.Context) (*SecurityRequirement, error) { +func NewSecurityRequirement(in *yaml.Node, context *compiler.Context) (*SecurityRequirement, error) { errors := make([]error, 0) x := &SecurityRequirement{} m, ok := compiler.UnpackMap(in) @@ -5407,10 +5149,10 @@ func NewSecurityRequirement(in interface{}, context *compiler.Context) (*Securit // repeated NamedStringArray additional_properties = 1; // MAP: StringArray x.AdditionalProperties = make([]*NamedStringArray, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] pair := &NamedStringArray{} pair.Name = k var err error @@ -5426,24 +5168,19 @@ func NewSecurityRequirement(in interface{}, context *compiler.Context) (*Securit } // NewStringArray creates an object of type StringArray if possible, returning an error if not. -func NewStringArray(in interface{}, context *compiler.Context) (*StringArray, error) { +func NewStringArray(in *yaml.Node, context *compiler.Context) (*StringArray, error) { errors := make([]error, 0) x := &StringArray{} - a, ok := in.([]interface{}) - if !ok { - message := fmt.Sprintf("has unexpected value for StringArray: %+v (%T)", in, in) - errors = append(errors, compiler.NewError(context, message)) - } else { - x.Value = make([]string, 0) - for _, s := range a { - x.Value = append(x.Value, s.(string)) - } + x.Value = make([]string, 0) + for _, node := range in.Content { + s, _ := compiler.StringForScalarNode(node) + x.Value = append(x.Value, s) } return x, compiler.NewErrorGroupOrNil(errors) } // NewTag creates an object of type Tag if possible, returning an error if not. -func NewTag(in interface{}, context *compiler.Context) (*Tag, error) { +func NewTag(in *yaml.Node, context *compiler.Context) (*Tag, error) { errors := make([]error, 0) x := &Tag{} m, ok := compiler.UnpackMap(in) @@ -5467,18 +5204,18 @@ func NewTag(in interface{}, context *compiler.Context) (*Tag, error) { // string name = 1; v1 := compiler.MapValueForKey(m, "name") if v1 != nil { - x.Name, ok = v1.(string) + x.Name, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string description = 2; v2 := compiler.MapValueForKey(m, "description") if v2 != nil { - x.Description, ok = v2.(string) + x.Description, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } @@ -5494,20 +5231,20 @@ func NewTag(in interface{}, context *compiler.Context) (*Tag, error) { // repeated NamedAny vendor_extension = 4; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -5527,17 +5264,19 @@ func NewTag(in interface{}, context *compiler.Context) (*Tag, error) { } // NewTypeItem creates an object of type TypeItem if possible, returning an error if not. -func NewTypeItem(in interface{}, context *compiler.Context) (*TypeItem, error) { +func NewTypeItem(in *yaml.Node, context *compiler.Context) (*TypeItem, error) { errors := make([]error, 0) x := &TypeItem{} - switch in := in.(type) { - case string: + v1 := in + switch v1.Kind { + case yaml.ScalarNode: x.Value = make([]string, 0) - x.Value = append(x.Value, in) - case []interface{}: + x.Value = append(x.Value, v1.Value) + case yaml.SequenceNode: x.Value = make([]string, 0) - for _, v := range in { - value, ok := v.(string) + for _, v := range v1.Content { + value := v.Value + ok := v.Kind == yaml.ScalarNode if ok { x.Value = append(x.Value, value) } else { @@ -5553,7 +5292,7 @@ func NewTypeItem(in interface{}, context *compiler.Context) (*TypeItem, error) { } // NewVendorExtension creates an object of type VendorExtension if possible, returning an error if not. -func NewVendorExtension(in interface{}, context *compiler.Context) (*VendorExtension, error) { +func NewVendorExtension(in *yaml.Node, context *compiler.Context) (*VendorExtension, error) { errors := make([]error, 0) x := &VendorExtension{} m, ok := compiler.UnpackMap(in) @@ -5564,19 +5303,19 @@ func NewVendorExtension(in interface{}, context *compiler.Context) (*VendorExten // repeated NamedAny additional_properties = 1; // MAP: Any x.AdditionalProperties = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -5595,7 +5334,7 @@ func NewVendorExtension(in interface{}, context *compiler.Context) (*VendorExten } // NewXml creates an object of type Xml if possible, returning an error if not. -func NewXml(in interface{}, context *compiler.Context) (*Xml, error) { +func NewXml(in *yaml.Node, context *compiler.Context) (*Xml, error) { errors := make([]error, 0) x := &Xml{} m, ok := compiler.UnpackMap(in) @@ -5613,65 +5352,65 @@ func NewXml(in interface{}, context *compiler.Context) (*Xml, error) { // string name = 1; v1 := compiler.MapValueForKey(m, "name") if v1 != nil { - x.Name, ok = v1.(string) + x.Name, ok = compiler.StringForScalarNode(v1) if !ok { - message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1)) errors = append(errors, compiler.NewError(context, message)) } } // string namespace = 2; v2 := compiler.MapValueForKey(m, "namespace") if v2 != nil { - x.Namespace, ok = v2.(string) + x.Namespace, ok = compiler.StringForScalarNode(v2) if !ok { - message := fmt.Sprintf("has unexpected value for namespace: %+v (%T)", v2, v2) + message := fmt.Sprintf("has unexpected value for namespace: %s", compiler.Display(v2)) errors = append(errors, compiler.NewError(context, message)) } } // string prefix = 3; v3 := compiler.MapValueForKey(m, "prefix") if v3 != nil { - x.Prefix, ok = v3.(string) + x.Prefix, ok = compiler.StringForScalarNode(v3) if !ok { - message := fmt.Sprintf("has unexpected value for prefix: %+v (%T)", v3, v3) + message := fmt.Sprintf("has unexpected value for prefix: %s", compiler.Display(v3)) errors = append(errors, compiler.NewError(context, message)) } } // bool attribute = 4; v4 := compiler.MapValueForKey(m, "attribute") if v4 != nil { - x.Attribute, ok = v4.(bool) + x.Attribute, ok = compiler.BoolForScalarNode(v4) if !ok { - message := fmt.Sprintf("has unexpected value for attribute: %+v (%T)", v4, v4) + message := fmt.Sprintf("has unexpected value for attribute: %s", compiler.Display(v4)) errors = append(errors, compiler.NewError(context, message)) } } // bool wrapped = 5; v5 := compiler.MapValueForKey(m, "wrapped") if v5 != nil { - x.Wrapped, ok = v5.(bool) + x.Wrapped, ok = compiler.BoolForScalarNode(v5) if !ok { - message := fmt.Sprintf("has unexpected value for wrapped: %+v (%T)", v5, v5) + message := fmt.Sprintf("has unexpected value for wrapped: %s", compiler.Display(v5)) errors = append(errors, compiler.NewError(context, message)) } } // repeated NamedAny vendor_extension = 6; // MAP: Any ^x- x.VendorExtension = make([]*NamedAny, 0) - for _, item := range m { - k, ok := compiler.StringValue(item.Key) + for i := 0; i < len(m.Content); i += 2 { + k, ok := compiler.StringForScalarNode(m.Content[i]) if ok { - v := item.Value + v := m.Content[i+1] if strings.HasPrefix(k, "x-") { pair := &NamedAny{} pair.Name = k result := &Any{} - handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + handled, resultFromExt, err := compiler.CallExtension(context, v, k) if handled { if err != nil { errors = append(errors, err) } else { - bytes, _ := yaml.Marshal(v) + bytes := compiler.Marshal(v) result.Yaml = string(bytes) result.Value = resultFromExt pair.Value = result @@ -5691,7 +5430,7 @@ func NewXml(in interface{}, context *compiler.Context) (*Xml, error) { } // ResolveReferences resolves references found inside AdditionalPropertiesItem objects. -func (m *AdditionalPropertiesItem) ResolveReferences(root string) (interface{}, error) { +func (m *AdditionalPropertiesItem) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) { p, ok := m.Oneof.(*AdditionalPropertiesItem_Schema) @@ -5706,13 +5445,13 @@ func (m *AdditionalPropertiesItem) ResolveReferences(root string) (interface{}, } // ResolveReferences resolves references found inside Any objects. -func (m *Any) ResolveReferences(root string) (interface{}, error) { +func (m *Any) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) return nil, compiler.NewErrorGroupOrNil(errors) } // ResolveReferences resolves references found inside ApiKeySecurity objects. -func (m *ApiKeySecurity) ResolveReferences(root string) (interface{}, error) { +func (m *ApiKeySecurity) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.VendorExtension { if item != nil { @@ -5726,7 +5465,7 @@ func (m *ApiKeySecurity) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside BasicAuthenticationSecurity objects. -func (m *BasicAuthenticationSecurity) ResolveReferences(root string) (interface{}, error) { +func (m *BasicAuthenticationSecurity) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.VendorExtension { if item != nil { @@ -5740,7 +5479,7 @@ func (m *BasicAuthenticationSecurity) ResolveReferences(root string) (interface{ } // ResolveReferences resolves references found inside BodyParameter objects. -func (m *BodyParameter) ResolveReferences(root string) (interface{}, error) { +func (m *BodyParameter) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Schema != nil { _, err := m.Schema.ResolveReferences(root) @@ -5760,7 +5499,7 @@ func (m *BodyParameter) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside Contact objects. -func (m *Contact) ResolveReferences(root string) (interface{}, error) { +func (m *Contact) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.VendorExtension { if item != nil { @@ -5774,7 +5513,7 @@ func (m *Contact) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside Default objects. -func (m *Default) ResolveReferences(root string) (interface{}, error) { +func (m *Default) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.AdditionalProperties { if item != nil { @@ -5788,7 +5527,7 @@ func (m *Default) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside Definitions objects. -func (m *Definitions) ResolveReferences(root string) (interface{}, error) { +func (m *Definitions) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.AdditionalProperties { if item != nil { @@ -5802,7 +5541,7 @@ func (m *Definitions) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside Document objects. -func (m *Document) ResolveReferences(root string) (interface{}, error) { +func (m *Document) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Info != nil { _, err := m.Info.ResolveReferences(root) @@ -5874,7 +5613,7 @@ func (m *Document) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside Examples objects. -func (m *Examples) ResolveReferences(root string) (interface{}, error) { +func (m *Examples) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.AdditionalProperties { if item != nil { @@ -5888,7 +5627,7 @@ func (m *Examples) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside ExternalDocs objects. -func (m *ExternalDocs) ResolveReferences(root string) (interface{}, error) { +func (m *ExternalDocs) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.VendorExtension { if item != nil { @@ -5902,7 +5641,7 @@ func (m *ExternalDocs) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside FileSchema objects. -func (m *FileSchema) ResolveReferences(root string) (interface{}, error) { +func (m *FileSchema) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Default != nil { _, err := m.Default.ResolveReferences(root) @@ -5934,7 +5673,7 @@ func (m *FileSchema) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside FormDataParameterSubSchema objects. -func (m *FormDataParameterSubSchema) ResolveReferences(root string) (interface{}, error) { +func (m *FormDataParameterSubSchema) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Items != nil { _, err := m.Items.ResolveReferences(root) @@ -5968,7 +5707,7 @@ func (m *FormDataParameterSubSchema) ResolveReferences(root string) (interface{} } // ResolveReferences resolves references found inside Header objects. -func (m *Header) ResolveReferences(root string) (interface{}, error) { +func (m *Header) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Items != nil { _, err := m.Items.ResolveReferences(root) @@ -6002,7 +5741,7 @@ func (m *Header) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside HeaderParameterSubSchema objects. -func (m *HeaderParameterSubSchema) ResolveReferences(root string) (interface{}, error) { +func (m *HeaderParameterSubSchema) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Items != nil { _, err := m.Items.ResolveReferences(root) @@ -6036,7 +5775,7 @@ func (m *HeaderParameterSubSchema) ResolveReferences(root string) (interface{}, } // ResolveReferences resolves references found inside Headers objects. -func (m *Headers) ResolveReferences(root string) (interface{}, error) { +func (m *Headers) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.AdditionalProperties { if item != nil { @@ -6050,7 +5789,7 @@ func (m *Headers) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside Info objects. -func (m *Info) ResolveReferences(root string) (interface{}, error) { +func (m *Info) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Contact != nil { _, err := m.Contact.ResolveReferences(root) @@ -6076,7 +5815,7 @@ func (m *Info) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside ItemsItem objects. -func (m *ItemsItem) ResolveReferences(root string) (interface{}, error) { +func (m *ItemsItem) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.Schema { if item != nil { @@ -6090,7 +5829,7 @@ func (m *ItemsItem) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside JsonReference objects. -func (m *JsonReference) ResolveReferences(root string) (interface{}, error) { +func (m *JsonReference) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.XRef != "" { info, err := compiler.ReadInfoForRef(root, m.XRef) @@ -6110,7 +5849,7 @@ func (m *JsonReference) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside License objects. -func (m *License) ResolveReferences(root string) (interface{}, error) { +func (m *License) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.VendorExtension { if item != nil { @@ -6124,7 +5863,7 @@ func (m *License) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside NamedAny objects. -func (m *NamedAny) ResolveReferences(root string) (interface{}, error) { +func (m *NamedAny) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Value != nil { _, err := m.Value.ResolveReferences(root) @@ -6136,7 +5875,7 @@ func (m *NamedAny) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside NamedHeader objects. -func (m *NamedHeader) ResolveReferences(root string) (interface{}, error) { +func (m *NamedHeader) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Value != nil { _, err := m.Value.ResolveReferences(root) @@ -6148,7 +5887,7 @@ func (m *NamedHeader) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside NamedParameter objects. -func (m *NamedParameter) ResolveReferences(root string) (interface{}, error) { +func (m *NamedParameter) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Value != nil { _, err := m.Value.ResolveReferences(root) @@ -6160,7 +5899,7 @@ func (m *NamedParameter) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside NamedPathItem objects. -func (m *NamedPathItem) ResolveReferences(root string) (interface{}, error) { +func (m *NamedPathItem) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Value != nil { _, err := m.Value.ResolveReferences(root) @@ -6172,7 +5911,7 @@ func (m *NamedPathItem) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside NamedResponse objects. -func (m *NamedResponse) ResolveReferences(root string) (interface{}, error) { +func (m *NamedResponse) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Value != nil { _, err := m.Value.ResolveReferences(root) @@ -6184,7 +5923,7 @@ func (m *NamedResponse) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside NamedResponseValue objects. -func (m *NamedResponseValue) ResolveReferences(root string) (interface{}, error) { +func (m *NamedResponseValue) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Value != nil { _, err := m.Value.ResolveReferences(root) @@ -6196,7 +5935,7 @@ func (m *NamedResponseValue) ResolveReferences(root string) (interface{}, error) } // ResolveReferences resolves references found inside NamedSchema objects. -func (m *NamedSchema) ResolveReferences(root string) (interface{}, error) { +func (m *NamedSchema) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Value != nil { _, err := m.Value.ResolveReferences(root) @@ -6208,7 +5947,7 @@ func (m *NamedSchema) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside NamedSecurityDefinitionsItem objects. -func (m *NamedSecurityDefinitionsItem) ResolveReferences(root string) (interface{}, error) { +func (m *NamedSecurityDefinitionsItem) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Value != nil { _, err := m.Value.ResolveReferences(root) @@ -6220,13 +5959,13 @@ func (m *NamedSecurityDefinitionsItem) ResolveReferences(root string) (interface } // ResolveReferences resolves references found inside NamedString objects. -func (m *NamedString) ResolveReferences(root string) (interface{}, error) { +func (m *NamedString) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) return nil, compiler.NewErrorGroupOrNil(errors) } // ResolveReferences resolves references found inside NamedStringArray objects. -func (m *NamedStringArray) ResolveReferences(root string) (interface{}, error) { +func (m *NamedStringArray) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Value != nil { _, err := m.Value.ResolveReferences(root) @@ -6238,7 +5977,7 @@ func (m *NamedStringArray) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside NonBodyParameter objects. -func (m *NonBodyParameter) ResolveReferences(root string) (interface{}, error) { +func (m *NonBodyParameter) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) { p, ok := m.Oneof.(*NonBodyParameter_HeaderParameterSubSchema) @@ -6280,7 +6019,7 @@ func (m *NonBodyParameter) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside Oauth2AccessCodeSecurity objects. -func (m *Oauth2AccessCodeSecurity) ResolveReferences(root string) (interface{}, error) { +func (m *Oauth2AccessCodeSecurity) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Scopes != nil { _, err := m.Scopes.ResolveReferences(root) @@ -6300,7 +6039,7 @@ func (m *Oauth2AccessCodeSecurity) ResolveReferences(root string) (interface{}, } // ResolveReferences resolves references found inside Oauth2ApplicationSecurity objects. -func (m *Oauth2ApplicationSecurity) ResolveReferences(root string) (interface{}, error) { +func (m *Oauth2ApplicationSecurity) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Scopes != nil { _, err := m.Scopes.ResolveReferences(root) @@ -6320,7 +6059,7 @@ func (m *Oauth2ApplicationSecurity) ResolveReferences(root string) (interface{}, } // ResolveReferences resolves references found inside Oauth2ImplicitSecurity objects. -func (m *Oauth2ImplicitSecurity) ResolveReferences(root string) (interface{}, error) { +func (m *Oauth2ImplicitSecurity) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Scopes != nil { _, err := m.Scopes.ResolveReferences(root) @@ -6340,7 +6079,7 @@ func (m *Oauth2ImplicitSecurity) ResolveReferences(root string) (interface{}, er } // ResolveReferences resolves references found inside Oauth2PasswordSecurity objects. -func (m *Oauth2PasswordSecurity) ResolveReferences(root string) (interface{}, error) { +func (m *Oauth2PasswordSecurity) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Scopes != nil { _, err := m.Scopes.ResolveReferences(root) @@ -6360,7 +6099,7 @@ func (m *Oauth2PasswordSecurity) ResolveReferences(root string) (interface{}, er } // ResolveReferences resolves references found inside Oauth2Scopes objects. -func (m *Oauth2Scopes) ResolveReferences(root string) (interface{}, error) { +func (m *Oauth2Scopes) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.AdditionalProperties { if item != nil { @@ -6374,7 +6113,7 @@ func (m *Oauth2Scopes) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside Operation objects. -func (m *Operation) ResolveReferences(root string) (interface{}, error) { +func (m *Operation) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.ExternalDocs != nil { _, err := m.ExternalDocs.ResolveReferences(root) @@ -6416,7 +6155,7 @@ func (m *Operation) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside Parameter objects. -func (m *Parameter) ResolveReferences(root string) (interface{}, error) { +func (m *Parameter) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) { p, ok := m.Oneof.(*Parameter_BodyParameter) @@ -6440,7 +6179,7 @@ func (m *Parameter) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside ParameterDefinitions objects. -func (m *ParameterDefinitions) ResolveReferences(root string) (interface{}, error) { +func (m *ParameterDefinitions) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.AdditionalProperties { if item != nil { @@ -6454,7 +6193,7 @@ func (m *ParameterDefinitions) ResolveReferences(root string) (interface{}, erro } // ResolveReferences resolves references found inside ParametersItem objects. -func (m *ParametersItem) ResolveReferences(root string) (interface{}, error) { +func (m *ParametersItem) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) { p, ok := m.Oneof.(*ParametersItem_Parameter) @@ -6486,7 +6225,7 @@ func (m *ParametersItem) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside PathItem objects. -func (m *PathItem) ResolveReferences(root string) (interface{}, error) { +func (m *PathItem) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.XRef != "" { info, err := compiler.ReadInfoForRef(root, m.XRef) @@ -6564,7 +6303,7 @@ func (m *PathItem) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside PathParameterSubSchema objects. -func (m *PathParameterSubSchema) ResolveReferences(root string) (interface{}, error) { +func (m *PathParameterSubSchema) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Items != nil { _, err := m.Items.ResolveReferences(root) @@ -6598,7 +6337,7 @@ func (m *PathParameterSubSchema) ResolveReferences(root string) (interface{}, er } // ResolveReferences resolves references found inside Paths objects. -func (m *Paths) ResolveReferences(root string) (interface{}, error) { +func (m *Paths) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.VendorExtension { if item != nil { @@ -6620,7 +6359,7 @@ func (m *Paths) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside PrimitivesItems objects. -func (m *PrimitivesItems) ResolveReferences(root string) (interface{}, error) { +func (m *PrimitivesItems) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Items != nil { _, err := m.Items.ResolveReferences(root) @@ -6654,7 +6393,7 @@ func (m *PrimitivesItems) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside Properties objects. -func (m *Properties) ResolveReferences(root string) (interface{}, error) { +func (m *Properties) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.AdditionalProperties { if item != nil { @@ -6668,7 +6407,7 @@ func (m *Properties) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside QueryParameterSubSchema objects. -func (m *QueryParameterSubSchema) ResolveReferences(root string) (interface{}, error) { +func (m *QueryParameterSubSchema) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Items != nil { _, err := m.Items.ResolveReferences(root) @@ -6702,7 +6441,7 @@ func (m *QueryParameterSubSchema) ResolveReferences(root string) (interface{}, e } // ResolveReferences resolves references found inside Response objects. -func (m *Response) ResolveReferences(root string) (interface{}, error) { +func (m *Response) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.Schema != nil { _, err := m.Schema.ResolveReferences(root) @@ -6734,7 +6473,7 @@ func (m *Response) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside ResponseDefinitions objects. -func (m *ResponseDefinitions) ResolveReferences(root string) (interface{}, error) { +func (m *ResponseDefinitions) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.AdditionalProperties { if item != nil { @@ -6748,7 +6487,7 @@ func (m *ResponseDefinitions) ResolveReferences(root string) (interface{}, error } // ResolveReferences resolves references found inside ResponseValue objects. -func (m *ResponseValue) ResolveReferences(root string) (interface{}, error) { +func (m *ResponseValue) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) { p, ok := m.Oneof.(*ResponseValue_Response) @@ -6780,7 +6519,7 @@ func (m *ResponseValue) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside Responses objects. -func (m *Responses) ResolveReferences(root string) (interface{}, error) { +func (m *Responses) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.ResponseCode { if item != nil { @@ -6802,7 +6541,7 @@ func (m *Responses) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside Schema objects. -func (m *Schema) ResolveReferences(root string) (interface{}, error) { +func (m *Schema) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.XRef != "" { info, err := compiler.ReadInfoForRef(root, m.XRef) @@ -6894,7 +6633,7 @@ func (m *Schema) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside SchemaItem objects. -func (m *SchemaItem) ResolveReferences(root string) (interface{}, error) { +func (m *SchemaItem) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) { p, ok := m.Oneof.(*SchemaItem_Schema) @@ -6918,7 +6657,7 @@ func (m *SchemaItem) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside SecurityDefinitions objects. -func (m *SecurityDefinitions) ResolveReferences(root string) (interface{}, error) { +func (m *SecurityDefinitions) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.AdditionalProperties { if item != nil { @@ -6932,7 +6671,7 @@ func (m *SecurityDefinitions) ResolveReferences(root string) (interface{}, error } // ResolveReferences resolves references found inside SecurityDefinitionsItem objects. -func (m *SecurityDefinitionsItem) ResolveReferences(root string) (interface{}, error) { +func (m *SecurityDefinitionsItem) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) { p, ok := m.Oneof.(*SecurityDefinitionsItem_BasicAuthenticationSecurity) @@ -6992,7 +6731,7 @@ func (m *SecurityDefinitionsItem) ResolveReferences(root string) (interface{}, e } // ResolveReferences resolves references found inside SecurityRequirement objects. -func (m *SecurityRequirement) ResolveReferences(root string) (interface{}, error) { +func (m *SecurityRequirement) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.AdditionalProperties { if item != nil { @@ -7006,13 +6745,13 @@ func (m *SecurityRequirement) ResolveReferences(root string) (interface{}, error } // ResolveReferences resolves references found inside StringArray objects. -func (m *StringArray) ResolveReferences(root string) (interface{}, error) { +func (m *StringArray) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) return nil, compiler.NewErrorGroupOrNil(errors) } // ResolveReferences resolves references found inside Tag objects. -func (m *Tag) ResolveReferences(root string) (interface{}, error) { +func (m *Tag) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) if m.ExternalDocs != nil { _, err := m.ExternalDocs.ResolveReferences(root) @@ -7032,13 +6771,13 @@ func (m *Tag) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside TypeItem objects. -func (m *TypeItem) ResolveReferences(root string) (interface{}, error) { +func (m *TypeItem) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) return nil, compiler.NewErrorGroupOrNil(errors) } // ResolveReferences resolves references found inside VendorExtension objects. -func (m *VendorExtension) ResolveReferences(root string) (interface{}, error) { +func (m *VendorExtension) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.AdditionalProperties { if item != nil { @@ -7052,7 +6791,7 @@ func (m *VendorExtension) ResolveReferences(root string) (interface{}, error) { } // ResolveReferences resolves references found inside Xml objects. -func (m *Xml) ResolveReferences(root string) (interface{}, error) { +func (m *Xml) ResolveReferences(root string) (*yaml.Node, error) { errors := make([]error, 0) for _, item := range m.VendorExtension { if item != nil { @@ -7066,7 +6805,7 @@ func (m *Xml) ResolveReferences(root string) (interface{}, error) { } // ToRawInfo returns a description of AdditionalPropertiesItem suitable for JSON or YAML export. -func (m *AdditionalPropertiesItem) ToRawInfo() interface{} { +func (m *AdditionalPropertiesItem) ToRawInfo() *yaml.Node { // ONE OF WRAPPER // AdditionalPropertiesItem // {Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} @@ -7076,792 +6815,885 @@ func (m *AdditionalPropertiesItem) ToRawInfo() interface{} { } // {Name:boolean Type:bool StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if v1, ok := m.GetOneof().(*AdditionalPropertiesItem_Boolean); ok { - return v1.Boolean + return compiler.NewScalarNodeForBool(v1.Boolean) } return nil } // ToRawInfo returns a description of Any suitable for JSON or YAML export. -func (m *Any) ToRawInfo() interface{} { +func (m *Any) ToRawInfo() *yaml.Node { var err error - var info1 []yaml.MapSlice - err = yaml.Unmarshal([]byte(m.Yaml), &info1) + var node yaml.Node + err = yaml.Unmarshal([]byte(m.Yaml), &node) if err == nil { - return info1 - } - var info2 yaml.MapSlice - err = yaml.Unmarshal([]byte(m.Yaml), &info2) - if err == nil { - return info2 - } - var info3 interface{} - err = yaml.Unmarshal([]byte(m.Yaml), &info3) - if err == nil { - return info3 + if node.Kind == yaml.DocumentNode { + return node.Content[0] + } + return &node + } else { + return nil } return nil } // ToRawInfo returns a description of ApiKeySecurity suitable for JSON or YAML export. -func (m *ApiKeySecurity) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *ApiKeySecurity) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } // always include this required field. - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("type")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type)) // always include this required field. - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) // always include this required field. - info = append(info, yaml.MapItem{Key: "in", Value: m.In}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("in")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.In)) if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of BasicAuthenticationSecurity suitable for JSON or YAML export. -func (m *BasicAuthenticationSecurity) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *BasicAuthenticationSecurity) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } // always include this required field. - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("type")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type)) if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of BodyParameter suitable for JSON or YAML export. -func (m *BodyParameter) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *BodyParameter) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } // always include this required field. - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) // always include this required field. - info = append(info, yaml.MapItem{Key: "in", Value: m.In}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("in")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.In)) if m.Required != false { - info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("required")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required)) } // always include this required field. - info = append(info, yaml.MapItem{Key: "schema", Value: m.Schema.ToRawInfo()}) - // &{Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + info.Content = append(info.Content, compiler.NewScalarNodeForString("schema")) + info.Content = append(info.Content, m.Schema.ToRawInfo()) if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of Contact suitable for JSON or YAML export. -func (m *Contact) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Contact) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } if m.Url != "" { - info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("url")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Url)) } if m.Email != "" { - info = append(info, yaml.MapItem{Key: "email", Value: m.Email}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("email")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Email)) } if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of Default suitable for JSON or YAML export. -func (m *Default) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Default) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:additionalProperties Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern: Implicit:false Description:} return info } // ToRawInfo returns a description of Definitions suitable for JSON or YAML export. -func (m *Definitions) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Definitions) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:additionalProperties Type:NamedSchema StringEnumValues:[] MapType:Schema Repeated:true Pattern: Implicit:true Description:} return info } // ToRawInfo returns a description of Document suitable for JSON or YAML export. -func (m *Document) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Document) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } // always include this required field. - info = append(info, yaml.MapItem{Key: "swagger", Value: m.Swagger}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("swagger")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Swagger)) // always include this required field. - info = append(info, yaml.MapItem{Key: "info", Value: m.Info.ToRawInfo()}) - // &{Name:info Type:Info StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + info.Content = append(info.Content, compiler.NewScalarNodeForString("info")) + info.Content = append(info.Content, m.Info.ToRawInfo()) if m.Host != "" { - info = append(info, yaml.MapItem{Key: "host", Value: m.Host}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("host")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Host)) } if m.BasePath != "" { - info = append(info, yaml.MapItem{Key: "basePath", Value: m.BasePath}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("basePath")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.BasePath)) } if len(m.Schemes) != 0 { - info = append(info, yaml.MapItem{Key: "schemes", Value: m.Schemes}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("schemes")) + info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Schemes)) } if len(m.Consumes) != 0 { - info = append(info, yaml.MapItem{Key: "consumes", Value: m.Consumes}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("consumes")) + info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Consumes)) } if len(m.Produces) != 0 { - info = append(info, yaml.MapItem{Key: "produces", Value: m.Produces}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("produces")) + info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Produces)) } // always include this required field. - info = append(info, yaml.MapItem{Key: "paths", Value: m.Paths.ToRawInfo()}) - // &{Name:paths Type:Paths StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + info.Content = append(info.Content, compiler.NewScalarNodeForString("paths")) + info.Content = append(info.Content, m.Paths.ToRawInfo()) if m.Definitions != nil { - info = append(info, yaml.MapItem{Key: "definitions", Value: m.Definitions.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("definitions")) + info.Content = append(info.Content, m.Definitions.ToRawInfo()) } - // &{Name:definitions Type:Definitions StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Parameters != nil { - info = append(info, yaml.MapItem{Key: "parameters", Value: m.Parameters.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("parameters")) + info.Content = append(info.Content, m.Parameters.ToRawInfo()) } - // &{Name:parameters Type:ParameterDefinitions StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Responses != nil { - info = append(info, yaml.MapItem{Key: "responses", Value: m.Responses.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("responses")) + info.Content = append(info.Content, m.Responses.ToRawInfo()) } - // &{Name:responses Type:ResponseDefinitions StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if len(m.Security) != 0 { - items := make([]interface{}, 0) + items := compiler.NewSequenceNode() for _, item := range m.Security { - items = append(items, item.ToRawInfo()) + items.Content = append(items.Content, item.ToRawInfo()) } - info = append(info, yaml.MapItem{Key: "security", Value: items}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("security")) + info.Content = append(info.Content, items) } - // &{Name:security Type:SecurityRequirement StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} if m.SecurityDefinitions != nil { - info = append(info, yaml.MapItem{Key: "securityDefinitions", Value: m.SecurityDefinitions.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("securityDefinitions")) + info.Content = append(info.Content, m.SecurityDefinitions.ToRawInfo()) } - // &{Name:securityDefinitions Type:SecurityDefinitions StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if len(m.Tags) != 0 { - items := make([]interface{}, 0) + items := compiler.NewSequenceNode() for _, item := range m.Tags { - items = append(items, item.ToRawInfo()) + items.Content = append(items.Content, item.ToRawInfo()) } - info = append(info, yaml.MapItem{Key: "tags", Value: items}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("tags")) + info.Content = append(info.Content, items) } - // &{Name:tags Type:Tag StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} if m.ExternalDocs != nil { - info = append(info, yaml.MapItem{Key: "externalDocs", Value: m.ExternalDocs.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("externalDocs")) + info.Content = append(info.Content, m.ExternalDocs.ToRawInfo()) } - // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of Examples suitable for JSON or YAML export. -func (m *Examples) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Examples) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:additionalProperties Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern: Implicit:true Description:} return info } // ToRawInfo returns a description of ExternalDocs suitable for JSON or YAML export. -func (m *ExternalDocs) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *ExternalDocs) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } // always include this required field. - info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("url")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Url)) if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of FileSchema suitable for JSON or YAML export. -func (m *FileSchema) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *FileSchema) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Format != "" { - info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("format")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format)) } if m.Title != "" { - info = append(info, yaml.MapItem{Key: "title", Value: m.Title}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("title")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Title)) } if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } if m.Default != nil { - info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("default")) + info.Content = append(info.Content, m.Default.ToRawInfo()) } - // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if len(m.Required) != 0 { - info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("required")) + info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Required)) } // always include this required field. - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("type")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type)) if m.ReadOnly != false { - info = append(info, yaml.MapItem{Key: "readOnly", Value: m.ReadOnly}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("readOnly")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ReadOnly)) } if m.ExternalDocs != nil { - info = append(info, yaml.MapItem{Key: "externalDocs", Value: m.ExternalDocs.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("externalDocs")) + info.Content = append(info.Content, m.ExternalDocs.ToRawInfo()) } - // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Example != nil { - info = append(info, yaml.MapItem{Key: "example", Value: m.Example.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("example")) + info.Content = append(info.Content, m.Example.ToRawInfo()) } - // &{Name:example Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of FormDataParameterSubSchema suitable for JSON or YAML export. -func (m *FormDataParameterSubSchema) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *FormDataParameterSubSchema) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Required != false { - info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("required")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required)) } if m.In != "" { - info = append(info, yaml.MapItem{Key: "in", Value: m.In}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("in")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.In)) } if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } if m.AllowEmptyValue != false { - info = append(info, yaml.MapItem{Key: "allowEmptyValue", Value: m.AllowEmptyValue}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("allowEmptyValue")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.AllowEmptyValue)) } if m.Type != "" { - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("type")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type)) } if m.Format != "" { - info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("format")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format)) } if m.Items != nil { - info = append(info, yaml.MapItem{Key: "items", Value: m.Items.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("items")) + info.Content = append(info.Content, m.Items.ToRawInfo()) } - // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.CollectionFormat != "" { - info = append(info, yaml.MapItem{Key: "collectionFormat", Value: m.CollectionFormat}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("collectionFormat")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.CollectionFormat)) } if m.Default != nil { - info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("default")) + info.Content = append(info.Content, m.Default.ToRawInfo()) } - // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Maximum != 0.0 { - info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum)) } if m.ExclusiveMaximum != false { - info = append(info, yaml.MapItem{Key: "exclusiveMaximum", Value: m.ExclusiveMaximum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum)) } if m.Minimum != 0.0 { - info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum)) } if m.ExclusiveMinimum != false { - info = append(info, yaml.MapItem{Key: "exclusiveMinimum", Value: m.ExclusiveMinimum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum)) } if m.MaxLength != 0 { - info = append(info, yaml.MapItem{Key: "maxLength", Value: m.MaxLength}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maxLength")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxLength)) } if m.MinLength != 0 { - info = append(info, yaml.MapItem{Key: "minLength", Value: m.MinLength}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minLength")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinLength)) } if m.Pattern != "" { - info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("pattern")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Pattern)) } if m.MaxItems != 0 { - info = append(info, yaml.MapItem{Key: "maxItems", Value: m.MaxItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maxItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxItems)) } if m.MinItems != 0 { - info = append(info, yaml.MapItem{Key: "minItems", Value: m.MinItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems)) } if m.UniqueItems != false { - info = append(info, yaml.MapItem{Key: "uniqueItems", Value: m.UniqueItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems)) } if len(m.Enum) != 0 { - items := make([]interface{}, 0) + items := compiler.NewSequenceNode() for _, item := range m.Enum { - items = append(items, item.ToRawInfo()) + items.Content = append(items.Content, item.ToRawInfo()) } - info = append(info, yaml.MapItem{Key: "enum", Value: items}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("enum")) + info.Content = append(info.Content, items) } - // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} if m.MultipleOf != 0.0 { - info = append(info, yaml.MapItem{Key: "multipleOf", Value: m.MultipleOf}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("multipleOf")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.MultipleOf)) } if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of Header suitable for JSON or YAML export. -func (m *Header) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Header) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } // always include this required field. - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("type")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type)) if m.Format != "" { - info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("format")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format)) } if m.Items != nil { - info = append(info, yaml.MapItem{Key: "items", Value: m.Items.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("items")) + info.Content = append(info.Content, m.Items.ToRawInfo()) } - // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.CollectionFormat != "" { - info = append(info, yaml.MapItem{Key: "collectionFormat", Value: m.CollectionFormat}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("collectionFormat")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.CollectionFormat)) } if m.Default != nil { - info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("default")) + info.Content = append(info.Content, m.Default.ToRawInfo()) } - // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Maximum != 0.0 { - info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum)) } if m.ExclusiveMaximum != false { - info = append(info, yaml.MapItem{Key: "exclusiveMaximum", Value: m.ExclusiveMaximum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum)) } if m.Minimum != 0.0 { - info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum)) } if m.ExclusiveMinimum != false { - info = append(info, yaml.MapItem{Key: "exclusiveMinimum", Value: m.ExclusiveMinimum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum)) } if m.MaxLength != 0 { - info = append(info, yaml.MapItem{Key: "maxLength", Value: m.MaxLength}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maxLength")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxLength)) } if m.MinLength != 0 { - info = append(info, yaml.MapItem{Key: "minLength", Value: m.MinLength}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minLength")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinLength)) } if m.Pattern != "" { - info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("pattern")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Pattern)) } if m.MaxItems != 0 { - info = append(info, yaml.MapItem{Key: "maxItems", Value: m.MaxItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maxItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxItems)) } if m.MinItems != 0 { - info = append(info, yaml.MapItem{Key: "minItems", Value: m.MinItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems)) } if m.UniqueItems != false { - info = append(info, yaml.MapItem{Key: "uniqueItems", Value: m.UniqueItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems)) } if len(m.Enum) != 0 { - items := make([]interface{}, 0) + items := compiler.NewSequenceNode() for _, item := range m.Enum { - items = append(items, item.ToRawInfo()) + items.Content = append(items.Content, item.ToRawInfo()) } - info = append(info, yaml.MapItem{Key: "enum", Value: items}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("enum")) + info.Content = append(info.Content, items) } - // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} if m.MultipleOf != 0.0 { - info = append(info, yaml.MapItem{Key: "multipleOf", Value: m.MultipleOf}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("multipleOf")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.MultipleOf)) } if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of HeaderParameterSubSchema suitable for JSON or YAML export. -func (m *HeaderParameterSubSchema) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *HeaderParameterSubSchema) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Required != false { - info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("required")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required)) } if m.In != "" { - info = append(info, yaml.MapItem{Key: "in", Value: m.In}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("in")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.In)) } if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } if m.Type != "" { - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("type")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type)) } if m.Format != "" { - info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("format")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format)) } if m.Items != nil { - info = append(info, yaml.MapItem{Key: "items", Value: m.Items.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("items")) + info.Content = append(info.Content, m.Items.ToRawInfo()) } - // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.CollectionFormat != "" { - info = append(info, yaml.MapItem{Key: "collectionFormat", Value: m.CollectionFormat}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("collectionFormat")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.CollectionFormat)) } if m.Default != nil { - info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("default")) + info.Content = append(info.Content, m.Default.ToRawInfo()) } - // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Maximum != 0.0 { - info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum)) } if m.ExclusiveMaximum != false { - info = append(info, yaml.MapItem{Key: "exclusiveMaximum", Value: m.ExclusiveMaximum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum)) } if m.Minimum != 0.0 { - info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum)) } if m.ExclusiveMinimum != false { - info = append(info, yaml.MapItem{Key: "exclusiveMinimum", Value: m.ExclusiveMinimum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum)) } if m.MaxLength != 0 { - info = append(info, yaml.MapItem{Key: "maxLength", Value: m.MaxLength}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maxLength")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxLength)) } if m.MinLength != 0 { - info = append(info, yaml.MapItem{Key: "minLength", Value: m.MinLength}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minLength")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinLength)) } if m.Pattern != "" { - info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("pattern")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Pattern)) } if m.MaxItems != 0 { - info = append(info, yaml.MapItem{Key: "maxItems", Value: m.MaxItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maxItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxItems)) } if m.MinItems != 0 { - info = append(info, yaml.MapItem{Key: "minItems", Value: m.MinItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems)) } if m.UniqueItems != false { - info = append(info, yaml.MapItem{Key: "uniqueItems", Value: m.UniqueItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems)) } if len(m.Enum) != 0 { - items := make([]interface{}, 0) + items := compiler.NewSequenceNode() for _, item := range m.Enum { - items = append(items, item.ToRawInfo()) + items.Content = append(items.Content, item.ToRawInfo()) } - info = append(info, yaml.MapItem{Key: "enum", Value: items}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("enum")) + info.Content = append(info.Content, items) } - // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} if m.MultipleOf != 0.0 { - info = append(info, yaml.MapItem{Key: "multipleOf", Value: m.MultipleOf}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("multipleOf")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.MultipleOf)) } if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of Headers suitable for JSON or YAML export. -func (m *Headers) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Headers) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:additionalProperties Type:NamedHeader StringEnumValues:[] MapType:Header Repeated:true Pattern: Implicit:true Description:} return info } // ToRawInfo returns a description of Info suitable for JSON or YAML export. -func (m *Info) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Info) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } // always include this required field. - info = append(info, yaml.MapItem{Key: "title", Value: m.Title}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("title")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Title)) // always include this required field. - info = append(info, yaml.MapItem{Key: "version", Value: m.Version}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("version")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Version)) if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } if m.TermsOfService != "" { - info = append(info, yaml.MapItem{Key: "termsOfService", Value: m.TermsOfService}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("termsOfService")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.TermsOfService)) } if m.Contact != nil { - info = append(info, yaml.MapItem{Key: "contact", Value: m.Contact.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("contact")) + info.Content = append(info.Content, m.Contact.ToRawInfo()) } - // &{Name:contact Type:Contact StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.License != nil { - info = append(info, yaml.MapItem{Key: "license", Value: m.License.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("license")) + info.Content = append(info.Content, m.License.ToRawInfo()) } - // &{Name:license Type:License StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of ItemsItem suitable for JSON or YAML export. -func (m *ItemsItem) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *ItemsItem) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if len(m.Schema) != 0 { - items := make([]interface{}, 0) + items := compiler.NewSequenceNode() for _, item := range m.Schema { - items = append(items, item.ToRawInfo()) + items.Content = append(items.Content, item.ToRawInfo()) } - info = append(info, yaml.MapItem{Key: "schema", Value: items}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("schema")) + info.Content = append(info.Content, items) } - // &{Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} return info } // ToRawInfo returns a description of JsonReference suitable for JSON or YAML export. -func (m *JsonReference) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *JsonReference) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } // always include this required field. - info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("$ref")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.XRef)) if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } return info } // ToRawInfo returns a description of License suitable for JSON or YAML export. -func (m *License) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *License) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } // always include this required field. - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) if m.Url != "" { - info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("url")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Url)) } if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of NamedAny suitable for JSON or YAML export. -func (m *NamedAny) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *NamedAny) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } // &{Name:value Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} return info } // ToRawInfo returns a description of NamedHeader suitable for JSON or YAML export. -func (m *NamedHeader) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *NamedHeader) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } // &{Name:value Type:Header StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} return info } // ToRawInfo returns a description of NamedParameter suitable for JSON or YAML export. -func (m *NamedParameter) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *NamedParameter) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } // &{Name:value Type:Parameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} return info } // ToRawInfo returns a description of NamedPathItem suitable for JSON or YAML export. -func (m *NamedPathItem) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *NamedPathItem) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } // &{Name:value Type:PathItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} return info } // ToRawInfo returns a description of NamedResponse suitable for JSON or YAML export. -func (m *NamedResponse) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *NamedResponse) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } // &{Name:value Type:Response StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} return info } // ToRawInfo returns a description of NamedResponseValue suitable for JSON or YAML export. -func (m *NamedResponseValue) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *NamedResponseValue) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } // &{Name:value Type:ResponseValue StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} return info } // ToRawInfo returns a description of NamedSchema suitable for JSON or YAML export. -func (m *NamedSchema) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *NamedSchema) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } // &{Name:value Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} return info } // ToRawInfo returns a description of NamedSecurityDefinitionsItem suitable for JSON or YAML export. -func (m *NamedSecurityDefinitionsItem) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *NamedSecurityDefinitionsItem) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } // &{Name:value Type:SecurityDefinitionsItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} return info } // ToRawInfo returns a description of NamedString suitable for JSON or YAML export. -func (m *NamedString) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *NamedString) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } if m.Value != "" { - info = append(info, yaml.MapItem{Key: "value", Value: m.Value}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("value")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Value)) } return info } // ToRawInfo returns a description of NamedStringArray suitable for JSON or YAML export. -func (m *NamedStringArray) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *NamedStringArray) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } // &{Name:value Type:StringArray StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} return info } // ToRawInfo returns a description of NonBodyParameter suitable for JSON or YAML export. -func (m *NonBodyParameter) ToRawInfo() interface{} { +func (m *NonBodyParameter) ToRawInfo() *yaml.Node { // ONE OF WRAPPER // NonBodyParameter // {Name:headerParameterSubSchema Type:HeaderParameterSubSchema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} @@ -7888,122 +7720,139 @@ func (m *NonBodyParameter) ToRawInfo() interface{} { } // ToRawInfo returns a description of Oauth2AccessCodeSecurity suitable for JSON or YAML export. -func (m *Oauth2AccessCodeSecurity) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Oauth2AccessCodeSecurity) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } // always include this required field. - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("type")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type)) // always include this required field. - info = append(info, yaml.MapItem{Key: "flow", Value: m.Flow}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("flow")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Flow)) if m.Scopes != nil { - info = append(info, yaml.MapItem{Key: "scopes", Value: m.Scopes.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("scopes")) + info.Content = append(info.Content, m.Scopes.ToRawInfo()) } - // &{Name:scopes Type:Oauth2Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} // always include this required field. - info = append(info, yaml.MapItem{Key: "authorizationUrl", Value: m.AuthorizationUrl}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("authorizationUrl")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.AuthorizationUrl)) // always include this required field. - info = append(info, yaml.MapItem{Key: "tokenUrl", Value: m.TokenUrl}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("tokenUrl")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.TokenUrl)) if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of Oauth2ApplicationSecurity suitable for JSON or YAML export. -func (m *Oauth2ApplicationSecurity) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Oauth2ApplicationSecurity) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } // always include this required field. - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("type")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type)) // always include this required field. - info = append(info, yaml.MapItem{Key: "flow", Value: m.Flow}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("flow")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Flow)) if m.Scopes != nil { - info = append(info, yaml.MapItem{Key: "scopes", Value: m.Scopes.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("scopes")) + info.Content = append(info.Content, m.Scopes.ToRawInfo()) } - // &{Name:scopes Type:Oauth2Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} // always include this required field. - info = append(info, yaml.MapItem{Key: "tokenUrl", Value: m.TokenUrl}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("tokenUrl")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.TokenUrl)) if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of Oauth2ImplicitSecurity suitable for JSON or YAML export. -func (m *Oauth2ImplicitSecurity) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Oauth2ImplicitSecurity) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } // always include this required field. - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("type")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type)) // always include this required field. - info = append(info, yaml.MapItem{Key: "flow", Value: m.Flow}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("flow")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Flow)) if m.Scopes != nil { - info = append(info, yaml.MapItem{Key: "scopes", Value: m.Scopes.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("scopes")) + info.Content = append(info.Content, m.Scopes.ToRawInfo()) } - // &{Name:scopes Type:Oauth2Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} // always include this required field. - info = append(info, yaml.MapItem{Key: "authorizationUrl", Value: m.AuthorizationUrl}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("authorizationUrl")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.AuthorizationUrl)) if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of Oauth2PasswordSecurity suitable for JSON or YAML export. -func (m *Oauth2PasswordSecurity) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Oauth2PasswordSecurity) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } // always include this required field. - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("type")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type)) // always include this required field. - info = append(info, yaml.MapItem{Key: "flow", Value: m.Flow}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("flow")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Flow)) if m.Scopes != nil { - info = append(info, yaml.MapItem{Key: "scopes", Value: m.Scopes.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("scopes")) + info.Content = append(info.Content, m.Scopes.ToRawInfo()) } - // &{Name:scopes Type:Oauth2Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} // always include this required field. - info = append(info, yaml.MapItem{Key: "tokenUrl", Value: m.TokenUrl}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("tokenUrl")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.TokenUrl)) if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of Oauth2Scopes suitable for JSON or YAML export. -func (m *Oauth2Scopes) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Oauth2Scopes) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } @@ -8012,69 +7861,77 @@ func (m *Oauth2Scopes) ToRawInfo() interface{} { } // ToRawInfo returns a description of Operation suitable for JSON or YAML export. -func (m *Operation) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Operation) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if len(m.Tags) != 0 { - info = append(info, yaml.MapItem{Key: "tags", Value: m.Tags}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("tags")) + info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Tags)) } if m.Summary != "" { - info = append(info, yaml.MapItem{Key: "summary", Value: m.Summary}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("summary")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Summary)) } if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } if m.ExternalDocs != nil { - info = append(info, yaml.MapItem{Key: "externalDocs", Value: m.ExternalDocs.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("externalDocs")) + info.Content = append(info.Content, m.ExternalDocs.ToRawInfo()) } - // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.OperationId != "" { - info = append(info, yaml.MapItem{Key: "operationId", Value: m.OperationId}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("operationId")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.OperationId)) } if len(m.Produces) != 0 { - info = append(info, yaml.MapItem{Key: "produces", Value: m.Produces}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("produces")) + info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Produces)) } if len(m.Consumes) != 0 { - info = append(info, yaml.MapItem{Key: "consumes", Value: m.Consumes}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("consumes")) + info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Consumes)) } if len(m.Parameters) != 0 { - items := make([]interface{}, 0) + items := compiler.NewSequenceNode() for _, item := range m.Parameters { - items = append(items, item.ToRawInfo()) + items.Content = append(items.Content, item.ToRawInfo()) } - info = append(info, yaml.MapItem{Key: "parameters", Value: items}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("parameters")) + info.Content = append(info.Content, items) } - // &{Name:parameters Type:ParametersItem StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:The parameters needed to send a valid API call.} // always include this required field. - info = append(info, yaml.MapItem{Key: "responses", Value: m.Responses.ToRawInfo()}) - // &{Name:responses Type:Responses StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + info.Content = append(info.Content, compiler.NewScalarNodeForString("responses")) + info.Content = append(info.Content, m.Responses.ToRawInfo()) if len(m.Schemes) != 0 { - info = append(info, yaml.MapItem{Key: "schemes", Value: m.Schemes}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("schemes")) + info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Schemes)) } if m.Deprecated != false { - info = append(info, yaml.MapItem{Key: "deprecated", Value: m.Deprecated}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("deprecated")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Deprecated)) } if len(m.Security) != 0 { - items := make([]interface{}, 0) + items := compiler.NewSequenceNode() for _, item := range m.Security { - items = append(items, item.ToRawInfo()) + items.Content = append(items.Content, item.ToRawInfo()) } - info = append(info, yaml.MapItem{Key: "security", Value: items}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("security")) + info.Content = append(info.Content, items) } - // &{Name:security Type:SecurityRequirement StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of Parameter suitable for JSON or YAML export. -func (m *Parameter) ToRawInfo() interface{} { +func (m *Parameter) ToRawInfo() *yaml.Node { // ONE OF WRAPPER // Parameter // {Name:bodyParameter Type:BodyParameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} @@ -8091,22 +7948,22 @@ func (m *Parameter) ToRawInfo() interface{} { } // ToRawInfo returns a description of ParameterDefinitions suitable for JSON or YAML export. -func (m *ParameterDefinitions) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *ParameterDefinitions) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:additionalProperties Type:NamedParameter StringEnumValues:[] MapType:Parameter Repeated:true Pattern: Implicit:true Description:} return info } // ToRawInfo returns a description of ParametersItem suitable for JSON or YAML export. -func (m *ParametersItem) ToRawInfo() interface{} { +func (m *ParametersItem) ToRawInfo() *yaml.Node { // ONE OF WRAPPER // ParametersItem // {Name:parameter Type:Parameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} @@ -8123,386 +7980,439 @@ func (m *ParametersItem) ToRawInfo() interface{} { } // ToRawInfo returns a description of PathItem suitable for JSON or YAML export. -func (m *PathItem) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *PathItem) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.XRef != "" { - info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("$ref")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.XRef)) } if m.Get != nil { - info = append(info, yaml.MapItem{Key: "get", Value: m.Get.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("get")) + info.Content = append(info.Content, m.Get.ToRawInfo()) } - // &{Name:get Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Put != nil { - info = append(info, yaml.MapItem{Key: "put", Value: m.Put.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("put")) + info.Content = append(info.Content, m.Put.ToRawInfo()) } - // &{Name:put Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Post != nil { - info = append(info, yaml.MapItem{Key: "post", Value: m.Post.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("post")) + info.Content = append(info.Content, m.Post.ToRawInfo()) } - // &{Name:post Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Delete != nil { - info = append(info, yaml.MapItem{Key: "delete", Value: m.Delete.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("delete")) + info.Content = append(info.Content, m.Delete.ToRawInfo()) } - // &{Name:delete Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Options != nil { - info = append(info, yaml.MapItem{Key: "options", Value: m.Options.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("options")) + info.Content = append(info.Content, m.Options.ToRawInfo()) } - // &{Name:options Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Head != nil { - info = append(info, yaml.MapItem{Key: "head", Value: m.Head.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("head")) + info.Content = append(info.Content, m.Head.ToRawInfo()) } - // &{Name:head Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Patch != nil { - info = append(info, yaml.MapItem{Key: "patch", Value: m.Patch.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("patch")) + info.Content = append(info.Content, m.Patch.ToRawInfo()) } - // &{Name:patch Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if len(m.Parameters) != 0 { - items := make([]interface{}, 0) + items := compiler.NewSequenceNode() for _, item := range m.Parameters { - items = append(items, item.ToRawInfo()) + items.Content = append(items.Content, item.ToRawInfo()) } - info = append(info, yaml.MapItem{Key: "parameters", Value: items}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("parameters")) + info.Content = append(info.Content, items) } - // &{Name:parameters Type:ParametersItem StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:The parameters needed to send a valid API call.} if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of PathParameterSubSchema suitable for JSON or YAML export. -func (m *PathParameterSubSchema) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *PathParameterSubSchema) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } // always include this required field. - info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("required")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required)) if m.In != "" { - info = append(info, yaml.MapItem{Key: "in", Value: m.In}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("in")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.In)) } if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } if m.Type != "" { - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("type")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type)) } if m.Format != "" { - info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("format")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format)) } if m.Items != nil { - info = append(info, yaml.MapItem{Key: "items", Value: m.Items.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("items")) + info.Content = append(info.Content, m.Items.ToRawInfo()) } - // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.CollectionFormat != "" { - info = append(info, yaml.MapItem{Key: "collectionFormat", Value: m.CollectionFormat}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("collectionFormat")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.CollectionFormat)) } if m.Default != nil { - info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("default")) + info.Content = append(info.Content, m.Default.ToRawInfo()) } - // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Maximum != 0.0 { - info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum)) } if m.ExclusiveMaximum != false { - info = append(info, yaml.MapItem{Key: "exclusiveMaximum", Value: m.ExclusiveMaximum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum)) } if m.Minimum != 0.0 { - info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum)) } if m.ExclusiveMinimum != false { - info = append(info, yaml.MapItem{Key: "exclusiveMinimum", Value: m.ExclusiveMinimum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum)) } if m.MaxLength != 0 { - info = append(info, yaml.MapItem{Key: "maxLength", Value: m.MaxLength}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maxLength")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxLength)) } if m.MinLength != 0 { - info = append(info, yaml.MapItem{Key: "minLength", Value: m.MinLength}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minLength")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinLength)) } if m.Pattern != "" { - info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("pattern")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Pattern)) } if m.MaxItems != 0 { - info = append(info, yaml.MapItem{Key: "maxItems", Value: m.MaxItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maxItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxItems)) } if m.MinItems != 0 { - info = append(info, yaml.MapItem{Key: "minItems", Value: m.MinItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems)) } if m.UniqueItems != false { - info = append(info, yaml.MapItem{Key: "uniqueItems", Value: m.UniqueItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems)) } if len(m.Enum) != 0 { - items := make([]interface{}, 0) + items := compiler.NewSequenceNode() for _, item := range m.Enum { - items = append(items, item.ToRawInfo()) + items.Content = append(items.Content, item.ToRawInfo()) } - info = append(info, yaml.MapItem{Key: "enum", Value: items}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("enum")) + info.Content = append(info.Content, items) } - // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} if m.MultipleOf != 0.0 { - info = append(info, yaml.MapItem{Key: "multipleOf", Value: m.MultipleOf}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("multipleOf")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.MultipleOf)) } if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of Paths suitable for JSON or YAML export. -func (m *Paths) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Paths) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} if m.Path != nil { for _, item := range m.Path { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:Path Type:NamedPathItem StringEnumValues:[] MapType:PathItem Repeated:true Pattern:^/ Implicit:true Description:} return info } // ToRawInfo returns a description of PrimitivesItems suitable for JSON or YAML export. -func (m *PrimitivesItems) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *PrimitivesItems) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Type != "" { - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("type")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type)) } if m.Format != "" { - info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("format")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format)) } if m.Items != nil { - info = append(info, yaml.MapItem{Key: "items", Value: m.Items.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("items")) + info.Content = append(info.Content, m.Items.ToRawInfo()) } - // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.CollectionFormat != "" { - info = append(info, yaml.MapItem{Key: "collectionFormat", Value: m.CollectionFormat}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("collectionFormat")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.CollectionFormat)) } if m.Default != nil { - info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("default")) + info.Content = append(info.Content, m.Default.ToRawInfo()) } - // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Maximum != 0.0 { - info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum)) } if m.ExclusiveMaximum != false { - info = append(info, yaml.MapItem{Key: "exclusiveMaximum", Value: m.ExclusiveMaximum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum)) } if m.Minimum != 0.0 { - info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum)) } if m.ExclusiveMinimum != false { - info = append(info, yaml.MapItem{Key: "exclusiveMinimum", Value: m.ExclusiveMinimum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum)) } if m.MaxLength != 0 { - info = append(info, yaml.MapItem{Key: "maxLength", Value: m.MaxLength}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maxLength")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxLength)) } if m.MinLength != 0 { - info = append(info, yaml.MapItem{Key: "minLength", Value: m.MinLength}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minLength")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinLength)) } if m.Pattern != "" { - info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("pattern")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Pattern)) } if m.MaxItems != 0 { - info = append(info, yaml.MapItem{Key: "maxItems", Value: m.MaxItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maxItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxItems)) } if m.MinItems != 0 { - info = append(info, yaml.MapItem{Key: "minItems", Value: m.MinItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems)) } if m.UniqueItems != false { - info = append(info, yaml.MapItem{Key: "uniqueItems", Value: m.UniqueItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems)) } if len(m.Enum) != 0 { - items := make([]interface{}, 0) + items := compiler.NewSequenceNode() for _, item := range m.Enum { - items = append(items, item.ToRawInfo()) + items.Content = append(items.Content, item.ToRawInfo()) } - info = append(info, yaml.MapItem{Key: "enum", Value: items}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("enum")) + info.Content = append(info.Content, items) } - // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} if m.MultipleOf != 0.0 { - info = append(info, yaml.MapItem{Key: "multipleOf", Value: m.MultipleOf}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("multipleOf")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.MultipleOf)) } if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of Properties suitable for JSON or YAML export. -func (m *Properties) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Properties) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:additionalProperties Type:NamedSchema StringEnumValues:[] MapType:Schema Repeated:true Pattern: Implicit:true Description:} return info } // ToRawInfo returns a description of QueryParameterSubSchema suitable for JSON or YAML export. -func (m *QueryParameterSubSchema) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *QueryParameterSubSchema) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Required != false { - info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("required")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required)) } if m.In != "" { - info = append(info, yaml.MapItem{Key: "in", Value: m.In}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("in")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.In)) } if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } if m.AllowEmptyValue != false { - info = append(info, yaml.MapItem{Key: "allowEmptyValue", Value: m.AllowEmptyValue}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("allowEmptyValue")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.AllowEmptyValue)) } if m.Type != "" { - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("type")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type)) } if m.Format != "" { - info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("format")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format)) } if m.Items != nil { - info = append(info, yaml.MapItem{Key: "items", Value: m.Items.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("items")) + info.Content = append(info.Content, m.Items.ToRawInfo()) } - // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.CollectionFormat != "" { - info = append(info, yaml.MapItem{Key: "collectionFormat", Value: m.CollectionFormat}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("collectionFormat")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.CollectionFormat)) } if m.Default != nil { - info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("default")) + info.Content = append(info.Content, m.Default.ToRawInfo()) } - // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Maximum != 0.0 { - info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum)) } if m.ExclusiveMaximum != false { - info = append(info, yaml.MapItem{Key: "exclusiveMaximum", Value: m.ExclusiveMaximum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum)) } if m.Minimum != 0.0 { - info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum)) } if m.ExclusiveMinimum != false { - info = append(info, yaml.MapItem{Key: "exclusiveMinimum", Value: m.ExclusiveMinimum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum)) } if m.MaxLength != 0 { - info = append(info, yaml.MapItem{Key: "maxLength", Value: m.MaxLength}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maxLength")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxLength)) } if m.MinLength != 0 { - info = append(info, yaml.MapItem{Key: "minLength", Value: m.MinLength}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minLength")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinLength)) } if m.Pattern != "" { - info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("pattern")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Pattern)) } if m.MaxItems != 0 { - info = append(info, yaml.MapItem{Key: "maxItems", Value: m.MaxItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maxItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxItems)) } if m.MinItems != 0 { - info = append(info, yaml.MapItem{Key: "minItems", Value: m.MinItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems)) } if m.UniqueItems != false { - info = append(info, yaml.MapItem{Key: "uniqueItems", Value: m.UniqueItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems)) } if len(m.Enum) != 0 { - items := make([]interface{}, 0) + items := compiler.NewSequenceNode() for _, item := range m.Enum { - items = append(items, item.ToRawInfo()) + items.Content = append(items.Content, item.ToRawInfo()) } - info = append(info, yaml.MapItem{Key: "enum", Value: items}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("enum")) + info.Content = append(info.Content, items) } - // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} if m.MultipleOf != 0.0 { - info = append(info, yaml.MapItem{Key: "multipleOf", Value: m.MultipleOf}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("multipleOf")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.MultipleOf)) } if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of Response suitable for JSON or YAML export. -func (m *Response) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Response) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } // always include this required field. - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) if m.Schema != nil { - info = append(info, yaml.MapItem{Key: "schema", Value: m.Schema.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("schema")) + info.Content = append(info.Content, m.Schema.ToRawInfo()) } - // &{Name:schema Type:SchemaItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Headers != nil { - info = append(info, yaml.MapItem{Key: "headers", Value: m.Headers.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("headers")) + info.Content = append(info.Content, m.Headers.ToRawInfo()) } - // &{Name:headers Type:Headers StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Examples != nil { - info = append(info, yaml.MapItem{Key: "examples", Value: m.Examples.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("examples")) + info.Content = append(info.Content, m.Examples.ToRawInfo()) } - // &{Name:examples Type:Examples StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of ResponseDefinitions suitable for JSON or YAML export. -func (m *ResponseDefinitions) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *ResponseDefinitions) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:additionalProperties Type:NamedResponse StringEnumValues:[] MapType:Response Repeated:true Pattern: Implicit:true Description:} return info } // ToRawInfo returns a description of ResponseValue suitable for JSON or YAML export. -func (m *ResponseValue) ToRawInfo() interface{} { +func (m *ResponseValue) ToRawInfo() *yaml.Node { // ONE OF WRAPPER // ResponseValue // {Name:response Type:Response StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} @@ -8519,159 +8429,183 @@ func (m *ResponseValue) ToRawInfo() interface{} { } // ToRawInfo returns a description of Responses suitable for JSON or YAML export. -func (m *Responses) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Responses) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.ResponseCode != nil { for _, item := range m.ResponseCode { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:ResponseCode Type:NamedResponseValue StringEnumValues:[] MapType:ResponseValue Repeated:true Pattern:^([0-9]{3})$|^(default)$ Implicit:true Description:} if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of Schema suitable for JSON or YAML export. -func (m *Schema) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Schema) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.XRef != "" { - info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("$ref")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.XRef)) } if m.Format != "" { - info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("format")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format)) } if m.Title != "" { - info = append(info, yaml.MapItem{Key: "title", Value: m.Title}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("title")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Title)) } if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } if m.Default != nil { - info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("default")) + info.Content = append(info.Content, m.Default.ToRawInfo()) } - // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.MultipleOf != 0.0 { - info = append(info, yaml.MapItem{Key: "multipleOf", Value: m.MultipleOf}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("multipleOf")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.MultipleOf)) } if m.Maximum != 0.0 { - info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum)) } if m.ExclusiveMaximum != false { - info = append(info, yaml.MapItem{Key: "exclusiveMaximum", Value: m.ExclusiveMaximum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum)) } if m.Minimum != 0.0 { - info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum")) + info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum)) } if m.ExclusiveMinimum != false { - info = append(info, yaml.MapItem{Key: "exclusiveMinimum", Value: m.ExclusiveMinimum}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum)) } if m.MaxLength != 0 { - info = append(info, yaml.MapItem{Key: "maxLength", Value: m.MaxLength}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maxLength")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxLength)) } if m.MinLength != 0 { - info = append(info, yaml.MapItem{Key: "minLength", Value: m.MinLength}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minLength")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinLength)) } if m.Pattern != "" { - info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("pattern")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Pattern)) } if m.MaxItems != 0 { - info = append(info, yaml.MapItem{Key: "maxItems", Value: m.MaxItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maxItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxItems)) } if m.MinItems != 0 { - info = append(info, yaml.MapItem{Key: "minItems", Value: m.MinItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems)) } if m.UniqueItems != false { - info = append(info, yaml.MapItem{Key: "uniqueItems", Value: m.UniqueItems}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems)) } if m.MaxProperties != 0 { - info = append(info, yaml.MapItem{Key: "maxProperties", Value: m.MaxProperties}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("maxProperties")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxProperties)) } if m.MinProperties != 0 { - info = append(info, yaml.MapItem{Key: "minProperties", Value: m.MinProperties}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("minProperties")) + info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinProperties)) } if len(m.Required) != 0 { - info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("required")) + info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Required)) } if len(m.Enum) != 0 { - items := make([]interface{}, 0) + items := compiler.NewSequenceNode() for _, item := range m.Enum { - items = append(items, item.ToRawInfo()) + items.Content = append(items.Content, item.ToRawInfo()) } - info = append(info, yaml.MapItem{Key: "enum", Value: items}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("enum")) + info.Content = append(info.Content, items) } - // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} if m.AdditionalProperties != nil { - info = append(info, yaml.MapItem{Key: "additionalProperties", Value: m.AdditionalProperties.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("additionalProperties")) + info.Content = append(info.Content, m.AdditionalProperties.ToRawInfo()) } - // &{Name:additionalProperties Type:AdditionalPropertiesItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Type != nil { if len(m.Type.Value) == 1 { - info = append(info, yaml.MapItem{Key: "type", Value: m.Type.Value[0]}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("type")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type.Value[0])) } else { - info = append(info, yaml.MapItem{Key: "type", Value: m.Type.Value}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("type")) + info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Type.Value)) } } - // &{Name:type Type:TypeItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Items != nil { - items := make([]interface{}, 0) + items := compiler.NewSequenceNode() for _, item := range m.Items.Schema { - items = append(items, item.ToRawInfo()) + items.Content = append(items.Content, item.ToRawInfo()) + } + if len(items.Content) == 1 { + items = items.Content[0] } - info = append(info, yaml.MapItem{Key: "items", Value: items[0]}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("items")) + info.Content = append(info.Content, items) } - // &{Name:items Type:ItemsItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if len(m.AllOf) != 0 { - items := make([]interface{}, 0) + items := compiler.NewSequenceNode() for _, item := range m.AllOf { - items = append(items, item.ToRawInfo()) + items.Content = append(items.Content, item.ToRawInfo()) } - info = append(info, yaml.MapItem{Key: "allOf", Value: items}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("allOf")) + info.Content = append(info.Content, items) } - // &{Name:allOf Type:Schema StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} if m.Properties != nil { - info = append(info, yaml.MapItem{Key: "properties", Value: m.Properties.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("properties")) + info.Content = append(info.Content, m.Properties.ToRawInfo()) } - // &{Name:properties Type:Properties StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Discriminator != "" { - info = append(info, yaml.MapItem{Key: "discriminator", Value: m.Discriminator}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("discriminator")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Discriminator)) } if m.ReadOnly != false { - info = append(info, yaml.MapItem{Key: "readOnly", Value: m.ReadOnly}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("readOnly")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ReadOnly)) } if m.Xml != nil { - info = append(info, yaml.MapItem{Key: "xml", Value: m.Xml.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("xml")) + info.Content = append(info.Content, m.Xml.ToRawInfo()) } - // &{Name:xml Type:Xml StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.ExternalDocs != nil { - info = append(info, yaml.MapItem{Key: "externalDocs", Value: m.ExternalDocs.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("externalDocs")) + info.Content = append(info.Content, m.ExternalDocs.ToRawInfo()) } - // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Example != nil { - info = append(info, yaml.MapItem{Key: "example", Value: m.Example.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("example")) + info.Content = append(info.Content, m.Example.ToRawInfo()) } - // &{Name:example Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of SchemaItem suitable for JSON or YAML export. -func (m *SchemaItem) ToRawInfo() interface{} { +func (m *SchemaItem) ToRawInfo() *yaml.Node { // ONE OF WRAPPER // SchemaItem // {Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} @@ -8688,22 +8622,22 @@ func (m *SchemaItem) ToRawInfo() interface{} { } // ToRawInfo returns a description of SecurityDefinitions suitable for JSON or YAML export. -func (m *SecurityDefinitions) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *SecurityDefinitions) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:additionalProperties Type:NamedSecurityDefinitionsItem StringEnumValues:[] MapType:SecurityDefinitionsItem Repeated:true Pattern: Implicit:true Description:} return info } // ToRawInfo returns a description of SecurityDefinitionsItem suitable for JSON or YAML export. -func (m *SecurityDefinitionsItem) ToRawInfo() interface{} { +func (m *SecurityDefinitionsItem) ToRawInfo() *yaml.Node { // ONE OF WRAPPER // SecurityDefinitionsItem // {Name:basicAuthenticationSecurity Type:BasicAuthenticationSecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} @@ -8740,103 +8674,111 @@ func (m *SecurityDefinitionsItem) ToRawInfo() interface{} { } // ToRawInfo returns a description of SecurityRequirement suitable for JSON or YAML export. -func (m *SecurityRequirement) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *SecurityRequirement) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:additionalProperties Type:NamedStringArray StringEnumValues:[] MapType:StringArray Repeated:true Pattern: Implicit:true Description:} return info } // ToRawInfo returns a description of StringArray suitable for JSON or YAML export. -func (m *StringArray) ToRawInfo() interface{} { - return m.Value +func (m *StringArray) ToRawInfo() *yaml.Node { + return compiler.NewSequenceNodeForStringArray(m.Value) } // ToRawInfo returns a description of Tag suitable for JSON or YAML export. -func (m *Tag) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Tag) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } // always include this required field. - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) } if m.ExternalDocs != nil { - info = append(info, yaml.MapItem{Key: "externalDocs", Value: m.ExternalDocs.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("externalDocs")) + info.Content = append(info.Content, m.ExternalDocs.ToRawInfo()) } - // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } // ToRawInfo returns a description of TypeItem suitable for JSON or YAML export. -func (m *TypeItem) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *TypeItem) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if len(m.Value) != 0 { - info = append(info, yaml.MapItem{Key: "value", Value: m.Value}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("value")) + info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Value)) } return info } // ToRawInfo returns a description of VendorExtension suitable for JSON or YAML export. -func (m *VendorExtension) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *VendorExtension) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:additionalProperties Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern: Implicit:true Description:} return info } // ToRawInfo returns a description of Xml suitable for JSON or YAML export. -func (m *Xml) ToRawInfo() interface{} { - info := yaml.MapSlice{} +func (m *Xml) ToRawInfo() *yaml.Node { + info := compiler.NewMappingNode() if m == nil { return info } if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("name")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name)) } if m.Namespace != "" { - info = append(info, yaml.MapItem{Key: "namespace", Value: m.Namespace}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("namespace")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Namespace)) } if m.Prefix != "" { - info = append(info, yaml.MapItem{Key: "prefix", Value: m.Prefix}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("prefix")) + info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Prefix)) } if m.Attribute != false { - info = append(info, yaml.MapItem{Key: "attribute", Value: m.Attribute}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("attribute")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Attribute)) } if m.Wrapped != false { - info = append(info, yaml.MapItem{Key: "wrapped", Value: m.Wrapped}) + info.Content = append(info.Content, compiler.NewScalarNodeForString("wrapped")) + info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Wrapped)) } if m.VendorExtension != nil { for _, item := range m.VendorExtension { - info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name)) + info.Content = append(info.Content, item.Value.ToRawInfo()) } } - // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} return info } diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.pb.go b/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.pb.go index 6199e7cb..559ddea1 100644 --- a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.pb.go +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.pb.go @@ -1,77 +1,90 @@ +// Copyright 2020 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// THIS FILE IS AUTOMATICALLY GENERATED. + // Code generated by protoc-gen-go. DO NOT EDIT. -// source: OpenAPIv2/OpenAPIv2.proto +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.12.3 +// source: openapiv2/OpenAPIv2.proto package openapi_v2 import ( - fmt "fmt" proto "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 type AdditionalPropertiesItem struct { - // Types that are valid to be assigned to Oneof: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Oneof: // *AdditionalPropertiesItem_Schema // *AdditionalPropertiesItem_Boolean - Oneof isAdditionalPropertiesItem_Oneof `protobuf_oneof:"oneof"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Oneof isAdditionalPropertiesItem_Oneof `protobuf_oneof:"oneof"` } -func (m *AdditionalPropertiesItem) Reset() { *m = AdditionalPropertiesItem{} } -func (m *AdditionalPropertiesItem) String() string { return proto.CompactTextString(m) } -func (*AdditionalPropertiesItem) ProtoMessage() {} -func (*AdditionalPropertiesItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{0} +func (x *AdditionalPropertiesItem) Reset() { + *x = AdditionalPropertiesItem{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *AdditionalPropertiesItem) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AdditionalPropertiesItem.Unmarshal(m, b) -} -func (m *AdditionalPropertiesItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AdditionalPropertiesItem.Marshal(b, m, deterministic) -} -func (m *AdditionalPropertiesItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_AdditionalPropertiesItem.Merge(m, src) -} -func (m *AdditionalPropertiesItem) XXX_Size() int { - return xxx_messageInfo_AdditionalPropertiesItem.Size(m) +func (x *AdditionalPropertiesItem) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AdditionalPropertiesItem) XXX_DiscardUnknown() { - xxx_messageInfo_AdditionalPropertiesItem.DiscardUnknown(m) -} - -var xxx_messageInfo_AdditionalPropertiesItem proto.InternalMessageInfo -type isAdditionalPropertiesItem_Oneof interface { - isAdditionalPropertiesItem_Oneof() -} +func (*AdditionalPropertiesItem) ProtoMessage() {} -type AdditionalPropertiesItem_Schema struct { - Schema *Schema `protobuf:"bytes,1,opt,name=schema,proto3,oneof"` +func (x *AdditionalPropertiesItem) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type AdditionalPropertiesItem_Boolean struct { - Boolean bool `protobuf:"varint,2,opt,name=boolean,proto3,oneof"` +// Deprecated: Use AdditionalPropertiesItem.ProtoReflect.Descriptor instead. +func (*AdditionalPropertiesItem) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{0} } -func (*AdditionalPropertiesItem_Schema) isAdditionalPropertiesItem_Oneof() {} - -func (*AdditionalPropertiesItem_Boolean) isAdditionalPropertiesItem_Oneof() {} - func (m *AdditionalPropertiesItem) GetOneof() isAdditionalPropertiesItem_Oneof { if m != nil { return m.Oneof @@ -79,202 +92,238 @@ func (m *AdditionalPropertiesItem) GetOneof() isAdditionalPropertiesItem_Oneof { return nil } -func (m *AdditionalPropertiesItem) GetSchema() *Schema { - if x, ok := m.GetOneof().(*AdditionalPropertiesItem_Schema); ok { +func (x *AdditionalPropertiesItem) GetSchema() *Schema { + if x, ok := x.GetOneof().(*AdditionalPropertiesItem_Schema); ok { return x.Schema } return nil } -func (m *AdditionalPropertiesItem) GetBoolean() bool { - if x, ok := m.GetOneof().(*AdditionalPropertiesItem_Boolean); ok { +func (x *AdditionalPropertiesItem) GetBoolean() bool { + if x, ok := x.GetOneof().(*AdditionalPropertiesItem_Boolean); ok { return x.Boolean } return false } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*AdditionalPropertiesItem) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*AdditionalPropertiesItem_Schema)(nil), - (*AdditionalPropertiesItem_Boolean)(nil), - } +type isAdditionalPropertiesItem_Oneof interface { + isAdditionalPropertiesItem_Oneof() } -type Any struct { - Value *any.Any `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - Yaml string `protobuf:"bytes,2,opt,name=yaml,proto3" json:"yaml,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type AdditionalPropertiesItem_Schema struct { + Schema *Schema `protobuf:"bytes,1,opt,name=schema,proto3,oneof"` } -func (m *Any) Reset() { *m = Any{} } -func (m *Any) String() string { return proto.CompactTextString(m) } -func (*Any) ProtoMessage() {} -func (*Any) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{1} +type AdditionalPropertiesItem_Boolean struct { + Boolean bool `protobuf:"varint,2,opt,name=boolean,proto3,oneof"` } -func (m *Any) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Any.Unmarshal(m, b) -} -func (m *Any) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Any.Marshal(b, m, deterministic) +func (*AdditionalPropertiesItem_Schema) isAdditionalPropertiesItem_Oneof() {} + +func (*AdditionalPropertiesItem_Boolean) isAdditionalPropertiesItem_Oneof() {} + +type Any struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value *any.Any `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + Yaml string `protobuf:"bytes,2,opt,name=yaml,proto3" json:"yaml,omitempty"` } -func (m *Any) XXX_Merge(src proto.Message) { - xxx_messageInfo_Any.Merge(m, src) + +func (x *Any) Reset() { + *x = Any{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Any) XXX_Size() int { - return xxx_messageInfo_Any.Size(m) + +func (x *Any) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Any) XXX_DiscardUnknown() { - xxx_messageInfo_Any.DiscardUnknown(m) + +func (*Any) ProtoMessage() {} + +func (x *Any) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Any proto.InternalMessageInfo +// Deprecated: Use Any.ProtoReflect.Descriptor instead. +func (*Any) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{1} +} -func (m *Any) GetValue() *any.Any { - if m != nil { - return m.Value +func (x *Any) GetValue() *any.Any { + if x != nil { + return x.Value } return nil } -func (m *Any) GetYaml() string { - if m != nil { - return m.Yaml +func (x *Any) GetYaml() string { + if x != nil { + return x.Yaml } return "" } type ApiKeySecurity struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - In string `protobuf:"bytes,3,opt,name=in,proto3" json:"in,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,5,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ApiKeySecurity) Reset() { *m = ApiKeySecurity{} } -func (m *ApiKeySecurity) String() string { return proto.CompactTextString(m) } -func (*ApiKeySecurity) ProtoMessage() {} -func (*ApiKeySecurity) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{2} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ApiKeySecurity) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ApiKeySecurity.Unmarshal(m, b) -} -func (m *ApiKeySecurity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ApiKeySecurity.Marshal(b, m, deterministic) + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + In string `protobuf:"bytes,3,opt,name=in,proto3" json:"in,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,5,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *ApiKeySecurity) XXX_Merge(src proto.Message) { - xxx_messageInfo_ApiKeySecurity.Merge(m, src) + +func (x *ApiKeySecurity) Reset() { + *x = ApiKeySecurity{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ApiKeySecurity) XXX_Size() int { - return xxx_messageInfo_ApiKeySecurity.Size(m) + +func (x *ApiKeySecurity) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ApiKeySecurity) XXX_DiscardUnknown() { - xxx_messageInfo_ApiKeySecurity.DiscardUnknown(m) + +func (*ApiKeySecurity) ProtoMessage() {} + +func (x *ApiKeySecurity) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ApiKeySecurity proto.InternalMessageInfo +// Deprecated: Use ApiKeySecurity.ProtoReflect.Descriptor instead. +func (*ApiKeySecurity) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{2} +} -func (m *ApiKeySecurity) GetType() string { - if m != nil { - return m.Type +func (x *ApiKeySecurity) GetType() string { + if x != nil { + return x.Type } return "" } -func (m *ApiKeySecurity) GetName() string { - if m != nil { - return m.Name +func (x *ApiKeySecurity) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *ApiKeySecurity) GetIn() string { - if m != nil { - return m.In +func (x *ApiKeySecurity) GetIn() string { + if x != nil { + return x.In } return "" } -func (m *ApiKeySecurity) GetDescription() string { - if m != nil { - return m.Description +func (x *ApiKeySecurity) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *ApiKeySecurity) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *ApiKeySecurity) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type BasicAuthenticationSecurity struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,3,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *BasicAuthenticationSecurity) Reset() { *m = BasicAuthenticationSecurity{} } -func (m *BasicAuthenticationSecurity) String() string { return proto.CompactTextString(m) } -func (*BasicAuthenticationSecurity) ProtoMessage() {} -func (*BasicAuthenticationSecurity) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{3} + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,3,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *BasicAuthenticationSecurity) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BasicAuthenticationSecurity.Unmarshal(m, b) -} -func (m *BasicAuthenticationSecurity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BasicAuthenticationSecurity.Marshal(b, m, deterministic) -} -func (m *BasicAuthenticationSecurity) XXX_Merge(src proto.Message) { - xxx_messageInfo_BasicAuthenticationSecurity.Merge(m, src) +func (x *BasicAuthenticationSecurity) Reset() { + *x = BasicAuthenticationSecurity{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *BasicAuthenticationSecurity) XXX_Size() int { - return xxx_messageInfo_BasicAuthenticationSecurity.Size(m) + +func (x *BasicAuthenticationSecurity) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BasicAuthenticationSecurity) XXX_DiscardUnknown() { - xxx_messageInfo_BasicAuthenticationSecurity.DiscardUnknown(m) + +func (*BasicAuthenticationSecurity) ProtoMessage() {} + +func (x *BasicAuthenticationSecurity) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BasicAuthenticationSecurity proto.InternalMessageInfo +// Deprecated: Use BasicAuthenticationSecurity.ProtoReflect.Descriptor instead. +func (*BasicAuthenticationSecurity) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{3} +} -func (m *BasicAuthenticationSecurity) GetType() string { - if m != nil { - return m.Type +func (x *BasicAuthenticationSecurity) GetType() string { + if x != nil { + return x.Type } return "" } -func (m *BasicAuthenticationSecurity) GetDescription() string { - if m != nil { - return m.Description +func (x *BasicAuthenticationSecurity) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *BasicAuthenticationSecurity) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *BasicAuthenticationSecurity) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type BodyParameter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` // The name of the parameter. @@ -282,228 +331,260 @@ type BodyParameter struct { // Determines the location of the parameter. In string `protobuf:"bytes,3,opt,name=in,proto3" json:"in,omitempty"` // Determines whether or not this parameter is required or optional. - Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"` - Schema *Schema `protobuf:"bytes,5,opt,name=schema,proto3" json:"schema,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"` + Schema *Schema `protobuf:"bytes,5,opt,name=schema,proto3" json:"schema,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *BodyParameter) Reset() { *m = BodyParameter{} } -func (m *BodyParameter) String() string { return proto.CompactTextString(m) } -func (*BodyParameter) ProtoMessage() {} -func (*BodyParameter) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{4} +func (x *BodyParameter) Reset() { + *x = BodyParameter{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *BodyParameter) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BodyParameter.Unmarshal(m, b) +func (x *BodyParameter) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BodyParameter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BodyParameter.Marshal(b, m, deterministic) -} -func (m *BodyParameter) XXX_Merge(src proto.Message) { - xxx_messageInfo_BodyParameter.Merge(m, src) -} -func (m *BodyParameter) XXX_Size() int { - return xxx_messageInfo_BodyParameter.Size(m) -} -func (m *BodyParameter) XXX_DiscardUnknown() { - xxx_messageInfo_BodyParameter.DiscardUnknown(m) + +func (*BodyParameter) ProtoMessage() {} + +func (x *BodyParameter) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BodyParameter proto.InternalMessageInfo +// Deprecated: Use BodyParameter.ProtoReflect.Descriptor instead. +func (*BodyParameter) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{4} +} -func (m *BodyParameter) GetDescription() string { - if m != nil { - return m.Description +func (x *BodyParameter) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *BodyParameter) GetName() string { - if m != nil { - return m.Name +func (x *BodyParameter) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *BodyParameter) GetIn() string { - if m != nil { - return m.In +func (x *BodyParameter) GetIn() string { + if x != nil { + return x.In } return "" } -func (m *BodyParameter) GetRequired() bool { - if m != nil { - return m.Required +func (x *BodyParameter) GetRequired() bool { + if x != nil { + return x.Required } return false } -func (m *BodyParameter) GetSchema() *Schema { - if m != nil { - return m.Schema +func (x *BodyParameter) GetSchema() *Schema { + if x != nil { + return x.Schema } return nil } -func (m *BodyParameter) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *BodyParameter) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } // Contact information for the owners of the API. type Contact struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // The identifying name of the contact person/organization. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The URL pointing to the contact information. Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` // The email address of the contact person/organization. - Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,4,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,4,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *Contact) Reset() { *m = Contact{} } -func (m *Contact) String() string { return proto.CompactTextString(m) } -func (*Contact) ProtoMessage() {} -func (*Contact) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{5} +func (x *Contact) Reset() { + *x = Contact{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Contact) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Contact.Unmarshal(m, b) -} -func (m *Contact) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Contact.Marshal(b, m, deterministic) -} -func (m *Contact) XXX_Merge(src proto.Message) { - xxx_messageInfo_Contact.Merge(m, src) +func (x *Contact) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Contact) XXX_Size() int { - return xxx_messageInfo_Contact.Size(m) -} -func (m *Contact) XXX_DiscardUnknown() { - xxx_messageInfo_Contact.DiscardUnknown(m) + +func (*Contact) ProtoMessage() {} + +func (x *Contact) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Contact proto.InternalMessageInfo +// Deprecated: Use Contact.ProtoReflect.Descriptor instead. +func (*Contact) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{5} +} -func (m *Contact) GetName() string { - if m != nil { - return m.Name +func (x *Contact) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *Contact) GetUrl() string { - if m != nil { - return m.Url +func (x *Contact) GetUrl() string { + if x != nil { + return x.Url } return "" } -func (m *Contact) GetEmail() string { - if m != nil { - return m.Email +func (x *Contact) GetEmail() string { + if x != nil { + return x.Email } return "" } -func (m *Contact) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *Contact) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type Default struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + AdditionalProperties []*NamedAny `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } -func (m *Default) Reset() { *m = Default{} } -func (m *Default) String() string { return proto.CompactTextString(m) } -func (*Default) ProtoMessage() {} -func (*Default) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{6} +func (x *Default) Reset() { + *x = Default{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Default) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Default.Unmarshal(m, b) -} -func (m *Default) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Default.Marshal(b, m, deterministic) -} -func (m *Default) XXX_Merge(src proto.Message) { - xxx_messageInfo_Default.Merge(m, src) -} -func (m *Default) XXX_Size() int { - return xxx_messageInfo_Default.Size(m) +func (x *Default) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Default) XXX_DiscardUnknown() { - xxx_messageInfo_Default.DiscardUnknown(m) + +func (*Default) ProtoMessage() {} + +func (x *Default) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Default proto.InternalMessageInfo +// Deprecated: Use Default.ProtoReflect.Descriptor instead. +func (*Default) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{6} +} -func (m *Default) GetAdditionalProperties() []*NamedAny { - if m != nil { - return m.AdditionalProperties +func (x *Default) GetAdditionalProperties() []*NamedAny { + if x != nil { + return x.AdditionalProperties } return nil } // One or more JSON objects describing the schemas being consumed and produced by the API. type Definitions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + AdditionalProperties []*NamedSchema `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } -func (m *Definitions) Reset() { *m = Definitions{} } -func (m *Definitions) String() string { return proto.CompactTextString(m) } -func (*Definitions) ProtoMessage() {} -func (*Definitions) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{7} +func (x *Definitions) Reset() { + *x = Definitions{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Definitions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Definitions.Unmarshal(m, b) -} -func (m *Definitions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Definitions.Marshal(b, m, deterministic) -} -func (m *Definitions) XXX_Merge(src proto.Message) { - xxx_messageInfo_Definitions.Merge(m, src) -} -func (m *Definitions) XXX_Size() int { - return xxx_messageInfo_Definitions.Size(m) +func (x *Definitions) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Definitions) XXX_DiscardUnknown() { - xxx_messageInfo_Definitions.DiscardUnknown(m) + +func (*Definitions) ProtoMessage() {} + +func (x *Definitions) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Definitions proto.InternalMessageInfo +// Deprecated: Use Definitions.ProtoReflect.Descriptor instead. +func (*Definitions) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{7} +} -func (m *Definitions) GetAdditionalProperties() []*NamedSchema { - if m != nil { - return m.AdditionalProperties +func (x *Definitions) GetAdditionalProperties() []*NamedSchema { + if x != nil { + return x.AdditionalProperties } return nil } type Document struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // The Swagger version of this document. Swagger string `protobuf:"bytes,1,opt,name=swagger,proto3" json:"swagger,omitempty"` Info *Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` @@ -516,366 +597,398 @@ type Document struct { // A list of MIME types accepted by the API. Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"` // A list of MIME types the API can produce. - Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"` - Paths *Paths `protobuf:"bytes,8,opt,name=paths,proto3" json:"paths,omitempty"` - Definitions *Definitions `protobuf:"bytes,9,opt,name=definitions,proto3" json:"definitions,omitempty"` - Parameters *ParameterDefinitions `protobuf:"bytes,10,opt,name=parameters,proto3" json:"parameters,omitempty"` - Responses *ResponseDefinitions `protobuf:"bytes,11,opt,name=responses,proto3" json:"responses,omitempty"` - Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` - SecurityDefinitions *SecurityDefinitions `protobuf:"bytes,13,opt,name=security_definitions,json=securityDefinitions,proto3" json:"security_definitions,omitempty"` - Tags []*Tag `protobuf:"bytes,14,rep,name=tags,proto3" json:"tags,omitempty"` - ExternalDocs *ExternalDocs `protobuf:"bytes,15,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,16,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Document) Reset() { *m = Document{} } -func (m *Document) String() string { return proto.CompactTextString(m) } -func (*Document) ProtoMessage() {} -func (*Document) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{8} + Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"` + Paths *Paths `protobuf:"bytes,8,opt,name=paths,proto3" json:"paths,omitempty"` + Definitions *Definitions `protobuf:"bytes,9,opt,name=definitions,proto3" json:"definitions,omitempty"` + Parameters *ParameterDefinitions `protobuf:"bytes,10,opt,name=parameters,proto3" json:"parameters,omitempty"` + Responses *ResponseDefinitions `protobuf:"bytes,11,opt,name=responses,proto3" json:"responses,omitempty"` + Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` + SecurityDefinitions *SecurityDefinitions `protobuf:"bytes,13,opt,name=security_definitions,json=securityDefinitions,proto3" json:"security_definitions,omitempty"` + Tags []*Tag `protobuf:"bytes,14,rep,name=tags,proto3" json:"tags,omitempty"` + ExternalDocs *ExternalDocs `protobuf:"bytes,15,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,16,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *Document) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Document.Unmarshal(m, b) -} -func (m *Document) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Document.Marshal(b, m, deterministic) -} -func (m *Document) XXX_Merge(src proto.Message) { - xxx_messageInfo_Document.Merge(m, src) +func (x *Document) Reset() { + *x = Document{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Document) XXX_Size() int { - return xxx_messageInfo_Document.Size(m) + +func (x *Document) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Document) XXX_DiscardUnknown() { - xxx_messageInfo_Document.DiscardUnknown(m) + +func (*Document) ProtoMessage() {} + +func (x *Document) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Document proto.InternalMessageInfo +// Deprecated: Use Document.ProtoReflect.Descriptor instead. +func (*Document) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{8} +} -func (m *Document) GetSwagger() string { - if m != nil { - return m.Swagger +func (x *Document) GetSwagger() string { + if x != nil { + return x.Swagger } return "" } -func (m *Document) GetInfo() *Info { - if m != nil { - return m.Info +func (x *Document) GetInfo() *Info { + if x != nil { + return x.Info } return nil } -func (m *Document) GetHost() string { - if m != nil { - return m.Host +func (x *Document) GetHost() string { + if x != nil { + return x.Host } return "" } -func (m *Document) GetBasePath() string { - if m != nil { - return m.BasePath +func (x *Document) GetBasePath() string { + if x != nil { + return x.BasePath } return "" } -func (m *Document) GetSchemes() []string { - if m != nil { - return m.Schemes +func (x *Document) GetSchemes() []string { + if x != nil { + return x.Schemes } return nil } -func (m *Document) GetConsumes() []string { - if m != nil { - return m.Consumes +func (x *Document) GetConsumes() []string { + if x != nil { + return x.Consumes } return nil } -func (m *Document) GetProduces() []string { - if m != nil { - return m.Produces +func (x *Document) GetProduces() []string { + if x != nil { + return x.Produces } return nil } -func (m *Document) GetPaths() *Paths { - if m != nil { - return m.Paths +func (x *Document) GetPaths() *Paths { + if x != nil { + return x.Paths } return nil } -func (m *Document) GetDefinitions() *Definitions { - if m != nil { - return m.Definitions +func (x *Document) GetDefinitions() *Definitions { + if x != nil { + return x.Definitions } return nil } -func (m *Document) GetParameters() *ParameterDefinitions { - if m != nil { - return m.Parameters +func (x *Document) GetParameters() *ParameterDefinitions { + if x != nil { + return x.Parameters } return nil } -func (m *Document) GetResponses() *ResponseDefinitions { - if m != nil { - return m.Responses +func (x *Document) GetResponses() *ResponseDefinitions { + if x != nil { + return x.Responses } return nil } -func (m *Document) GetSecurity() []*SecurityRequirement { - if m != nil { - return m.Security +func (x *Document) GetSecurity() []*SecurityRequirement { + if x != nil { + return x.Security } return nil } -func (m *Document) GetSecurityDefinitions() *SecurityDefinitions { - if m != nil { - return m.SecurityDefinitions +func (x *Document) GetSecurityDefinitions() *SecurityDefinitions { + if x != nil { + return x.SecurityDefinitions } return nil } -func (m *Document) GetTags() []*Tag { - if m != nil { - return m.Tags +func (x *Document) GetTags() []*Tag { + if x != nil { + return x.Tags } return nil } -func (m *Document) GetExternalDocs() *ExternalDocs { - if m != nil { - return m.ExternalDocs +func (x *Document) GetExternalDocs() *ExternalDocs { + if x != nil { + return x.ExternalDocs } return nil } -func (m *Document) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *Document) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type Examples struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + AdditionalProperties []*NamedAny `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } -func (m *Examples) Reset() { *m = Examples{} } -func (m *Examples) String() string { return proto.CompactTextString(m) } -func (*Examples) ProtoMessage() {} -func (*Examples) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{9} +func (x *Examples) Reset() { + *x = Examples{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Examples) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Examples.Unmarshal(m, b) +func (x *Examples) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Examples) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Examples.Marshal(b, m, deterministic) -} -func (m *Examples) XXX_Merge(src proto.Message) { - xxx_messageInfo_Examples.Merge(m, src) -} -func (m *Examples) XXX_Size() int { - return xxx_messageInfo_Examples.Size(m) -} -func (m *Examples) XXX_DiscardUnknown() { - xxx_messageInfo_Examples.DiscardUnknown(m) + +func (*Examples) ProtoMessage() {} + +func (x *Examples) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Examples proto.InternalMessageInfo +// Deprecated: Use Examples.ProtoReflect.Descriptor instead. +func (*Examples) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{9} +} -func (m *Examples) GetAdditionalProperties() []*NamedAny { - if m != nil { - return m.AdditionalProperties +func (x *Examples) GetAdditionalProperties() []*NamedAny { + if x != nil { + return x.AdditionalProperties } return nil } // information about external documentation type ExternalDocs struct { - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,3,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ExternalDocs) Reset() { *m = ExternalDocs{} } -func (m *ExternalDocs) String() string { return proto.CompactTextString(m) } -func (*ExternalDocs) ProtoMessage() {} -func (*ExternalDocs) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{10} + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,3,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *ExternalDocs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ExternalDocs.Unmarshal(m, b) -} -func (m *ExternalDocs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ExternalDocs.Marshal(b, m, deterministic) -} -func (m *ExternalDocs) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExternalDocs.Merge(m, src) +func (x *ExternalDocs) Reset() { + *x = ExternalDocs{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ExternalDocs) XXX_Size() int { - return xxx_messageInfo_ExternalDocs.Size(m) + +func (x *ExternalDocs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ExternalDocs) XXX_DiscardUnknown() { - xxx_messageInfo_ExternalDocs.DiscardUnknown(m) + +func (*ExternalDocs) ProtoMessage() {} + +func (x *ExternalDocs) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ExternalDocs proto.InternalMessageInfo +// Deprecated: Use ExternalDocs.ProtoReflect.Descriptor instead. +func (*ExternalDocs) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{10} +} -func (m *ExternalDocs) GetDescription() string { - if m != nil { - return m.Description +func (x *ExternalDocs) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *ExternalDocs) GetUrl() string { - if m != nil { - return m.Url +func (x *ExternalDocs) GetUrl() string { + if x != nil { + return x.Url } return "" } -func (m *ExternalDocs) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *ExternalDocs) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } // A deterministic version of a JSON Schema object. type FileSchema struct { - Format string `protobuf:"bytes,1,opt,name=format,proto3" json:"format,omitempty"` - Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - Default *Any `protobuf:"bytes,4,opt,name=default,proto3" json:"default,omitempty"` - Required []string `protobuf:"bytes,5,rep,name=required,proto3" json:"required,omitempty"` - Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"` - ReadOnly bool `protobuf:"varint,7,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` - ExternalDocs *ExternalDocs `protobuf:"bytes,8,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` - Example *Any `protobuf:"bytes,9,opt,name=example,proto3" json:"example,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,10,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FileSchema) Reset() { *m = FileSchema{} } -func (m *FileSchema) String() string { return proto.CompactTextString(m) } -func (*FileSchema) ProtoMessage() {} -func (*FileSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{11} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *FileSchema) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FileSchema.Unmarshal(m, b) -} -func (m *FileSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FileSchema.Marshal(b, m, deterministic) + Format string `protobuf:"bytes,1,opt,name=format,proto3" json:"format,omitempty"` + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Default *Any `protobuf:"bytes,4,opt,name=default,proto3" json:"default,omitempty"` + Required []string `protobuf:"bytes,5,rep,name=required,proto3" json:"required,omitempty"` + Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"` + ReadOnly bool `protobuf:"varint,7,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + ExternalDocs *ExternalDocs `protobuf:"bytes,8,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + Example *Any `protobuf:"bytes,9,opt,name=example,proto3" json:"example,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,10,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *FileSchema) XXX_Merge(src proto.Message) { - xxx_messageInfo_FileSchema.Merge(m, src) + +func (x *FileSchema) Reset() { + *x = FileSchema{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *FileSchema) XXX_Size() int { - return xxx_messageInfo_FileSchema.Size(m) + +func (x *FileSchema) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *FileSchema) XXX_DiscardUnknown() { - xxx_messageInfo_FileSchema.DiscardUnknown(m) + +func (*FileSchema) ProtoMessage() {} + +func (x *FileSchema) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_FileSchema proto.InternalMessageInfo +// Deprecated: Use FileSchema.ProtoReflect.Descriptor instead. +func (*FileSchema) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{11} +} -func (m *FileSchema) GetFormat() string { - if m != nil { - return m.Format +func (x *FileSchema) GetFormat() string { + if x != nil { + return x.Format } return "" } -func (m *FileSchema) GetTitle() string { - if m != nil { - return m.Title +func (x *FileSchema) GetTitle() string { + if x != nil { + return x.Title } return "" } -func (m *FileSchema) GetDescription() string { - if m != nil { - return m.Description +func (x *FileSchema) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *FileSchema) GetDefault() *Any { - if m != nil { - return m.Default +func (x *FileSchema) GetDefault() *Any { + if x != nil { + return x.Default } return nil } -func (m *FileSchema) GetRequired() []string { - if m != nil { - return m.Required +func (x *FileSchema) GetRequired() []string { + if x != nil { + return x.Required } return nil } -func (m *FileSchema) GetType() string { - if m != nil { - return m.Type +func (x *FileSchema) GetType() string { + if x != nil { + return x.Type } return "" } -func (m *FileSchema) GetReadOnly() bool { - if m != nil { - return m.ReadOnly +func (x *FileSchema) GetReadOnly() bool { + if x != nil { + return x.ReadOnly } return false } -func (m *FileSchema) GetExternalDocs() *ExternalDocs { - if m != nil { - return m.ExternalDocs +func (x *FileSchema) GetExternalDocs() *ExternalDocs { + if x != nil { + return x.ExternalDocs } return nil } -func (m *FileSchema) GetExample() *Any { - if m != nil { - return m.Example +func (x *FileSchema) GetExample() *Any { + if x != nil { + return x.Example } return nil } -func (m *FileSchema) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *FileSchema) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type FormDataParameterSubSchema struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Determines whether or not this parameter is required or optional. Required bool `protobuf:"varint,1,opt,name=required,proto3" json:"required,omitempty"` // Determines the location of the parameter. @@ -885,400 +998,416 @@ type FormDataParameterSubSchema struct { // The name of the parameter. Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // allows sending a parameter by name only or with an empty value. - AllowEmptyValue bool `protobuf:"varint,5,opt,name=allow_empty_value,json=allowEmptyValue,proto3" json:"allow_empty_value,omitempty"` - Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"` - Format string `protobuf:"bytes,7,opt,name=format,proto3" json:"format,omitempty"` - Items *PrimitivesItems `protobuf:"bytes,8,opt,name=items,proto3" json:"items,omitempty"` - CollectionFormat string `protobuf:"bytes,9,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"` - Default *Any `protobuf:"bytes,10,opt,name=default,proto3" json:"default,omitempty"` - Maximum float64 `protobuf:"fixed64,11,opt,name=maximum,proto3" json:"maximum,omitempty"` - ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` - Minimum float64 `protobuf:"fixed64,13,opt,name=minimum,proto3" json:"minimum,omitempty"` - ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` - MaxLength int64 `protobuf:"varint,15,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` - MinLength int64 `protobuf:"varint,16,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` - Pattern string `protobuf:"bytes,17,opt,name=pattern,proto3" json:"pattern,omitempty"` - MaxItems int64 `protobuf:"varint,18,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` - MinItems int64 `protobuf:"varint,19,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` - UniqueItems bool `protobuf:"varint,20,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` - Enum []*Any `protobuf:"bytes,21,rep,name=enum,proto3" json:"enum,omitempty"` - MultipleOf float64 `protobuf:"fixed64,22,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,23,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FormDataParameterSubSchema) Reset() { *m = FormDataParameterSubSchema{} } -func (m *FormDataParameterSubSchema) String() string { return proto.CompactTextString(m) } -func (*FormDataParameterSubSchema) ProtoMessage() {} + AllowEmptyValue bool `protobuf:"varint,5,opt,name=allow_empty_value,json=allowEmptyValue,proto3" json:"allow_empty_value,omitempty"` + Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"` + Format string `protobuf:"bytes,7,opt,name=format,proto3" json:"format,omitempty"` + Items *PrimitivesItems `protobuf:"bytes,8,opt,name=items,proto3" json:"items,omitempty"` + CollectionFormat string `protobuf:"bytes,9,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"` + Default *Any `protobuf:"bytes,10,opt,name=default,proto3" json:"default,omitempty"` + Maximum float64 `protobuf:"fixed64,11,opt,name=maximum,proto3" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` + Minimum float64 `protobuf:"fixed64,13,opt,name=minimum,proto3" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` + MaxLength int64 `protobuf:"varint,15,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` + MinLength int64 `protobuf:"varint,16,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,17,opt,name=pattern,proto3" json:"pattern,omitempty"` + MaxItems int64 `protobuf:"varint,18,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` + MinItems int64 `protobuf:"varint,19,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,20,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` + Enum []*Any `protobuf:"bytes,21,rep,name=enum,proto3" json:"enum,omitempty"` + MultipleOf float64 `protobuf:"fixed64,22,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,23,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` +} + +func (x *FormDataParameterSubSchema) Reset() { + *x = FormDataParameterSubSchema{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FormDataParameterSubSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FormDataParameterSubSchema) ProtoMessage() {} + +func (x *FormDataParameterSubSchema) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FormDataParameterSubSchema.ProtoReflect.Descriptor instead. func (*FormDataParameterSubSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{12} -} - -func (m *FormDataParameterSubSchema) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FormDataParameterSubSchema.Unmarshal(m, b) -} -func (m *FormDataParameterSubSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FormDataParameterSubSchema.Marshal(b, m, deterministic) + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{12} } -func (m *FormDataParameterSubSchema) XXX_Merge(src proto.Message) { - xxx_messageInfo_FormDataParameterSubSchema.Merge(m, src) -} -func (m *FormDataParameterSubSchema) XXX_Size() int { - return xxx_messageInfo_FormDataParameterSubSchema.Size(m) -} -func (m *FormDataParameterSubSchema) XXX_DiscardUnknown() { - xxx_messageInfo_FormDataParameterSubSchema.DiscardUnknown(m) -} - -var xxx_messageInfo_FormDataParameterSubSchema proto.InternalMessageInfo -func (m *FormDataParameterSubSchema) GetRequired() bool { - if m != nil { - return m.Required +func (x *FormDataParameterSubSchema) GetRequired() bool { + if x != nil { + return x.Required } return false } -func (m *FormDataParameterSubSchema) GetIn() string { - if m != nil { - return m.In +func (x *FormDataParameterSubSchema) GetIn() string { + if x != nil { + return x.In } return "" } -func (m *FormDataParameterSubSchema) GetDescription() string { - if m != nil { - return m.Description +func (x *FormDataParameterSubSchema) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *FormDataParameterSubSchema) GetName() string { - if m != nil { - return m.Name +func (x *FormDataParameterSubSchema) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *FormDataParameterSubSchema) GetAllowEmptyValue() bool { - if m != nil { - return m.AllowEmptyValue +func (x *FormDataParameterSubSchema) GetAllowEmptyValue() bool { + if x != nil { + return x.AllowEmptyValue } return false } -func (m *FormDataParameterSubSchema) GetType() string { - if m != nil { - return m.Type +func (x *FormDataParameterSubSchema) GetType() string { + if x != nil { + return x.Type } return "" } -func (m *FormDataParameterSubSchema) GetFormat() string { - if m != nil { - return m.Format +func (x *FormDataParameterSubSchema) GetFormat() string { + if x != nil { + return x.Format } return "" } -func (m *FormDataParameterSubSchema) GetItems() *PrimitivesItems { - if m != nil { - return m.Items +func (x *FormDataParameterSubSchema) GetItems() *PrimitivesItems { + if x != nil { + return x.Items } return nil } -func (m *FormDataParameterSubSchema) GetCollectionFormat() string { - if m != nil { - return m.CollectionFormat +func (x *FormDataParameterSubSchema) GetCollectionFormat() string { + if x != nil { + return x.CollectionFormat } return "" } -func (m *FormDataParameterSubSchema) GetDefault() *Any { - if m != nil { - return m.Default +func (x *FormDataParameterSubSchema) GetDefault() *Any { + if x != nil { + return x.Default } return nil } -func (m *FormDataParameterSubSchema) GetMaximum() float64 { - if m != nil { - return m.Maximum +func (x *FormDataParameterSubSchema) GetMaximum() float64 { + if x != nil { + return x.Maximum } return 0 } -func (m *FormDataParameterSubSchema) GetExclusiveMaximum() bool { - if m != nil { - return m.ExclusiveMaximum +func (x *FormDataParameterSubSchema) GetExclusiveMaximum() bool { + if x != nil { + return x.ExclusiveMaximum } return false } -func (m *FormDataParameterSubSchema) GetMinimum() float64 { - if m != nil { - return m.Minimum +func (x *FormDataParameterSubSchema) GetMinimum() float64 { + if x != nil { + return x.Minimum } return 0 } -func (m *FormDataParameterSubSchema) GetExclusiveMinimum() bool { - if m != nil { - return m.ExclusiveMinimum +func (x *FormDataParameterSubSchema) GetExclusiveMinimum() bool { + if x != nil { + return x.ExclusiveMinimum } return false } -func (m *FormDataParameterSubSchema) GetMaxLength() int64 { - if m != nil { - return m.MaxLength +func (x *FormDataParameterSubSchema) GetMaxLength() int64 { + if x != nil { + return x.MaxLength } return 0 } -func (m *FormDataParameterSubSchema) GetMinLength() int64 { - if m != nil { - return m.MinLength +func (x *FormDataParameterSubSchema) GetMinLength() int64 { + if x != nil { + return x.MinLength } return 0 } -func (m *FormDataParameterSubSchema) GetPattern() string { - if m != nil { - return m.Pattern +func (x *FormDataParameterSubSchema) GetPattern() string { + if x != nil { + return x.Pattern } return "" } -func (m *FormDataParameterSubSchema) GetMaxItems() int64 { - if m != nil { - return m.MaxItems +func (x *FormDataParameterSubSchema) GetMaxItems() int64 { + if x != nil { + return x.MaxItems } return 0 } -func (m *FormDataParameterSubSchema) GetMinItems() int64 { - if m != nil { - return m.MinItems +func (x *FormDataParameterSubSchema) GetMinItems() int64 { + if x != nil { + return x.MinItems } return 0 } -func (m *FormDataParameterSubSchema) GetUniqueItems() bool { - if m != nil { - return m.UniqueItems +func (x *FormDataParameterSubSchema) GetUniqueItems() bool { + if x != nil { + return x.UniqueItems } return false } -func (m *FormDataParameterSubSchema) GetEnum() []*Any { - if m != nil { - return m.Enum +func (x *FormDataParameterSubSchema) GetEnum() []*Any { + if x != nil { + return x.Enum } return nil } -func (m *FormDataParameterSubSchema) GetMultipleOf() float64 { - if m != nil { - return m.MultipleOf +func (x *FormDataParameterSubSchema) GetMultipleOf() float64 { + if x != nil { + return x.MultipleOf } return 0 } -func (m *FormDataParameterSubSchema) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *FormDataParameterSubSchema) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type Header struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"` - Items *PrimitivesItems `protobuf:"bytes,3,opt,name=items,proto3" json:"items,omitempty"` - CollectionFormat string `protobuf:"bytes,4,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"` - Default *Any `protobuf:"bytes,5,opt,name=default,proto3" json:"default,omitempty"` - Maximum float64 `protobuf:"fixed64,6,opt,name=maximum,proto3" json:"maximum,omitempty"` - ExclusiveMaximum bool `protobuf:"varint,7,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` - Minimum float64 `protobuf:"fixed64,8,opt,name=minimum,proto3" json:"minimum,omitempty"` - ExclusiveMinimum bool `protobuf:"varint,9,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` - MaxLength int64 `protobuf:"varint,10,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` - MinLength int64 `protobuf:"varint,11,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` - Pattern string `protobuf:"bytes,12,opt,name=pattern,proto3" json:"pattern,omitempty"` - MaxItems int64 `protobuf:"varint,13,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` - MinItems int64 `protobuf:"varint,14,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` - UniqueItems bool `protobuf:"varint,15,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` - Enum []*Any `protobuf:"bytes,16,rep,name=enum,proto3" json:"enum,omitempty"` - MultipleOf float64 `protobuf:"fixed64,17,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` - Description string `protobuf:"bytes,18,opt,name=description,proto3" json:"description,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,19,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Header) Reset() { *m = Header{} } -func (m *Header) String() string { return proto.CompactTextString(m) } -func (*Header) ProtoMessage() {} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"` + Items *PrimitivesItems `protobuf:"bytes,3,opt,name=items,proto3" json:"items,omitempty"` + CollectionFormat string `protobuf:"bytes,4,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"` + Default *Any `protobuf:"bytes,5,opt,name=default,proto3" json:"default,omitempty"` + Maximum float64 `protobuf:"fixed64,6,opt,name=maximum,proto3" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,7,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` + Minimum float64 `protobuf:"fixed64,8,opt,name=minimum,proto3" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,9,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` + MaxLength int64 `protobuf:"varint,10,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` + MinLength int64 `protobuf:"varint,11,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,12,opt,name=pattern,proto3" json:"pattern,omitempty"` + MaxItems int64 `protobuf:"varint,13,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` + MinItems int64 `protobuf:"varint,14,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,15,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` + Enum []*Any `protobuf:"bytes,16,rep,name=enum,proto3" json:"enum,omitempty"` + MultipleOf float64 `protobuf:"fixed64,17,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` + Description string `protobuf:"bytes,18,opt,name=description,proto3" json:"description,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,19,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` +} + +func (x *Header) Reset() { + *x = Header{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Header) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Header) ProtoMessage() {} + +func (x *Header) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Header.ProtoReflect.Descriptor instead. func (*Header) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{13} -} - -func (m *Header) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Header.Unmarshal(m, b) -} -func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Header.Marshal(b, m, deterministic) -} -func (m *Header) XXX_Merge(src proto.Message) { - xxx_messageInfo_Header.Merge(m, src) -} -func (m *Header) XXX_Size() int { - return xxx_messageInfo_Header.Size(m) + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{13} } -func (m *Header) XXX_DiscardUnknown() { - xxx_messageInfo_Header.DiscardUnknown(m) -} - -var xxx_messageInfo_Header proto.InternalMessageInfo -func (m *Header) GetType() string { - if m != nil { - return m.Type +func (x *Header) GetType() string { + if x != nil { + return x.Type } return "" } -func (m *Header) GetFormat() string { - if m != nil { - return m.Format +func (x *Header) GetFormat() string { + if x != nil { + return x.Format } return "" } -func (m *Header) GetItems() *PrimitivesItems { - if m != nil { - return m.Items +func (x *Header) GetItems() *PrimitivesItems { + if x != nil { + return x.Items } return nil } -func (m *Header) GetCollectionFormat() string { - if m != nil { - return m.CollectionFormat +func (x *Header) GetCollectionFormat() string { + if x != nil { + return x.CollectionFormat } return "" } -func (m *Header) GetDefault() *Any { - if m != nil { - return m.Default +func (x *Header) GetDefault() *Any { + if x != nil { + return x.Default } return nil } -func (m *Header) GetMaximum() float64 { - if m != nil { - return m.Maximum +func (x *Header) GetMaximum() float64 { + if x != nil { + return x.Maximum } return 0 } -func (m *Header) GetExclusiveMaximum() bool { - if m != nil { - return m.ExclusiveMaximum +func (x *Header) GetExclusiveMaximum() bool { + if x != nil { + return x.ExclusiveMaximum } return false } -func (m *Header) GetMinimum() float64 { - if m != nil { - return m.Minimum +func (x *Header) GetMinimum() float64 { + if x != nil { + return x.Minimum } return 0 } -func (m *Header) GetExclusiveMinimum() bool { - if m != nil { - return m.ExclusiveMinimum +func (x *Header) GetExclusiveMinimum() bool { + if x != nil { + return x.ExclusiveMinimum } return false } -func (m *Header) GetMaxLength() int64 { - if m != nil { - return m.MaxLength +func (x *Header) GetMaxLength() int64 { + if x != nil { + return x.MaxLength } return 0 } -func (m *Header) GetMinLength() int64 { - if m != nil { - return m.MinLength +func (x *Header) GetMinLength() int64 { + if x != nil { + return x.MinLength } return 0 } -func (m *Header) GetPattern() string { - if m != nil { - return m.Pattern +func (x *Header) GetPattern() string { + if x != nil { + return x.Pattern } return "" } -func (m *Header) GetMaxItems() int64 { - if m != nil { - return m.MaxItems +func (x *Header) GetMaxItems() int64 { + if x != nil { + return x.MaxItems } return 0 } -func (m *Header) GetMinItems() int64 { - if m != nil { - return m.MinItems +func (x *Header) GetMinItems() int64 { + if x != nil { + return x.MinItems } return 0 } -func (m *Header) GetUniqueItems() bool { - if m != nil { - return m.UniqueItems +func (x *Header) GetUniqueItems() bool { + if x != nil { + return x.UniqueItems } return false } -func (m *Header) GetEnum() []*Any { - if m != nil { - return m.Enum +func (x *Header) GetEnum() []*Any { + if x != nil { + return x.Enum } return nil } -func (m *Header) GetMultipleOf() float64 { - if m != nil { - return m.MultipleOf +func (x *Header) GetMultipleOf() float64 { + if x != nil { + return x.MultipleOf } return 0 } -func (m *Header) GetDescription() string { - if m != nil { - return m.Description +func (x *Header) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *Header) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *Header) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type HeaderParameterSubSchema struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Determines whether or not this parameter is required or optional. Required bool `protobuf:"varint,1,opt,name=required,proto3" json:"required,omitempty"` // Determines the location of the parameter. @@ -1286,250 +1415,266 @@ type HeaderParameterSubSchema struct { // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // The name of the parameter. - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` - Format string `protobuf:"bytes,6,opt,name=format,proto3" json:"format,omitempty"` - Items *PrimitivesItems `protobuf:"bytes,7,opt,name=items,proto3" json:"items,omitempty"` - CollectionFormat string `protobuf:"bytes,8,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"` - Default *Any `protobuf:"bytes,9,opt,name=default,proto3" json:"default,omitempty"` - Maximum float64 `protobuf:"fixed64,10,opt,name=maximum,proto3" json:"maximum,omitempty"` - ExclusiveMaximum bool `protobuf:"varint,11,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` - Minimum float64 `protobuf:"fixed64,12,opt,name=minimum,proto3" json:"minimum,omitempty"` - ExclusiveMinimum bool `protobuf:"varint,13,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` - MaxLength int64 `protobuf:"varint,14,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` - MinLength int64 `protobuf:"varint,15,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` - Pattern string `protobuf:"bytes,16,opt,name=pattern,proto3" json:"pattern,omitempty"` - MaxItems int64 `protobuf:"varint,17,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` - MinItems int64 `protobuf:"varint,18,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` - UniqueItems bool `protobuf:"varint,19,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` - Enum []*Any `protobuf:"bytes,20,rep,name=enum,proto3" json:"enum,omitempty"` - MultipleOf float64 `protobuf:"fixed64,21,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,22,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HeaderParameterSubSchema) Reset() { *m = HeaderParameterSubSchema{} } -func (m *HeaderParameterSubSchema) String() string { return proto.CompactTextString(m) } -func (*HeaderParameterSubSchema) ProtoMessage() {} + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` + Format string `protobuf:"bytes,6,opt,name=format,proto3" json:"format,omitempty"` + Items *PrimitivesItems `protobuf:"bytes,7,opt,name=items,proto3" json:"items,omitempty"` + CollectionFormat string `protobuf:"bytes,8,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"` + Default *Any `protobuf:"bytes,9,opt,name=default,proto3" json:"default,omitempty"` + Maximum float64 `protobuf:"fixed64,10,opt,name=maximum,proto3" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,11,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` + Minimum float64 `protobuf:"fixed64,12,opt,name=minimum,proto3" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,13,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` + MaxLength int64 `protobuf:"varint,14,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` + MinLength int64 `protobuf:"varint,15,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,16,opt,name=pattern,proto3" json:"pattern,omitempty"` + MaxItems int64 `protobuf:"varint,17,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` + MinItems int64 `protobuf:"varint,18,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,19,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` + Enum []*Any `protobuf:"bytes,20,rep,name=enum,proto3" json:"enum,omitempty"` + MultipleOf float64 `protobuf:"fixed64,21,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,22,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` +} + +func (x *HeaderParameterSubSchema) Reset() { + *x = HeaderParameterSubSchema{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeaderParameterSubSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderParameterSubSchema) ProtoMessage() {} + +func (x *HeaderParameterSubSchema) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeaderParameterSubSchema.ProtoReflect.Descriptor instead. func (*HeaderParameterSubSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{14} -} - -func (m *HeaderParameterSubSchema) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HeaderParameterSubSchema.Unmarshal(m, b) -} -func (m *HeaderParameterSubSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HeaderParameterSubSchema.Marshal(b, m, deterministic) -} -func (m *HeaderParameterSubSchema) XXX_Merge(src proto.Message) { - xxx_messageInfo_HeaderParameterSubSchema.Merge(m, src) -} -func (m *HeaderParameterSubSchema) XXX_Size() int { - return xxx_messageInfo_HeaderParameterSubSchema.Size(m) -} -func (m *HeaderParameterSubSchema) XXX_DiscardUnknown() { - xxx_messageInfo_HeaderParameterSubSchema.DiscardUnknown(m) + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{14} } -var xxx_messageInfo_HeaderParameterSubSchema proto.InternalMessageInfo - -func (m *HeaderParameterSubSchema) GetRequired() bool { - if m != nil { - return m.Required +func (x *HeaderParameterSubSchema) GetRequired() bool { + if x != nil { + return x.Required } return false } -func (m *HeaderParameterSubSchema) GetIn() string { - if m != nil { - return m.In +func (x *HeaderParameterSubSchema) GetIn() string { + if x != nil { + return x.In } return "" } -func (m *HeaderParameterSubSchema) GetDescription() string { - if m != nil { - return m.Description +func (x *HeaderParameterSubSchema) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *HeaderParameterSubSchema) GetName() string { - if m != nil { - return m.Name +func (x *HeaderParameterSubSchema) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *HeaderParameterSubSchema) GetType() string { - if m != nil { - return m.Type +func (x *HeaderParameterSubSchema) GetType() string { + if x != nil { + return x.Type } return "" } -func (m *HeaderParameterSubSchema) GetFormat() string { - if m != nil { - return m.Format +func (x *HeaderParameterSubSchema) GetFormat() string { + if x != nil { + return x.Format } return "" } -func (m *HeaderParameterSubSchema) GetItems() *PrimitivesItems { - if m != nil { - return m.Items +func (x *HeaderParameterSubSchema) GetItems() *PrimitivesItems { + if x != nil { + return x.Items } return nil } -func (m *HeaderParameterSubSchema) GetCollectionFormat() string { - if m != nil { - return m.CollectionFormat +func (x *HeaderParameterSubSchema) GetCollectionFormat() string { + if x != nil { + return x.CollectionFormat } return "" } -func (m *HeaderParameterSubSchema) GetDefault() *Any { - if m != nil { - return m.Default +func (x *HeaderParameterSubSchema) GetDefault() *Any { + if x != nil { + return x.Default } return nil } -func (m *HeaderParameterSubSchema) GetMaximum() float64 { - if m != nil { - return m.Maximum +func (x *HeaderParameterSubSchema) GetMaximum() float64 { + if x != nil { + return x.Maximum } return 0 } -func (m *HeaderParameterSubSchema) GetExclusiveMaximum() bool { - if m != nil { - return m.ExclusiveMaximum +func (x *HeaderParameterSubSchema) GetExclusiveMaximum() bool { + if x != nil { + return x.ExclusiveMaximum } return false } -func (m *HeaderParameterSubSchema) GetMinimum() float64 { - if m != nil { - return m.Minimum +func (x *HeaderParameterSubSchema) GetMinimum() float64 { + if x != nil { + return x.Minimum } return 0 } -func (m *HeaderParameterSubSchema) GetExclusiveMinimum() bool { - if m != nil { - return m.ExclusiveMinimum +func (x *HeaderParameterSubSchema) GetExclusiveMinimum() bool { + if x != nil { + return x.ExclusiveMinimum } return false } -func (m *HeaderParameterSubSchema) GetMaxLength() int64 { - if m != nil { - return m.MaxLength +func (x *HeaderParameterSubSchema) GetMaxLength() int64 { + if x != nil { + return x.MaxLength } return 0 } -func (m *HeaderParameterSubSchema) GetMinLength() int64 { - if m != nil { - return m.MinLength +func (x *HeaderParameterSubSchema) GetMinLength() int64 { + if x != nil { + return x.MinLength } return 0 } -func (m *HeaderParameterSubSchema) GetPattern() string { - if m != nil { - return m.Pattern +func (x *HeaderParameterSubSchema) GetPattern() string { + if x != nil { + return x.Pattern } return "" } -func (m *HeaderParameterSubSchema) GetMaxItems() int64 { - if m != nil { - return m.MaxItems +func (x *HeaderParameterSubSchema) GetMaxItems() int64 { + if x != nil { + return x.MaxItems } return 0 } -func (m *HeaderParameterSubSchema) GetMinItems() int64 { - if m != nil { - return m.MinItems +func (x *HeaderParameterSubSchema) GetMinItems() int64 { + if x != nil { + return x.MinItems } return 0 } -func (m *HeaderParameterSubSchema) GetUniqueItems() bool { - if m != nil { - return m.UniqueItems +func (x *HeaderParameterSubSchema) GetUniqueItems() bool { + if x != nil { + return x.UniqueItems } return false } -func (m *HeaderParameterSubSchema) GetEnum() []*Any { - if m != nil { - return m.Enum +func (x *HeaderParameterSubSchema) GetEnum() []*Any { + if x != nil { + return x.Enum } return nil } -func (m *HeaderParameterSubSchema) GetMultipleOf() float64 { - if m != nil { - return m.MultipleOf +func (x *HeaderParameterSubSchema) GetMultipleOf() float64 { + if x != nil { + return x.MultipleOf } return 0 } -func (m *HeaderParameterSubSchema) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *HeaderParameterSubSchema) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type Headers struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + AdditionalProperties []*NamedHeader `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } -func (m *Headers) Reset() { *m = Headers{} } -func (m *Headers) String() string { return proto.CompactTextString(m) } -func (*Headers) ProtoMessage() {} -func (*Headers) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{15} +func (x *Headers) Reset() { + *x = Headers{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Headers) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Headers.Unmarshal(m, b) -} -func (m *Headers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Headers.Marshal(b, m, deterministic) -} -func (m *Headers) XXX_Merge(src proto.Message) { - xxx_messageInfo_Headers.Merge(m, src) +func (x *Headers) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Headers) XXX_Size() int { - return xxx_messageInfo_Headers.Size(m) -} -func (m *Headers) XXX_DiscardUnknown() { - xxx_messageInfo_Headers.DiscardUnknown(m) + +func (*Headers) ProtoMessage() {} + +func (x *Headers) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Headers proto.InternalMessageInfo +// Deprecated: Use Headers.ProtoReflect.Descriptor instead. +func (*Headers) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{15} +} -func (m *Headers) GetAdditionalProperties() []*NamedHeader { - if m != nil { - return m.AdditionalProperties +func (x *Headers) GetAdditionalProperties() []*NamedHeader { + if x != nil { + return x.AdditionalProperties } return nil } // General information about the API. type Info struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // A unique and precise title of the API. Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` // A semantic version number of the API. @@ -1537,797 +1682,885 @@ type Info struct { // A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed. Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // The terms of service for the API. - TermsOfService string `protobuf:"bytes,4,opt,name=terms_of_service,json=termsOfService,proto3" json:"terms_of_service,omitempty"` - Contact *Contact `protobuf:"bytes,5,opt,name=contact,proto3" json:"contact,omitempty"` - License *License `protobuf:"bytes,6,opt,name=license,proto3" json:"license,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,7,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Info) Reset() { *m = Info{} } -func (m *Info) String() string { return proto.CompactTextString(m) } -func (*Info) ProtoMessage() {} -func (*Info) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{16} + TermsOfService string `protobuf:"bytes,4,opt,name=terms_of_service,json=termsOfService,proto3" json:"terms_of_service,omitempty"` + Contact *Contact `protobuf:"bytes,5,opt,name=contact,proto3" json:"contact,omitempty"` + License *License `protobuf:"bytes,6,opt,name=license,proto3" json:"license,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,7,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *Info) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Info.Unmarshal(m, b) -} -func (m *Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Info.Marshal(b, m, deterministic) -} -func (m *Info) XXX_Merge(src proto.Message) { - xxx_messageInfo_Info.Merge(m, src) +func (x *Info) Reset() { + *x = Info{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Info) XXX_Size() int { - return xxx_messageInfo_Info.Size(m) + +func (x *Info) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Info) XXX_DiscardUnknown() { - xxx_messageInfo_Info.DiscardUnknown(m) + +func (*Info) ProtoMessage() {} + +func (x *Info) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Info proto.InternalMessageInfo +// Deprecated: Use Info.ProtoReflect.Descriptor instead. +func (*Info) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{16} +} -func (m *Info) GetTitle() string { - if m != nil { - return m.Title +func (x *Info) GetTitle() string { + if x != nil { + return x.Title } return "" } -func (m *Info) GetVersion() string { - if m != nil { - return m.Version +func (x *Info) GetVersion() string { + if x != nil { + return x.Version } return "" } -func (m *Info) GetDescription() string { - if m != nil { - return m.Description +func (x *Info) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *Info) GetTermsOfService() string { - if m != nil { - return m.TermsOfService +func (x *Info) GetTermsOfService() string { + if x != nil { + return x.TermsOfService } return "" } -func (m *Info) GetContact() *Contact { - if m != nil { - return m.Contact +func (x *Info) GetContact() *Contact { + if x != nil { + return x.Contact } return nil } -func (m *Info) GetLicense() *License { - if m != nil { - return m.License +func (x *Info) GetLicense() *License { + if x != nil { + return x.License } return nil } -func (m *Info) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *Info) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type ItemsItem struct { - Schema []*Schema `protobuf:"bytes,1,rep,name=schema,proto3" json:"schema,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ItemsItem) Reset() { *m = ItemsItem{} } -func (m *ItemsItem) String() string { return proto.CompactTextString(m) } -func (*ItemsItem) ProtoMessage() {} -func (*ItemsItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{17} + Schema []*Schema `protobuf:"bytes,1,rep,name=schema,proto3" json:"schema,omitempty"` } -func (m *ItemsItem) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ItemsItem.Unmarshal(m, b) -} -func (m *ItemsItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ItemsItem.Marshal(b, m, deterministic) -} -func (m *ItemsItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_ItemsItem.Merge(m, src) +func (x *ItemsItem) Reset() { + *x = ItemsItem{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ItemsItem) XXX_Size() int { - return xxx_messageInfo_ItemsItem.Size(m) + +func (x *ItemsItem) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ItemsItem) XXX_DiscardUnknown() { - xxx_messageInfo_ItemsItem.DiscardUnknown(m) + +func (*ItemsItem) ProtoMessage() {} + +func (x *ItemsItem) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ItemsItem proto.InternalMessageInfo +// Deprecated: Use ItemsItem.ProtoReflect.Descriptor instead. +func (*ItemsItem) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{17} +} -func (m *ItemsItem) GetSchema() []*Schema { - if m != nil { - return m.Schema +func (x *ItemsItem) GetSchema() []*Schema { + if x != nil { + return x.Schema } return nil } type JsonReference struct { - XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref,proto3" json:"_ref,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *JsonReference) Reset() { *m = JsonReference{} } -func (m *JsonReference) String() string { return proto.CompactTextString(m) } -func (*JsonReference) ProtoMessage() {} -func (*JsonReference) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{18} + XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref,proto3" json:"_ref,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` } -func (m *JsonReference) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_JsonReference.Unmarshal(m, b) -} -func (m *JsonReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_JsonReference.Marshal(b, m, deterministic) -} -func (m *JsonReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_JsonReference.Merge(m, src) +func (x *JsonReference) Reset() { + *x = JsonReference{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *JsonReference) XXX_Size() int { - return xxx_messageInfo_JsonReference.Size(m) + +func (x *JsonReference) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *JsonReference) XXX_DiscardUnknown() { - xxx_messageInfo_JsonReference.DiscardUnknown(m) + +func (*JsonReference) ProtoMessage() {} + +func (x *JsonReference) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_JsonReference proto.InternalMessageInfo +// Deprecated: Use JsonReference.ProtoReflect.Descriptor instead. +func (*JsonReference) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{18} +} -func (m *JsonReference) GetXRef() string { - if m != nil { - return m.XRef +func (x *JsonReference) GetXRef() string { + if x != nil { + return x.XRef } return "" } -func (m *JsonReference) GetDescription() string { - if m != nil { - return m.Description +func (x *JsonReference) GetDescription() string { + if x != nil { + return x.Description } return "" } type License struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // The name of the license type. It's encouraged to use an OSI compatible license. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The URL pointing to the license. - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,3,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,3,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *License) Reset() { *m = License{} } -func (m *License) String() string { return proto.CompactTextString(m) } -func (*License) ProtoMessage() {} -func (*License) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{19} +func (x *License) Reset() { + *x = License{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *License) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_License.Unmarshal(m, b) -} -func (m *License) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_License.Marshal(b, m, deterministic) -} -func (m *License) XXX_Merge(src proto.Message) { - xxx_messageInfo_License.Merge(m, src) +func (x *License) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *License) XXX_Size() int { - return xxx_messageInfo_License.Size(m) -} -func (m *License) XXX_DiscardUnknown() { - xxx_messageInfo_License.DiscardUnknown(m) + +func (*License) ProtoMessage() {} + +func (x *License) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_License proto.InternalMessageInfo +// Deprecated: Use License.ProtoReflect.Descriptor instead. +func (*License) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{19} +} -func (m *License) GetName() string { - if m != nil { - return m.Name +func (x *License) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *License) GetUrl() string { - if m != nil { - return m.Url +func (x *License) GetUrl() string { + if x != nil { + return x.Url } return "" } -func (m *License) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *License) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } // Automatically-generated message used to represent maps of Any as ordered (name,value) pairs. type NamedAny struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Map key Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Mapped value - Value *Any `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Value *Any `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *NamedAny) Reset() { *m = NamedAny{} } -func (m *NamedAny) String() string { return proto.CompactTextString(m) } -func (*NamedAny) ProtoMessage() {} -func (*NamedAny) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{20} +func (x *NamedAny) Reset() { + *x = NamedAny{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *NamedAny) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NamedAny.Unmarshal(m, b) +func (x *NamedAny) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NamedAny) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NamedAny.Marshal(b, m, deterministic) -} -func (m *NamedAny) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedAny.Merge(m, src) -} -func (m *NamedAny) XXX_Size() int { - return xxx_messageInfo_NamedAny.Size(m) -} -func (m *NamedAny) XXX_DiscardUnknown() { - xxx_messageInfo_NamedAny.DiscardUnknown(m) + +func (*NamedAny) ProtoMessage() {} + +func (x *NamedAny) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NamedAny proto.InternalMessageInfo +// Deprecated: Use NamedAny.ProtoReflect.Descriptor instead. +func (*NamedAny) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{20} +} -func (m *NamedAny) GetName() string { - if m != nil { - return m.Name +func (x *NamedAny) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *NamedAny) GetValue() *Any { - if m != nil { - return m.Value +func (x *NamedAny) GetValue() *Any { + if x != nil { + return x.Value } return nil } // Automatically-generated message used to represent maps of Header as ordered (name,value) pairs. type NamedHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Map key Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Mapped value - Value *Header `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Value *Header `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *NamedHeader) Reset() { *m = NamedHeader{} } -func (m *NamedHeader) String() string { return proto.CompactTextString(m) } -func (*NamedHeader) ProtoMessage() {} -func (*NamedHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{21} +func (x *NamedHeader) Reset() { + *x = NamedHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *NamedHeader) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NamedHeader.Unmarshal(m, b) -} -func (m *NamedHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NamedHeader.Marshal(b, m, deterministic) -} -func (m *NamedHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedHeader.Merge(m, src) -} -func (m *NamedHeader) XXX_Size() int { - return xxx_messageInfo_NamedHeader.Size(m) +func (x *NamedHeader) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NamedHeader) XXX_DiscardUnknown() { - xxx_messageInfo_NamedHeader.DiscardUnknown(m) + +func (*NamedHeader) ProtoMessage() {} + +func (x *NamedHeader) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NamedHeader proto.InternalMessageInfo +// Deprecated: Use NamedHeader.ProtoReflect.Descriptor instead. +func (*NamedHeader) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{21} +} -func (m *NamedHeader) GetName() string { - if m != nil { - return m.Name +func (x *NamedHeader) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *NamedHeader) GetValue() *Header { - if m != nil { - return m.Value +func (x *NamedHeader) GetValue() *Header { + if x != nil { + return x.Value } return nil } // Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs. type NamedParameter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Map key Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Mapped value - Value *Parameter `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Value *Parameter `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *NamedParameter) Reset() { *m = NamedParameter{} } -func (m *NamedParameter) String() string { return proto.CompactTextString(m) } -func (*NamedParameter) ProtoMessage() {} -func (*NamedParameter) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{22} +func (x *NamedParameter) Reset() { + *x = NamedParameter{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *NamedParameter) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NamedParameter.Unmarshal(m, b) -} -func (m *NamedParameter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NamedParameter.Marshal(b, m, deterministic) -} -func (m *NamedParameter) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedParameter.Merge(m, src) +func (x *NamedParameter) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NamedParameter) XXX_Size() int { - return xxx_messageInfo_NamedParameter.Size(m) -} -func (m *NamedParameter) XXX_DiscardUnknown() { - xxx_messageInfo_NamedParameter.DiscardUnknown(m) + +func (*NamedParameter) ProtoMessage() {} + +func (x *NamedParameter) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NamedParameter proto.InternalMessageInfo +// Deprecated: Use NamedParameter.ProtoReflect.Descriptor instead. +func (*NamedParameter) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{22} +} -func (m *NamedParameter) GetName() string { - if m != nil { - return m.Name +func (x *NamedParameter) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *NamedParameter) GetValue() *Parameter { - if m != nil { - return m.Value +func (x *NamedParameter) GetValue() *Parameter { + if x != nil { + return x.Value } return nil } // Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs. type NamedPathItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Map key Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Mapped value - Value *PathItem `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Value *PathItem `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *NamedPathItem) Reset() { *m = NamedPathItem{} } -func (m *NamedPathItem) String() string { return proto.CompactTextString(m) } -func (*NamedPathItem) ProtoMessage() {} -func (*NamedPathItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{23} +func (x *NamedPathItem) Reset() { + *x = NamedPathItem{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *NamedPathItem) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NamedPathItem.Unmarshal(m, b) -} -func (m *NamedPathItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NamedPathItem.Marshal(b, m, deterministic) +func (x *NamedPathItem) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NamedPathItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedPathItem.Merge(m, src) -} -func (m *NamedPathItem) XXX_Size() int { - return xxx_messageInfo_NamedPathItem.Size(m) -} -func (m *NamedPathItem) XXX_DiscardUnknown() { - xxx_messageInfo_NamedPathItem.DiscardUnknown(m) + +func (*NamedPathItem) ProtoMessage() {} + +func (x *NamedPathItem) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NamedPathItem proto.InternalMessageInfo +// Deprecated: Use NamedPathItem.ProtoReflect.Descriptor instead. +func (*NamedPathItem) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{23} +} -func (m *NamedPathItem) GetName() string { - if m != nil { - return m.Name +func (x *NamedPathItem) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *NamedPathItem) GetValue() *PathItem { - if m != nil { - return m.Value +func (x *NamedPathItem) GetValue() *PathItem { + if x != nil { + return x.Value } return nil } // Automatically-generated message used to represent maps of Response as ordered (name,value) pairs. type NamedResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Map key Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Mapped value - Value *Response `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Value *Response `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *NamedResponse) Reset() { *m = NamedResponse{} } -func (m *NamedResponse) String() string { return proto.CompactTextString(m) } -func (*NamedResponse) ProtoMessage() {} -func (*NamedResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{24} +func (x *NamedResponse) Reset() { + *x = NamedResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *NamedResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NamedResponse.Unmarshal(m, b) +func (x *NamedResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NamedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NamedResponse.Marshal(b, m, deterministic) -} -func (m *NamedResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedResponse.Merge(m, src) -} -func (m *NamedResponse) XXX_Size() int { - return xxx_messageInfo_NamedResponse.Size(m) -} -func (m *NamedResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NamedResponse.DiscardUnknown(m) + +func (*NamedResponse) ProtoMessage() {} + +func (x *NamedResponse) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NamedResponse proto.InternalMessageInfo +// Deprecated: Use NamedResponse.ProtoReflect.Descriptor instead. +func (*NamedResponse) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{24} +} -func (m *NamedResponse) GetName() string { - if m != nil { - return m.Name +func (x *NamedResponse) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *NamedResponse) GetValue() *Response { - if m != nil { - return m.Value +func (x *NamedResponse) GetValue() *Response { + if x != nil { + return x.Value } return nil } // Automatically-generated message used to represent maps of ResponseValue as ordered (name,value) pairs. type NamedResponseValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Map key Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Mapped value - Value *ResponseValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Value *ResponseValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *NamedResponseValue) Reset() { *m = NamedResponseValue{} } -func (m *NamedResponseValue) String() string { return proto.CompactTextString(m) } -func (*NamedResponseValue) ProtoMessage() {} -func (*NamedResponseValue) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{25} +func (x *NamedResponseValue) Reset() { + *x = NamedResponseValue{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *NamedResponseValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NamedResponseValue.Unmarshal(m, b) -} -func (m *NamedResponseValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NamedResponseValue.Marshal(b, m, deterministic) -} -func (m *NamedResponseValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedResponseValue.Merge(m, src) -} -func (m *NamedResponseValue) XXX_Size() int { - return xxx_messageInfo_NamedResponseValue.Size(m) +func (x *NamedResponseValue) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NamedResponseValue) XXX_DiscardUnknown() { - xxx_messageInfo_NamedResponseValue.DiscardUnknown(m) + +func (*NamedResponseValue) ProtoMessage() {} + +func (x *NamedResponseValue) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NamedResponseValue proto.InternalMessageInfo +// Deprecated: Use NamedResponseValue.ProtoReflect.Descriptor instead. +func (*NamedResponseValue) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{25} +} -func (m *NamedResponseValue) GetName() string { - if m != nil { - return m.Name +func (x *NamedResponseValue) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *NamedResponseValue) GetValue() *ResponseValue { - if m != nil { - return m.Value +func (x *NamedResponseValue) GetValue() *ResponseValue { + if x != nil { + return x.Value } return nil } // Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs. type NamedSchema struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Map key Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Mapped value - Value *Schema `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Value *Schema `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *NamedSchema) Reset() { *m = NamedSchema{} } -func (m *NamedSchema) String() string { return proto.CompactTextString(m) } -func (*NamedSchema) ProtoMessage() {} -func (*NamedSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{26} +func (x *NamedSchema) Reset() { + *x = NamedSchema{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *NamedSchema) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NamedSchema.Unmarshal(m, b) -} -func (m *NamedSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NamedSchema.Marshal(b, m, deterministic) -} -func (m *NamedSchema) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedSchema.Merge(m, src) +func (x *NamedSchema) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NamedSchema) XXX_Size() int { - return xxx_messageInfo_NamedSchema.Size(m) -} -func (m *NamedSchema) XXX_DiscardUnknown() { - xxx_messageInfo_NamedSchema.DiscardUnknown(m) + +func (*NamedSchema) ProtoMessage() {} + +func (x *NamedSchema) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NamedSchema proto.InternalMessageInfo +// Deprecated: Use NamedSchema.ProtoReflect.Descriptor instead. +func (*NamedSchema) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{26} +} -func (m *NamedSchema) GetName() string { - if m != nil { - return m.Name +func (x *NamedSchema) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *NamedSchema) GetValue() *Schema { - if m != nil { - return m.Value +func (x *NamedSchema) GetValue() *Schema { + if x != nil { + return x.Value } return nil } // Automatically-generated message used to represent maps of SecurityDefinitionsItem as ordered (name,value) pairs. type NamedSecurityDefinitionsItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Map key Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Mapped value - Value *SecurityDefinitionsItem `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Value *SecurityDefinitionsItem `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *NamedSecurityDefinitionsItem) Reset() { *m = NamedSecurityDefinitionsItem{} } -func (m *NamedSecurityDefinitionsItem) String() string { return proto.CompactTextString(m) } -func (*NamedSecurityDefinitionsItem) ProtoMessage() {} -func (*NamedSecurityDefinitionsItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{27} +func (x *NamedSecurityDefinitionsItem) Reset() { + *x = NamedSecurityDefinitionsItem{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *NamedSecurityDefinitionsItem) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NamedSecurityDefinitionsItem.Unmarshal(m, b) -} -func (m *NamedSecurityDefinitionsItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NamedSecurityDefinitionsItem.Marshal(b, m, deterministic) +func (x *NamedSecurityDefinitionsItem) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NamedSecurityDefinitionsItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedSecurityDefinitionsItem.Merge(m, src) -} -func (m *NamedSecurityDefinitionsItem) XXX_Size() int { - return xxx_messageInfo_NamedSecurityDefinitionsItem.Size(m) -} -func (m *NamedSecurityDefinitionsItem) XXX_DiscardUnknown() { - xxx_messageInfo_NamedSecurityDefinitionsItem.DiscardUnknown(m) + +func (*NamedSecurityDefinitionsItem) ProtoMessage() {} + +func (x *NamedSecurityDefinitionsItem) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NamedSecurityDefinitionsItem proto.InternalMessageInfo +// Deprecated: Use NamedSecurityDefinitionsItem.ProtoReflect.Descriptor instead. +func (*NamedSecurityDefinitionsItem) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{27} +} -func (m *NamedSecurityDefinitionsItem) GetName() string { - if m != nil { - return m.Name +func (x *NamedSecurityDefinitionsItem) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *NamedSecurityDefinitionsItem) GetValue() *SecurityDefinitionsItem { - if m != nil { - return m.Value +func (x *NamedSecurityDefinitionsItem) GetValue() *SecurityDefinitionsItem { + if x != nil { + return x.Value } return nil } // Automatically-generated message used to represent maps of string as ordered (name,value) pairs. type NamedString struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Map key Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Mapped value - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *NamedString) Reset() { *m = NamedString{} } -func (m *NamedString) String() string { return proto.CompactTextString(m) } -func (*NamedString) ProtoMessage() {} -func (*NamedString) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{28} +func (x *NamedString) Reset() { + *x = NamedString{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *NamedString) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NamedString.Unmarshal(m, b) +func (x *NamedString) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NamedString) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NamedString.Marshal(b, m, deterministic) -} -func (m *NamedString) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedString.Merge(m, src) -} -func (m *NamedString) XXX_Size() int { - return xxx_messageInfo_NamedString.Size(m) -} -func (m *NamedString) XXX_DiscardUnknown() { - xxx_messageInfo_NamedString.DiscardUnknown(m) + +func (*NamedString) ProtoMessage() {} + +func (x *NamedString) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NamedString proto.InternalMessageInfo +// Deprecated: Use NamedString.ProtoReflect.Descriptor instead. +func (*NamedString) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{28} +} -func (m *NamedString) GetName() string { - if m != nil { - return m.Name +func (x *NamedString) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *NamedString) GetValue() string { - if m != nil { - return m.Value +func (x *NamedString) GetValue() string { + if x != nil { + return x.Value } return "" } // Automatically-generated message used to represent maps of StringArray as ordered (name,value) pairs. type NamedStringArray struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Map key Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Mapped value - Value *StringArray `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Value *StringArray `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *NamedStringArray) Reset() { *m = NamedStringArray{} } -func (m *NamedStringArray) String() string { return proto.CompactTextString(m) } -func (*NamedStringArray) ProtoMessage() {} -func (*NamedStringArray) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{29} +func (x *NamedStringArray) Reset() { + *x = NamedStringArray{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *NamedStringArray) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NamedStringArray.Unmarshal(m, b) -} -func (m *NamedStringArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NamedStringArray.Marshal(b, m, deterministic) -} -func (m *NamedStringArray) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedStringArray.Merge(m, src) -} -func (m *NamedStringArray) XXX_Size() int { - return xxx_messageInfo_NamedStringArray.Size(m) +func (x *NamedStringArray) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NamedStringArray) XXX_DiscardUnknown() { - xxx_messageInfo_NamedStringArray.DiscardUnknown(m) + +func (*NamedStringArray) ProtoMessage() {} + +func (x *NamedStringArray) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_NamedStringArray proto.InternalMessageInfo +// Deprecated: Use NamedStringArray.ProtoReflect.Descriptor instead. +func (*NamedStringArray) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{29} +} -func (m *NamedStringArray) GetName() string { - if m != nil { - return m.Name +func (x *NamedStringArray) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *NamedStringArray) GetValue() *StringArray { - if m != nil { - return m.Value +func (x *NamedStringArray) GetValue() *StringArray { + if x != nil { + return x.Value } return nil } type NonBodyParameter struct { - // Types that are valid to be assigned to Oneof: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Oneof: // *NonBodyParameter_HeaderParameterSubSchema // *NonBodyParameter_FormDataParameterSubSchema // *NonBodyParameter_QueryParameterSubSchema // *NonBodyParameter_PathParameterSubSchema - Oneof isNonBodyParameter_Oneof `protobuf_oneof:"oneof"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Oneof isNonBodyParameter_Oneof `protobuf_oneof:"oneof"` } -func (m *NonBodyParameter) Reset() { *m = NonBodyParameter{} } -func (m *NonBodyParameter) String() string { return proto.CompactTextString(m) } -func (*NonBodyParameter) ProtoMessage() {} -func (*NonBodyParameter) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{30} +func (x *NonBodyParameter) Reset() { + *x = NonBodyParameter{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *NonBodyParameter) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NonBodyParameter.Unmarshal(m, b) -} -func (m *NonBodyParameter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NonBodyParameter.Marshal(b, m, deterministic) -} -func (m *NonBodyParameter) XXX_Merge(src proto.Message) { - xxx_messageInfo_NonBodyParameter.Merge(m, src) -} -func (m *NonBodyParameter) XXX_Size() int { - return xxx_messageInfo_NonBodyParameter.Size(m) -} -func (m *NonBodyParameter) XXX_DiscardUnknown() { - xxx_messageInfo_NonBodyParameter.DiscardUnknown(m) +func (x *NonBodyParameter) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_NonBodyParameter proto.InternalMessageInfo +func (*NonBodyParameter) ProtoMessage() {} -type isNonBodyParameter_Oneof interface { - isNonBodyParameter_Oneof() +func (x *NonBodyParameter) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type NonBodyParameter_HeaderParameterSubSchema struct { - HeaderParameterSubSchema *HeaderParameterSubSchema `protobuf:"bytes,1,opt,name=header_parameter_sub_schema,json=headerParameterSubSchema,proto3,oneof"` +// Deprecated: Use NonBodyParameter.ProtoReflect.Descriptor instead. +func (*NonBodyParameter) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{30} } -type NonBodyParameter_FormDataParameterSubSchema struct { - FormDataParameterSubSchema *FormDataParameterSubSchema `protobuf:"bytes,2,opt,name=form_data_parameter_sub_schema,json=formDataParameterSubSchema,proto3,oneof"` -} - -type NonBodyParameter_QueryParameterSubSchema struct { - QueryParameterSubSchema *QueryParameterSubSchema `protobuf:"bytes,3,opt,name=query_parameter_sub_schema,json=queryParameterSubSchema,proto3,oneof"` -} - -type NonBodyParameter_PathParameterSubSchema struct { - PathParameterSubSchema *PathParameterSubSchema `protobuf:"bytes,4,opt,name=path_parameter_sub_schema,json=pathParameterSubSchema,proto3,oneof"` -} - -func (*NonBodyParameter_HeaderParameterSubSchema) isNonBodyParameter_Oneof() {} - -func (*NonBodyParameter_FormDataParameterSubSchema) isNonBodyParameter_Oneof() {} - -func (*NonBodyParameter_QueryParameterSubSchema) isNonBodyParameter_Oneof() {} - -func (*NonBodyParameter_PathParameterSubSchema) isNonBodyParameter_Oneof() {} - func (m *NonBodyParameter) GetOneof() isNonBodyParameter_Oneof { if m != nil { return m.Oneof @@ -2335,408 +2568,470 @@ func (m *NonBodyParameter) GetOneof() isNonBodyParameter_Oneof { return nil } -func (m *NonBodyParameter) GetHeaderParameterSubSchema() *HeaderParameterSubSchema { - if x, ok := m.GetOneof().(*NonBodyParameter_HeaderParameterSubSchema); ok { +func (x *NonBodyParameter) GetHeaderParameterSubSchema() *HeaderParameterSubSchema { + if x, ok := x.GetOneof().(*NonBodyParameter_HeaderParameterSubSchema); ok { return x.HeaderParameterSubSchema } return nil } -func (m *NonBodyParameter) GetFormDataParameterSubSchema() *FormDataParameterSubSchema { - if x, ok := m.GetOneof().(*NonBodyParameter_FormDataParameterSubSchema); ok { +func (x *NonBodyParameter) GetFormDataParameterSubSchema() *FormDataParameterSubSchema { + if x, ok := x.GetOneof().(*NonBodyParameter_FormDataParameterSubSchema); ok { return x.FormDataParameterSubSchema } return nil } -func (m *NonBodyParameter) GetQueryParameterSubSchema() *QueryParameterSubSchema { - if x, ok := m.GetOneof().(*NonBodyParameter_QueryParameterSubSchema); ok { +func (x *NonBodyParameter) GetQueryParameterSubSchema() *QueryParameterSubSchema { + if x, ok := x.GetOneof().(*NonBodyParameter_QueryParameterSubSchema); ok { return x.QueryParameterSubSchema } return nil } -func (m *NonBodyParameter) GetPathParameterSubSchema() *PathParameterSubSchema { - if x, ok := m.GetOneof().(*NonBodyParameter_PathParameterSubSchema); ok { +func (x *NonBodyParameter) GetPathParameterSubSchema() *PathParameterSubSchema { + if x, ok := x.GetOneof().(*NonBodyParameter_PathParameterSubSchema); ok { return x.PathParameterSubSchema } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*NonBodyParameter) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*NonBodyParameter_HeaderParameterSubSchema)(nil), - (*NonBodyParameter_FormDataParameterSubSchema)(nil), - (*NonBodyParameter_QueryParameterSubSchema)(nil), - (*NonBodyParameter_PathParameterSubSchema)(nil), - } +type isNonBodyParameter_Oneof interface { + isNonBodyParameter_Oneof() } -type Oauth2AccessCodeSecurity struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Flow string `protobuf:"bytes,2,opt,name=flow,proto3" json:"flow,omitempty"` - Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"` - AuthorizationUrl string `protobuf:"bytes,4,opt,name=authorization_url,json=authorizationUrl,proto3" json:"authorization_url,omitempty"` - TokenUrl string `protobuf:"bytes,5,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"` - Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,7,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Oauth2AccessCodeSecurity) Reset() { *m = Oauth2AccessCodeSecurity{} } -func (m *Oauth2AccessCodeSecurity) String() string { return proto.CompactTextString(m) } -func (*Oauth2AccessCodeSecurity) ProtoMessage() {} -func (*Oauth2AccessCodeSecurity) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{31} +type NonBodyParameter_HeaderParameterSubSchema struct { + HeaderParameterSubSchema *HeaderParameterSubSchema `protobuf:"bytes,1,opt,name=header_parameter_sub_schema,json=headerParameterSubSchema,proto3,oneof"` +} + +type NonBodyParameter_FormDataParameterSubSchema struct { + FormDataParameterSubSchema *FormDataParameterSubSchema `protobuf:"bytes,2,opt,name=form_data_parameter_sub_schema,json=formDataParameterSubSchema,proto3,oneof"` +} + +type NonBodyParameter_QueryParameterSubSchema struct { + QueryParameterSubSchema *QueryParameterSubSchema `protobuf:"bytes,3,opt,name=query_parameter_sub_schema,json=queryParameterSubSchema,proto3,oneof"` } -func (m *Oauth2AccessCodeSecurity) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Oauth2AccessCodeSecurity.Unmarshal(m, b) +type NonBodyParameter_PathParameterSubSchema struct { + PathParameterSubSchema *PathParameterSubSchema `protobuf:"bytes,4,opt,name=path_parameter_sub_schema,json=pathParameterSubSchema,proto3,oneof"` } -func (m *Oauth2AccessCodeSecurity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Oauth2AccessCodeSecurity.Marshal(b, m, deterministic) + +func (*NonBodyParameter_HeaderParameterSubSchema) isNonBodyParameter_Oneof() {} + +func (*NonBodyParameter_FormDataParameterSubSchema) isNonBodyParameter_Oneof() {} + +func (*NonBodyParameter_QueryParameterSubSchema) isNonBodyParameter_Oneof() {} + +func (*NonBodyParameter_PathParameterSubSchema) isNonBodyParameter_Oneof() {} + +type Oauth2AccessCodeSecurity struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Flow string `protobuf:"bytes,2,opt,name=flow,proto3" json:"flow,omitempty"` + Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"` + AuthorizationUrl string `protobuf:"bytes,4,opt,name=authorization_url,json=authorizationUrl,proto3" json:"authorization_url,omitempty"` + TokenUrl string `protobuf:"bytes,5,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"` + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,7,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *Oauth2AccessCodeSecurity) XXX_Merge(src proto.Message) { - xxx_messageInfo_Oauth2AccessCodeSecurity.Merge(m, src) + +func (x *Oauth2AccessCodeSecurity) Reset() { + *x = Oauth2AccessCodeSecurity{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Oauth2AccessCodeSecurity) XXX_Size() int { - return xxx_messageInfo_Oauth2AccessCodeSecurity.Size(m) + +func (x *Oauth2AccessCodeSecurity) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Oauth2AccessCodeSecurity) XXX_DiscardUnknown() { - xxx_messageInfo_Oauth2AccessCodeSecurity.DiscardUnknown(m) + +func (*Oauth2AccessCodeSecurity) ProtoMessage() {} + +func (x *Oauth2AccessCodeSecurity) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Oauth2AccessCodeSecurity proto.InternalMessageInfo +// Deprecated: Use Oauth2AccessCodeSecurity.ProtoReflect.Descriptor instead. +func (*Oauth2AccessCodeSecurity) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{31} +} -func (m *Oauth2AccessCodeSecurity) GetType() string { - if m != nil { - return m.Type +func (x *Oauth2AccessCodeSecurity) GetType() string { + if x != nil { + return x.Type } return "" } -func (m *Oauth2AccessCodeSecurity) GetFlow() string { - if m != nil { - return m.Flow +func (x *Oauth2AccessCodeSecurity) GetFlow() string { + if x != nil { + return x.Flow } return "" } -func (m *Oauth2AccessCodeSecurity) GetScopes() *Oauth2Scopes { - if m != nil { - return m.Scopes +func (x *Oauth2AccessCodeSecurity) GetScopes() *Oauth2Scopes { + if x != nil { + return x.Scopes } return nil } -func (m *Oauth2AccessCodeSecurity) GetAuthorizationUrl() string { - if m != nil { - return m.AuthorizationUrl +func (x *Oauth2AccessCodeSecurity) GetAuthorizationUrl() string { + if x != nil { + return x.AuthorizationUrl } return "" } -func (m *Oauth2AccessCodeSecurity) GetTokenUrl() string { - if m != nil { - return m.TokenUrl +func (x *Oauth2AccessCodeSecurity) GetTokenUrl() string { + if x != nil { + return x.TokenUrl } return "" } -func (m *Oauth2AccessCodeSecurity) GetDescription() string { - if m != nil { - return m.Description +func (x *Oauth2AccessCodeSecurity) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *Oauth2AccessCodeSecurity) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *Oauth2AccessCodeSecurity) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type Oauth2ApplicationSecurity struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Flow string `protobuf:"bytes,2,opt,name=flow,proto3" json:"flow,omitempty"` - Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"` - TokenUrl string `protobuf:"bytes,4,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"` - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Oauth2ApplicationSecurity) Reset() { *m = Oauth2ApplicationSecurity{} } -func (m *Oauth2ApplicationSecurity) String() string { return proto.CompactTextString(m) } -func (*Oauth2ApplicationSecurity) ProtoMessage() {} -func (*Oauth2ApplicationSecurity) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{32} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Oauth2ApplicationSecurity) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Oauth2ApplicationSecurity.Unmarshal(m, b) -} -func (m *Oauth2ApplicationSecurity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Oauth2ApplicationSecurity.Marshal(b, m, deterministic) + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Flow string `protobuf:"bytes,2,opt,name=flow,proto3" json:"flow,omitempty"` + Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"` + TokenUrl string `protobuf:"bytes,4,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *Oauth2ApplicationSecurity) XXX_Merge(src proto.Message) { - xxx_messageInfo_Oauth2ApplicationSecurity.Merge(m, src) + +func (x *Oauth2ApplicationSecurity) Reset() { + *x = Oauth2ApplicationSecurity{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Oauth2ApplicationSecurity) XXX_Size() int { - return xxx_messageInfo_Oauth2ApplicationSecurity.Size(m) + +func (x *Oauth2ApplicationSecurity) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Oauth2ApplicationSecurity) XXX_DiscardUnknown() { - xxx_messageInfo_Oauth2ApplicationSecurity.DiscardUnknown(m) + +func (*Oauth2ApplicationSecurity) ProtoMessage() {} + +func (x *Oauth2ApplicationSecurity) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Oauth2ApplicationSecurity proto.InternalMessageInfo +// Deprecated: Use Oauth2ApplicationSecurity.ProtoReflect.Descriptor instead. +func (*Oauth2ApplicationSecurity) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{32} +} -func (m *Oauth2ApplicationSecurity) GetType() string { - if m != nil { - return m.Type +func (x *Oauth2ApplicationSecurity) GetType() string { + if x != nil { + return x.Type } return "" } -func (m *Oauth2ApplicationSecurity) GetFlow() string { - if m != nil { - return m.Flow +func (x *Oauth2ApplicationSecurity) GetFlow() string { + if x != nil { + return x.Flow } return "" } -func (m *Oauth2ApplicationSecurity) GetScopes() *Oauth2Scopes { - if m != nil { - return m.Scopes +func (x *Oauth2ApplicationSecurity) GetScopes() *Oauth2Scopes { + if x != nil { + return x.Scopes } return nil } -func (m *Oauth2ApplicationSecurity) GetTokenUrl() string { - if m != nil { - return m.TokenUrl +func (x *Oauth2ApplicationSecurity) GetTokenUrl() string { + if x != nil { + return x.TokenUrl } return "" } -func (m *Oauth2ApplicationSecurity) GetDescription() string { - if m != nil { - return m.Description +func (x *Oauth2ApplicationSecurity) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *Oauth2ApplicationSecurity) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *Oauth2ApplicationSecurity) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type Oauth2ImplicitSecurity struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Flow string `protobuf:"bytes,2,opt,name=flow,proto3" json:"flow,omitempty"` - Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"` - AuthorizationUrl string `protobuf:"bytes,4,opt,name=authorization_url,json=authorizationUrl,proto3" json:"authorization_url,omitempty"` - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Oauth2ImplicitSecurity) Reset() { *m = Oauth2ImplicitSecurity{} } -func (m *Oauth2ImplicitSecurity) String() string { return proto.CompactTextString(m) } -func (*Oauth2ImplicitSecurity) ProtoMessage() {} -func (*Oauth2ImplicitSecurity) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{33} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Oauth2ImplicitSecurity) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Oauth2ImplicitSecurity.Unmarshal(m, b) + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Flow string `protobuf:"bytes,2,opt,name=flow,proto3" json:"flow,omitempty"` + Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"` + AuthorizationUrl string `protobuf:"bytes,4,opt,name=authorization_url,json=authorizationUrl,proto3" json:"authorization_url,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *Oauth2ImplicitSecurity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Oauth2ImplicitSecurity.Marshal(b, m, deterministic) -} -func (m *Oauth2ImplicitSecurity) XXX_Merge(src proto.Message) { - xxx_messageInfo_Oauth2ImplicitSecurity.Merge(m, src) + +func (x *Oauth2ImplicitSecurity) Reset() { + *x = Oauth2ImplicitSecurity{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Oauth2ImplicitSecurity) XXX_Size() int { - return xxx_messageInfo_Oauth2ImplicitSecurity.Size(m) + +func (x *Oauth2ImplicitSecurity) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Oauth2ImplicitSecurity) XXX_DiscardUnknown() { - xxx_messageInfo_Oauth2ImplicitSecurity.DiscardUnknown(m) + +func (*Oauth2ImplicitSecurity) ProtoMessage() {} + +func (x *Oauth2ImplicitSecurity) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Oauth2ImplicitSecurity proto.InternalMessageInfo +// Deprecated: Use Oauth2ImplicitSecurity.ProtoReflect.Descriptor instead. +func (*Oauth2ImplicitSecurity) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{33} +} -func (m *Oauth2ImplicitSecurity) GetType() string { - if m != nil { - return m.Type +func (x *Oauth2ImplicitSecurity) GetType() string { + if x != nil { + return x.Type } return "" } -func (m *Oauth2ImplicitSecurity) GetFlow() string { - if m != nil { - return m.Flow +func (x *Oauth2ImplicitSecurity) GetFlow() string { + if x != nil { + return x.Flow } return "" } -func (m *Oauth2ImplicitSecurity) GetScopes() *Oauth2Scopes { - if m != nil { - return m.Scopes +func (x *Oauth2ImplicitSecurity) GetScopes() *Oauth2Scopes { + if x != nil { + return x.Scopes } return nil } -func (m *Oauth2ImplicitSecurity) GetAuthorizationUrl() string { - if m != nil { - return m.AuthorizationUrl +func (x *Oauth2ImplicitSecurity) GetAuthorizationUrl() string { + if x != nil { + return x.AuthorizationUrl } return "" } -func (m *Oauth2ImplicitSecurity) GetDescription() string { - if m != nil { - return m.Description +func (x *Oauth2ImplicitSecurity) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *Oauth2ImplicitSecurity) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *Oauth2ImplicitSecurity) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type Oauth2PasswordSecurity struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Flow string `protobuf:"bytes,2,opt,name=flow,proto3" json:"flow,omitempty"` - Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"` - TokenUrl string `protobuf:"bytes,4,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"` - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Oauth2PasswordSecurity) Reset() { *m = Oauth2PasswordSecurity{} } -func (m *Oauth2PasswordSecurity) String() string { return proto.CompactTextString(m) } -func (*Oauth2PasswordSecurity) ProtoMessage() {} -func (*Oauth2PasswordSecurity) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{34} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Oauth2PasswordSecurity) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Oauth2PasswordSecurity.Unmarshal(m, b) -} -func (m *Oauth2PasswordSecurity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Oauth2PasswordSecurity.Marshal(b, m, deterministic) + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Flow string `protobuf:"bytes,2,opt,name=flow,proto3" json:"flow,omitempty"` + Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"` + TokenUrl string `protobuf:"bytes,4,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *Oauth2PasswordSecurity) XXX_Merge(src proto.Message) { - xxx_messageInfo_Oauth2PasswordSecurity.Merge(m, src) + +func (x *Oauth2PasswordSecurity) Reset() { + *x = Oauth2PasswordSecurity{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Oauth2PasswordSecurity) XXX_Size() int { - return xxx_messageInfo_Oauth2PasswordSecurity.Size(m) + +func (x *Oauth2PasswordSecurity) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Oauth2PasswordSecurity) XXX_DiscardUnknown() { - xxx_messageInfo_Oauth2PasswordSecurity.DiscardUnknown(m) + +func (*Oauth2PasswordSecurity) ProtoMessage() {} + +func (x *Oauth2PasswordSecurity) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Oauth2PasswordSecurity proto.InternalMessageInfo +// Deprecated: Use Oauth2PasswordSecurity.ProtoReflect.Descriptor instead. +func (*Oauth2PasswordSecurity) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{34} +} -func (m *Oauth2PasswordSecurity) GetType() string { - if m != nil { - return m.Type +func (x *Oauth2PasswordSecurity) GetType() string { + if x != nil { + return x.Type } return "" } -func (m *Oauth2PasswordSecurity) GetFlow() string { - if m != nil { - return m.Flow +func (x *Oauth2PasswordSecurity) GetFlow() string { + if x != nil { + return x.Flow } return "" } -func (m *Oauth2PasswordSecurity) GetScopes() *Oauth2Scopes { - if m != nil { - return m.Scopes +func (x *Oauth2PasswordSecurity) GetScopes() *Oauth2Scopes { + if x != nil { + return x.Scopes } return nil } -func (m *Oauth2PasswordSecurity) GetTokenUrl() string { - if m != nil { - return m.TokenUrl +func (x *Oauth2PasswordSecurity) GetTokenUrl() string { + if x != nil { + return x.TokenUrl } return "" } -func (m *Oauth2PasswordSecurity) GetDescription() string { - if m != nil { - return m.Description +func (x *Oauth2PasswordSecurity) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *Oauth2PasswordSecurity) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *Oauth2PasswordSecurity) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type Oauth2Scopes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + AdditionalProperties []*NamedString `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } -func (m *Oauth2Scopes) Reset() { *m = Oauth2Scopes{} } -func (m *Oauth2Scopes) String() string { return proto.CompactTextString(m) } -func (*Oauth2Scopes) ProtoMessage() {} -func (*Oauth2Scopes) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{35} +func (x *Oauth2Scopes) Reset() { + *x = Oauth2Scopes{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Oauth2Scopes) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Oauth2Scopes.Unmarshal(m, b) -} -func (m *Oauth2Scopes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Oauth2Scopes.Marshal(b, m, deterministic) -} -func (m *Oauth2Scopes) XXX_Merge(src proto.Message) { - xxx_messageInfo_Oauth2Scopes.Merge(m, src) -} -func (m *Oauth2Scopes) XXX_Size() int { - return xxx_messageInfo_Oauth2Scopes.Size(m) +func (x *Oauth2Scopes) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Oauth2Scopes) XXX_DiscardUnknown() { - xxx_messageInfo_Oauth2Scopes.DiscardUnknown(m) + +func (*Oauth2Scopes) ProtoMessage() {} + +func (x *Oauth2Scopes) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Oauth2Scopes proto.InternalMessageInfo +// Deprecated: Use Oauth2Scopes.ProtoReflect.Descriptor instead. +func (*Oauth2Scopes) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{35} +} -func (m *Oauth2Scopes) GetAdditionalProperties() []*NamedString { - if m != nil { - return m.AdditionalProperties +func (x *Oauth2Scopes) GetAdditionalProperties() []*NamedString { + if x != nil { + return x.AdditionalProperties } return nil } type Operation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` // A brief summary of the operation. Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"` @@ -2753,182 +3048,178 @@ type Operation struct { Parameters []*ParametersItem `protobuf:"bytes,8,rep,name=parameters,proto3" json:"parameters,omitempty"` Responses *Responses `protobuf:"bytes,9,opt,name=responses,proto3" json:"responses,omitempty"` // The transfer protocol of the API. - Schemes []string `protobuf:"bytes,10,rep,name=schemes,proto3" json:"schemes,omitempty"` - Deprecated bool `protobuf:"varint,11,opt,name=deprecated,proto3" json:"deprecated,omitempty"` - Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,13,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Operation) Reset() { *m = Operation{} } -func (m *Operation) String() string { return proto.CompactTextString(m) } -func (*Operation) ProtoMessage() {} -func (*Operation) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{36} + Schemes []string `protobuf:"bytes,10,rep,name=schemes,proto3" json:"schemes,omitempty"` + Deprecated bool `protobuf:"varint,11,opt,name=deprecated,proto3" json:"deprecated,omitempty"` + Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,13,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *Operation) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Operation.Unmarshal(m, b) -} -func (m *Operation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Operation.Marshal(b, m, deterministic) -} -func (m *Operation) XXX_Merge(src proto.Message) { - xxx_messageInfo_Operation.Merge(m, src) +func (x *Operation) Reset() { + *x = Operation{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Operation) XXX_Size() int { - return xxx_messageInfo_Operation.Size(m) + +func (x *Operation) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Operation) XXX_DiscardUnknown() { - xxx_messageInfo_Operation.DiscardUnknown(m) + +func (*Operation) ProtoMessage() {} + +func (x *Operation) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Operation proto.InternalMessageInfo +// Deprecated: Use Operation.ProtoReflect.Descriptor instead. +func (*Operation) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{36} +} -func (m *Operation) GetTags() []string { - if m != nil { - return m.Tags +func (x *Operation) GetTags() []string { + if x != nil { + return x.Tags } return nil } -func (m *Operation) GetSummary() string { - if m != nil { - return m.Summary +func (x *Operation) GetSummary() string { + if x != nil { + return x.Summary } return "" } -func (m *Operation) GetDescription() string { - if m != nil { - return m.Description +func (x *Operation) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *Operation) GetExternalDocs() *ExternalDocs { - if m != nil { - return m.ExternalDocs +func (x *Operation) GetExternalDocs() *ExternalDocs { + if x != nil { + return x.ExternalDocs } return nil } -func (m *Operation) GetOperationId() string { - if m != nil { - return m.OperationId +func (x *Operation) GetOperationId() string { + if x != nil { + return x.OperationId } return "" } -func (m *Operation) GetProduces() []string { - if m != nil { - return m.Produces +func (x *Operation) GetProduces() []string { + if x != nil { + return x.Produces } return nil } -func (m *Operation) GetConsumes() []string { - if m != nil { - return m.Consumes +func (x *Operation) GetConsumes() []string { + if x != nil { + return x.Consumes } return nil } -func (m *Operation) GetParameters() []*ParametersItem { - if m != nil { - return m.Parameters +func (x *Operation) GetParameters() []*ParametersItem { + if x != nil { + return x.Parameters } return nil } -func (m *Operation) GetResponses() *Responses { - if m != nil { - return m.Responses +func (x *Operation) GetResponses() *Responses { + if x != nil { + return x.Responses } return nil } -func (m *Operation) GetSchemes() []string { - if m != nil { - return m.Schemes +func (x *Operation) GetSchemes() []string { + if x != nil { + return x.Schemes } return nil } -func (m *Operation) GetDeprecated() bool { - if m != nil { - return m.Deprecated +func (x *Operation) GetDeprecated() bool { + if x != nil { + return x.Deprecated } return false } -func (m *Operation) GetSecurity() []*SecurityRequirement { - if m != nil { - return m.Security +func (x *Operation) GetSecurity() []*SecurityRequirement { + if x != nil { + return x.Security } return nil } -func (m *Operation) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *Operation) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type Parameter struct { - // Types that are valid to be assigned to Oneof: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Oneof: // *Parameter_BodyParameter // *Parameter_NonBodyParameter - Oneof isParameter_Oneof `protobuf_oneof:"oneof"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Oneof isParameter_Oneof `protobuf_oneof:"oneof"` } -func (m *Parameter) Reset() { *m = Parameter{} } -func (m *Parameter) String() string { return proto.CompactTextString(m) } -func (*Parameter) ProtoMessage() {} -func (*Parameter) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{37} +func (x *Parameter) Reset() { + *x = Parameter{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Parameter) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Parameter.Unmarshal(m, b) -} -func (m *Parameter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Parameter.Marshal(b, m, deterministic) -} -func (m *Parameter) XXX_Merge(src proto.Message) { - xxx_messageInfo_Parameter.Merge(m, src) -} -func (m *Parameter) XXX_Size() int { - return xxx_messageInfo_Parameter.Size(m) +func (x *Parameter) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Parameter) XXX_DiscardUnknown() { - xxx_messageInfo_Parameter.DiscardUnknown(m) -} - -var xxx_messageInfo_Parameter proto.InternalMessageInfo -type isParameter_Oneof interface { - isParameter_Oneof() -} +func (*Parameter) ProtoMessage() {} -type Parameter_BodyParameter struct { - BodyParameter *BodyParameter `protobuf:"bytes,1,opt,name=body_parameter,json=bodyParameter,proto3,oneof"` +func (x *Parameter) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type Parameter_NonBodyParameter struct { - NonBodyParameter *NonBodyParameter `protobuf:"bytes,2,opt,name=non_body_parameter,json=nonBodyParameter,proto3,oneof"` +// Deprecated: Use Parameter.ProtoReflect.Descriptor instead. +func (*Parameter) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{37} } -func (*Parameter_BodyParameter) isParameter_Oneof() {} - -func (*Parameter_NonBodyParameter) isParameter_Oneof() {} - func (m *Parameter) GetOneof() isParameter_Oneof { if m != nil { return m.Oneof @@ -2936,119 +3227,127 @@ func (m *Parameter) GetOneof() isParameter_Oneof { return nil } -func (m *Parameter) GetBodyParameter() *BodyParameter { - if x, ok := m.GetOneof().(*Parameter_BodyParameter); ok { +func (x *Parameter) GetBodyParameter() *BodyParameter { + if x, ok := x.GetOneof().(*Parameter_BodyParameter); ok { return x.BodyParameter } return nil } -func (m *Parameter) GetNonBodyParameter() *NonBodyParameter { - if x, ok := m.GetOneof().(*Parameter_NonBodyParameter); ok { +func (x *Parameter) GetNonBodyParameter() *NonBodyParameter { + if x, ok := x.GetOneof().(*Parameter_NonBodyParameter); ok { return x.NonBodyParameter } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Parameter) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Parameter_BodyParameter)(nil), - (*Parameter_NonBodyParameter)(nil), - } +type isParameter_Oneof interface { + isParameter_Oneof() +} + +type Parameter_BodyParameter struct { + BodyParameter *BodyParameter `protobuf:"bytes,1,opt,name=body_parameter,json=bodyParameter,proto3,oneof"` } +type Parameter_NonBodyParameter struct { + NonBodyParameter *NonBodyParameter `protobuf:"bytes,2,opt,name=non_body_parameter,json=nonBodyParameter,proto3,oneof"` +} + +func (*Parameter_BodyParameter) isParameter_Oneof() {} + +func (*Parameter_NonBodyParameter) isParameter_Oneof() {} + // One or more JSON representations for parameters type ParameterDefinitions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + AdditionalProperties []*NamedParameter `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } -func (m *ParameterDefinitions) Reset() { *m = ParameterDefinitions{} } -func (m *ParameterDefinitions) String() string { return proto.CompactTextString(m) } -func (*ParameterDefinitions) ProtoMessage() {} -func (*ParameterDefinitions) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{38} +func (x *ParameterDefinitions) Reset() { + *x = ParameterDefinitions{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ParameterDefinitions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ParameterDefinitions.Unmarshal(m, b) -} -func (m *ParameterDefinitions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ParameterDefinitions.Marshal(b, m, deterministic) +func (x *ParameterDefinitions) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ParameterDefinitions) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParameterDefinitions.Merge(m, src) -} -func (m *ParameterDefinitions) XXX_Size() int { - return xxx_messageInfo_ParameterDefinitions.Size(m) -} -func (m *ParameterDefinitions) XXX_DiscardUnknown() { - xxx_messageInfo_ParameterDefinitions.DiscardUnknown(m) + +func (*ParameterDefinitions) ProtoMessage() {} + +func (x *ParameterDefinitions) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ParameterDefinitions proto.InternalMessageInfo +// Deprecated: Use ParameterDefinitions.ProtoReflect.Descriptor instead. +func (*ParameterDefinitions) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{38} +} -func (m *ParameterDefinitions) GetAdditionalProperties() []*NamedParameter { - if m != nil { - return m.AdditionalProperties +func (x *ParameterDefinitions) GetAdditionalProperties() []*NamedParameter { + if x != nil { + return x.AdditionalProperties } return nil } type ParametersItem struct { - // Types that are valid to be assigned to Oneof: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Oneof: // *ParametersItem_Parameter // *ParametersItem_JsonReference - Oneof isParametersItem_Oneof `protobuf_oneof:"oneof"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Oneof isParametersItem_Oneof `protobuf_oneof:"oneof"` } -func (m *ParametersItem) Reset() { *m = ParametersItem{} } -func (m *ParametersItem) String() string { return proto.CompactTextString(m) } -func (*ParametersItem) ProtoMessage() {} -func (*ParametersItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{39} +func (x *ParametersItem) Reset() { + *x = ParametersItem{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ParametersItem) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ParametersItem.Unmarshal(m, b) -} -func (m *ParametersItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ParametersItem.Marshal(b, m, deterministic) +func (x *ParametersItem) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ParametersItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParametersItem.Merge(m, src) -} -func (m *ParametersItem) XXX_Size() int { - return xxx_messageInfo_ParametersItem.Size(m) -} -func (m *ParametersItem) XXX_DiscardUnknown() { - xxx_messageInfo_ParametersItem.DiscardUnknown(m) -} - -var xxx_messageInfo_ParametersItem proto.InternalMessageInfo -type isParametersItem_Oneof interface { - isParametersItem_Oneof() -} +func (*ParametersItem) ProtoMessage() {} -type ParametersItem_Parameter struct { - Parameter *Parameter `protobuf:"bytes,1,opt,name=parameter,proto3,oneof"` +func (x *ParametersItem) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type ParametersItem_JsonReference struct { - JsonReference *JsonReference `protobuf:"bytes,2,opt,name=json_reference,json=jsonReference,proto3,oneof"` +// Deprecated: Use ParametersItem.ProtoReflect.Descriptor instead. +func (*ParametersItem) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{39} } -func (*ParametersItem_Parameter) isParametersItem_Oneof() {} - -func (*ParametersItem_JsonReference) isParametersItem_Oneof() {} - func (m *ParametersItem) GetOneof() isParametersItem_Oneof { if m != nil { return m.Oneof @@ -3056,29 +3355,41 @@ func (m *ParametersItem) GetOneof() isParametersItem_Oneof { return nil } -func (m *ParametersItem) GetParameter() *Parameter { - if x, ok := m.GetOneof().(*ParametersItem_Parameter); ok { +func (x *ParametersItem) GetParameter() *Parameter { + if x, ok := x.GetOneof().(*ParametersItem_Parameter); ok { return x.Parameter } return nil } -func (m *ParametersItem) GetJsonReference() *JsonReference { - if x, ok := m.GetOneof().(*ParametersItem_JsonReference); ok { +func (x *ParametersItem) GetJsonReference() *JsonReference { + if x, ok := x.GetOneof().(*ParametersItem_JsonReference); ok { return x.JsonReference } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*ParametersItem) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*ParametersItem_Parameter)(nil), - (*ParametersItem_JsonReference)(nil), - } +type isParametersItem_Oneof interface { + isParametersItem_Oneof() +} + +type ParametersItem_Parameter struct { + Parameter *Parameter `protobuf:"bytes,1,opt,name=parameter,proto3,oneof"` +} + +type ParametersItem_JsonReference struct { + JsonReference *JsonReference `protobuf:"bytes,2,opt,name=json_reference,json=jsonReference,proto3,oneof"` } +func (*ParametersItem_Parameter) isParametersItem_Oneof() {} + +func (*ParametersItem_JsonReference) isParametersItem_Oneof() {} + type PathItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref,proto3" json:"_ref,omitempty"` Get *Operation `protobuf:"bytes,2,opt,name=get,proto3" json:"get,omitempty"` Put *Operation `protobuf:"bytes,3,opt,name=put,proto3" json:"put,omitempty"` @@ -3088,109 +3399,117 @@ type PathItem struct { Head *Operation `protobuf:"bytes,7,opt,name=head,proto3" json:"head,omitempty"` Patch *Operation `protobuf:"bytes,8,opt,name=patch,proto3" json:"patch,omitempty"` // The parameters needed to send a valid API call. - Parameters []*ParametersItem `protobuf:"bytes,9,rep,name=parameters,proto3" json:"parameters,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,10,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Parameters []*ParametersItem `protobuf:"bytes,9,rep,name=parameters,proto3" json:"parameters,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,10,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *PathItem) Reset() { *m = PathItem{} } -func (m *PathItem) String() string { return proto.CompactTextString(m) } -func (*PathItem) ProtoMessage() {} -func (*PathItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{40} +func (x *PathItem) Reset() { + *x = PathItem{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PathItem) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PathItem.Unmarshal(m, b) -} -func (m *PathItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PathItem.Marshal(b, m, deterministic) -} -func (m *PathItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_PathItem.Merge(m, src) -} -func (m *PathItem) XXX_Size() int { - return xxx_messageInfo_PathItem.Size(m) +func (x *PathItem) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *PathItem) XXX_DiscardUnknown() { - xxx_messageInfo_PathItem.DiscardUnknown(m) + +func (*PathItem) ProtoMessage() {} + +func (x *PathItem) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_PathItem proto.InternalMessageInfo +// Deprecated: Use PathItem.ProtoReflect.Descriptor instead. +func (*PathItem) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{40} +} -func (m *PathItem) GetXRef() string { - if m != nil { - return m.XRef +func (x *PathItem) GetXRef() string { + if x != nil { + return x.XRef } return "" } -func (m *PathItem) GetGet() *Operation { - if m != nil { - return m.Get +func (x *PathItem) GetGet() *Operation { + if x != nil { + return x.Get } return nil } -func (m *PathItem) GetPut() *Operation { - if m != nil { - return m.Put +func (x *PathItem) GetPut() *Operation { + if x != nil { + return x.Put } return nil } -func (m *PathItem) GetPost() *Operation { - if m != nil { - return m.Post +func (x *PathItem) GetPost() *Operation { + if x != nil { + return x.Post } return nil } -func (m *PathItem) GetDelete() *Operation { - if m != nil { - return m.Delete +func (x *PathItem) GetDelete() *Operation { + if x != nil { + return x.Delete } return nil } -func (m *PathItem) GetOptions() *Operation { - if m != nil { - return m.Options +func (x *PathItem) GetOptions() *Operation { + if x != nil { + return x.Options } return nil } -func (m *PathItem) GetHead() *Operation { - if m != nil { - return m.Head +func (x *PathItem) GetHead() *Operation { + if x != nil { + return x.Head } return nil } -func (m *PathItem) GetPatch() *Operation { - if m != nil { - return m.Patch +func (x *PathItem) GetPatch() *Operation { + if x != nil { + return x.Patch } return nil } -func (m *PathItem) GetParameters() []*ParametersItem { - if m != nil { - return m.Parameters +func (x *PathItem) GetParameters() []*ParametersItem { + if x != nil { + return x.Parameters } return nil } -func (m *PathItem) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *PathItem) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type PathParameterSubSchema struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Determines whether or not this parameter is required or optional. Required bool `protobuf:"varint,1,opt,name=required,proto3" json:"required,omitempty"` // Determines the location of the parameter. @@ -3198,472 +3517,504 @@ type PathParameterSubSchema struct { // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // The name of the parameter. - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` - Format string `protobuf:"bytes,6,opt,name=format,proto3" json:"format,omitempty"` - Items *PrimitivesItems `protobuf:"bytes,7,opt,name=items,proto3" json:"items,omitempty"` - CollectionFormat string `protobuf:"bytes,8,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"` - Default *Any `protobuf:"bytes,9,opt,name=default,proto3" json:"default,omitempty"` - Maximum float64 `protobuf:"fixed64,10,opt,name=maximum,proto3" json:"maximum,omitempty"` - ExclusiveMaximum bool `protobuf:"varint,11,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` - Minimum float64 `protobuf:"fixed64,12,opt,name=minimum,proto3" json:"minimum,omitempty"` - ExclusiveMinimum bool `protobuf:"varint,13,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` - MaxLength int64 `protobuf:"varint,14,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` - MinLength int64 `protobuf:"varint,15,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` - Pattern string `protobuf:"bytes,16,opt,name=pattern,proto3" json:"pattern,omitempty"` - MaxItems int64 `protobuf:"varint,17,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` - MinItems int64 `protobuf:"varint,18,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` - UniqueItems bool `protobuf:"varint,19,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` - Enum []*Any `protobuf:"bytes,20,rep,name=enum,proto3" json:"enum,omitempty"` - MultipleOf float64 `protobuf:"fixed64,21,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,22,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PathParameterSubSchema) Reset() { *m = PathParameterSubSchema{} } -func (m *PathParameterSubSchema) String() string { return proto.CompactTextString(m) } -func (*PathParameterSubSchema) ProtoMessage() {} + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` + Format string `protobuf:"bytes,6,opt,name=format,proto3" json:"format,omitempty"` + Items *PrimitivesItems `protobuf:"bytes,7,opt,name=items,proto3" json:"items,omitempty"` + CollectionFormat string `protobuf:"bytes,8,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"` + Default *Any `protobuf:"bytes,9,opt,name=default,proto3" json:"default,omitempty"` + Maximum float64 `protobuf:"fixed64,10,opt,name=maximum,proto3" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,11,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` + Minimum float64 `protobuf:"fixed64,12,opt,name=minimum,proto3" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,13,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` + MaxLength int64 `protobuf:"varint,14,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` + MinLength int64 `protobuf:"varint,15,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,16,opt,name=pattern,proto3" json:"pattern,omitempty"` + MaxItems int64 `protobuf:"varint,17,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` + MinItems int64 `protobuf:"varint,18,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,19,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` + Enum []*Any `protobuf:"bytes,20,rep,name=enum,proto3" json:"enum,omitempty"` + MultipleOf float64 `protobuf:"fixed64,21,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,22,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` +} + +func (x *PathParameterSubSchema) Reset() { + *x = PathParameterSubSchema{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PathParameterSubSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PathParameterSubSchema) ProtoMessage() {} + +func (x *PathParameterSubSchema) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PathParameterSubSchema.ProtoReflect.Descriptor instead. func (*PathParameterSubSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{41} + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{41} } -func (m *PathParameterSubSchema) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PathParameterSubSchema.Unmarshal(m, b) -} -func (m *PathParameterSubSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PathParameterSubSchema.Marshal(b, m, deterministic) -} -func (m *PathParameterSubSchema) XXX_Merge(src proto.Message) { - xxx_messageInfo_PathParameterSubSchema.Merge(m, src) -} -func (m *PathParameterSubSchema) XXX_Size() int { - return xxx_messageInfo_PathParameterSubSchema.Size(m) -} -func (m *PathParameterSubSchema) XXX_DiscardUnknown() { - xxx_messageInfo_PathParameterSubSchema.DiscardUnknown(m) -} - -var xxx_messageInfo_PathParameterSubSchema proto.InternalMessageInfo - -func (m *PathParameterSubSchema) GetRequired() bool { - if m != nil { - return m.Required +func (x *PathParameterSubSchema) GetRequired() bool { + if x != nil { + return x.Required } return false } -func (m *PathParameterSubSchema) GetIn() string { - if m != nil { - return m.In +func (x *PathParameterSubSchema) GetIn() string { + if x != nil { + return x.In } return "" } -func (m *PathParameterSubSchema) GetDescription() string { - if m != nil { - return m.Description +func (x *PathParameterSubSchema) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *PathParameterSubSchema) GetName() string { - if m != nil { - return m.Name +func (x *PathParameterSubSchema) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *PathParameterSubSchema) GetType() string { - if m != nil { - return m.Type +func (x *PathParameterSubSchema) GetType() string { + if x != nil { + return x.Type } return "" } -func (m *PathParameterSubSchema) GetFormat() string { - if m != nil { - return m.Format +func (x *PathParameterSubSchema) GetFormat() string { + if x != nil { + return x.Format } return "" } -func (m *PathParameterSubSchema) GetItems() *PrimitivesItems { - if m != nil { - return m.Items +func (x *PathParameterSubSchema) GetItems() *PrimitivesItems { + if x != nil { + return x.Items } return nil } -func (m *PathParameterSubSchema) GetCollectionFormat() string { - if m != nil { - return m.CollectionFormat +func (x *PathParameterSubSchema) GetCollectionFormat() string { + if x != nil { + return x.CollectionFormat } return "" } -func (m *PathParameterSubSchema) GetDefault() *Any { - if m != nil { - return m.Default +func (x *PathParameterSubSchema) GetDefault() *Any { + if x != nil { + return x.Default } return nil } -func (m *PathParameterSubSchema) GetMaximum() float64 { - if m != nil { - return m.Maximum +func (x *PathParameterSubSchema) GetMaximum() float64 { + if x != nil { + return x.Maximum } return 0 } -func (m *PathParameterSubSchema) GetExclusiveMaximum() bool { - if m != nil { - return m.ExclusiveMaximum +func (x *PathParameterSubSchema) GetExclusiveMaximum() bool { + if x != nil { + return x.ExclusiveMaximum } return false } -func (m *PathParameterSubSchema) GetMinimum() float64 { - if m != nil { - return m.Minimum +func (x *PathParameterSubSchema) GetMinimum() float64 { + if x != nil { + return x.Minimum } return 0 } -func (m *PathParameterSubSchema) GetExclusiveMinimum() bool { - if m != nil { - return m.ExclusiveMinimum +func (x *PathParameterSubSchema) GetExclusiveMinimum() bool { + if x != nil { + return x.ExclusiveMinimum } return false } -func (m *PathParameterSubSchema) GetMaxLength() int64 { - if m != nil { - return m.MaxLength +func (x *PathParameterSubSchema) GetMaxLength() int64 { + if x != nil { + return x.MaxLength } return 0 } -func (m *PathParameterSubSchema) GetMinLength() int64 { - if m != nil { - return m.MinLength +func (x *PathParameterSubSchema) GetMinLength() int64 { + if x != nil { + return x.MinLength } return 0 } -func (m *PathParameterSubSchema) GetPattern() string { - if m != nil { - return m.Pattern +func (x *PathParameterSubSchema) GetPattern() string { + if x != nil { + return x.Pattern } return "" } -func (m *PathParameterSubSchema) GetMaxItems() int64 { - if m != nil { - return m.MaxItems +func (x *PathParameterSubSchema) GetMaxItems() int64 { + if x != nil { + return x.MaxItems } return 0 } -func (m *PathParameterSubSchema) GetMinItems() int64 { - if m != nil { - return m.MinItems +func (x *PathParameterSubSchema) GetMinItems() int64 { + if x != nil { + return x.MinItems } return 0 } -func (m *PathParameterSubSchema) GetUniqueItems() bool { - if m != nil { - return m.UniqueItems +func (x *PathParameterSubSchema) GetUniqueItems() bool { + if x != nil { + return x.UniqueItems } return false } -func (m *PathParameterSubSchema) GetEnum() []*Any { - if m != nil { - return m.Enum +func (x *PathParameterSubSchema) GetEnum() []*Any { + if x != nil { + return x.Enum } return nil } -func (m *PathParameterSubSchema) GetMultipleOf() float64 { - if m != nil { - return m.MultipleOf +func (x *PathParameterSubSchema) GetMultipleOf() float64 { + if x != nil { + return x.MultipleOf } return 0 } -func (m *PathParameterSubSchema) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *PathParameterSubSchema) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } // Relative paths to the individual endpoints. They must be relative to the 'basePath'. type Paths struct { - VendorExtension []*NamedAny `protobuf:"bytes,1,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - Path []*NamedPathItem `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Paths) Reset() { *m = Paths{} } -func (m *Paths) String() string { return proto.CompactTextString(m) } -func (*Paths) ProtoMessage() {} -func (*Paths) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{42} + VendorExtension []*NamedAny `protobuf:"bytes,1,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` + Path []*NamedPathItem `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` } -func (m *Paths) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Paths.Unmarshal(m, b) -} -func (m *Paths) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Paths.Marshal(b, m, deterministic) -} -func (m *Paths) XXX_Merge(src proto.Message) { - xxx_messageInfo_Paths.Merge(m, src) +func (x *Paths) Reset() { + *x = Paths{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Paths) XXX_Size() int { - return xxx_messageInfo_Paths.Size(m) + +func (x *Paths) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Paths) XXX_DiscardUnknown() { - xxx_messageInfo_Paths.DiscardUnknown(m) + +func (*Paths) ProtoMessage() {} + +func (x *Paths) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[42] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Paths proto.InternalMessageInfo +// Deprecated: Use Paths.ProtoReflect.Descriptor instead. +func (*Paths) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{42} +} -func (m *Paths) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *Paths) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } -func (m *Paths) GetPath() []*NamedPathItem { - if m != nil { - return m.Path +func (x *Paths) GetPath() []*NamedPathItem { + if x != nil { + return x.Path } return nil } type PrimitivesItems struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"` - Items *PrimitivesItems `protobuf:"bytes,3,opt,name=items,proto3" json:"items,omitempty"` - CollectionFormat string `protobuf:"bytes,4,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"` - Default *Any `protobuf:"bytes,5,opt,name=default,proto3" json:"default,omitempty"` - Maximum float64 `protobuf:"fixed64,6,opt,name=maximum,proto3" json:"maximum,omitempty"` - ExclusiveMaximum bool `protobuf:"varint,7,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` - Minimum float64 `protobuf:"fixed64,8,opt,name=minimum,proto3" json:"minimum,omitempty"` - ExclusiveMinimum bool `protobuf:"varint,9,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` - MaxLength int64 `protobuf:"varint,10,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` - MinLength int64 `protobuf:"varint,11,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` - Pattern string `protobuf:"bytes,12,opt,name=pattern,proto3" json:"pattern,omitempty"` - MaxItems int64 `protobuf:"varint,13,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` - MinItems int64 `protobuf:"varint,14,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` - UniqueItems bool `protobuf:"varint,15,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` - Enum []*Any `protobuf:"bytes,16,rep,name=enum,proto3" json:"enum,omitempty"` - MultipleOf float64 `protobuf:"fixed64,17,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,18,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PrimitivesItems) Reset() { *m = PrimitivesItems{} } -func (m *PrimitivesItems) String() string { return proto.CompactTextString(m) } -func (*PrimitivesItems) ProtoMessage() {} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"` + Items *PrimitivesItems `protobuf:"bytes,3,opt,name=items,proto3" json:"items,omitempty"` + CollectionFormat string `protobuf:"bytes,4,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"` + Default *Any `protobuf:"bytes,5,opt,name=default,proto3" json:"default,omitempty"` + Maximum float64 `protobuf:"fixed64,6,opt,name=maximum,proto3" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,7,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` + Minimum float64 `protobuf:"fixed64,8,opt,name=minimum,proto3" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,9,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` + MaxLength int64 `protobuf:"varint,10,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` + MinLength int64 `protobuf:"varint,11,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,12,opt,name=pattern,proto3" json:"pattern,omitempty"` + MaxItems int64 `protobuf:"varint,13,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` + MinItems int64 `protobuf:"varint,14,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,15,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` + Enum []*Any `protobuf:"bytes,16,rep,name=enum,proto3" json:"enum,omitempty"` + MultipleOf float64 `protobuf:"fixed64,17,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,18,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` +} + +func (x *PrimitivesItems) Reset() { + *x = PrimitivesItems{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrimitivesItems) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrimitivesItems) ProtoMessage() {} + +func (x *PrimitivesItems) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[43] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrimitivesItems.ProtoReflect.Descriptor instead. func (*PrimitivesItems) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{43} -} - -func (m *PrimitivesItems) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PrimitivesItems.Unmarshal(m, b) -} -func (m *PrimitivesItems) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PrimitivesItems.Marshal(b, m, deterministic) -} -func (m *PrimitivesItems) XXX_Merge(src proto.Message) { - xxx_messageInfo_PrimitivesItems.Merge(m, src) -} -func (m *PrimitivesItems) XXX_Size() int { - return xxx_messageInfo_PrimitivesItems.Size(m) -} -func (m *PrimitivesItems) XXX_DiscardUnknown() { - xxx_messageInfo_PrimitivesItems.DiscardUnknown(m) + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{43} } -var xxx_messageInfo_PrimitivesItems proto.InternalMessageInfo - -func (m *PrimitivesItems) GetType() string { - if m != nil { - return m.Type +func (x *PrimitivesItems) GetType() string { + if x != nil { + return x.Type } return "" } -func (m *PrimitivesItems) GetFormat() string { - if m != nil { - return m.Format +func (x *PrimitivesItems) GetFormat() string { + if x != nil { + return x.Format } return "" } -func (m *PrimitivesItems) GetItems() *PrimitivesItems { - if m != nil { - return m.Items +func (x *PrimitivesItems) GetItems() *PrimitivesItems { + if x != nil { + return x.Items } return nil } -func (m *PrimitivesItems) GetCollectionFormat() string { - if m != nil { - return m.CollectionFormat +func (x *PrimitivesItems) GetCollectionFormat() string { + if x != nil { + return x.CollectionFormat } return "" } -func (m *PrimitivesItems) GetDefault() *Any { - if m != nil { - return m.Default +func (x *PrimitivesItems) GetDefault() *Any { + if x != nil { + return x.Default } return nil } -func (m *PrimitivesItems) GetMaximum() float64 { - if m != nil { - return m.Maximum +func (x *PrimitivesItems) GetMaximum() float64 { + if x != nil { + return x.Maximum } return 0 } -func (m *PrimitivesItems) GetExclusiveMaximum() bool { - if m != nil { - return m.ExclusiveMaximum +func (x *PrimitivesItems) GetExclusiveMaximum() bool { + if x != nil { + return x.ExclusiveMaximum } return false } -func (m *PrimitivesItems) GetMinimum() float64 { - if m != nil { - return m.Minimum +func (x *PrimitivesItems) GetMinimum() float64 { + if x != nil { + return x.Minimum } return 0 } -func (m *PrimitivesItems) GetExclusiveMinimum() bool { - if m != nil { - return m.ExclusiveMinimum +func (x *PrimitivesItems) GetExclusiveMinimum() bool { + if x != nil { + return x.ExclusiveMinimum } return false } -func (m *PrimitivesItems) GetMaxLength() int64 { - if m != nil { - return m.MaxLength +func (x *PrimitivesItems) GetMaxLength() int64 { + if x != nil { + return x.MaxLength } return 0 } -func (m *PrimitivesItems) GetMinLength() int64 { - if m != nil { - return m.MinLength +func (x *PrimitivesItems) GetMinLength() int64 { + if x != nil { + return x.MinLength } return 0 } -func (m *PrimitivesItems) GetPattern() string { - if m != nil { - return m.Pattern +func (x *PrimitivesItems) GetPattern() string { + if x != nil { + return x.Pattern } return "" } -func (m *PrimitivesItems) GetMaxItems() int64 { - if m != nil { - return m.MaxItems +func (x *PrimitivesItems) GetMaxItems() int64 { + if x != nil { + return x.MaxItems } return 0 } -func (m *PrimitivesItems) GetMinItems() int64 { - if m != nil { - return m.MinItems +func (x *PrimitivesItems) GetMinItems() int64 { + if x != nil { + return x.MinItems } return 0 } -func (m *PrimitivesItems) GetUniqueItems() bool { - if m != nil { - return m.UniqueItems +func (x *PrimitivesItems) GetUniqueItems() bool { + if x != nil { + return x.UniqueItems } return false } -func (m *PrimitivesItems) GetEnum() []*Any { - if m != nil { - return m.Enum +func (x *PrimitivesItems) GetEnum() []*Any { + if x != nil { + return x.Enum } return nil } -func (m *PrimitivesItems) GetMultipleOf() float64 { - if m != nil { - return m.MultipleOf +func (x *PrimitivesItems) GetMultipleOf() float64 { + if x != nil { + return x.MultipleOf } return 0 } -func (m *PrimitivesItems) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *PrimitivesItems) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type Properties struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + AdditionalProperties []*NamedSchema `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } -func (m *Properties) Reset() { *m = Properties{} } -func (m *Properties) String() string { return proto.CompactTextString(m) } -func (*Properties) ProtoMessage() {} -func (*Properties) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{44} +func (x *Properties) Reset() { + *x = Properties{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Properties) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Properties.Unmarshal(m, b) -} -func (m *Properties) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Properties.Marshal(b, m, deterministic) -} -func (m *Properties) XXX_Merge(src proto.Message) { - xxx_messageInfo_Properties.Merge(m, src) -} -func (m *Properties) XXX_Size() int { - return xxx_messageInfo_Properties.Size(m) +func (x *Properties) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Properties) XXX_DiscardUnknown() { - xxx_messageInfo_Properties.DiscardUnknown(m) + +func (*Properties) ProtoMessage() {} + +func (x *Properties) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[44] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Properties proto.InternalMessageInfo +// Deprecated: Use Properties.ProtoReflect.Descriptor instead. +func (*Properties) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{44} +} -func (m *Properties) GetAdditionalProperties() []*NamedSchema { - if m != nil { - return m.AdditionalProperties +func (x *Properties) GetAdditionalProperties() []*NamedSchema { + if x != nil { + return x.AdditionalProperties } return nil } type QueryParameterSubSchema struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Determines whether or not this parameter is required or optional. Required bool `protobuf:"varint,1,opt,name=required,proto3" json:"required,omitempty"` // Determines the location of the parameter. @@ -3673,378 +4024,390 @@ type QueryParameterSubSchema struct { // The name of the parameter. Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // allows sending a parameter by name only or with an empty value. - AllowEmptyValue bool `protobuf:"varint,5,opt,name=allow_empty_value,json=allowEmptyValue,proto3" json:"allow_empty_value,omitempty"` - Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"` - Format string `protobuf:"bytes,7,opt,name=format,proto3" json:"format,omitempty"` - Items *PrimitivesItems `protobuf:"bytes,8,opt,name=items,proto3" json:"items,omitempty"` - CollectionFormat string `protobuf:"bytes,9,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"` - Default *Any `protobuf:"bytes,10,opt,name=default,proto3" json:"default,omitempty"` - Maximum float64 `protobuf:"fixed64,11,opt,name=maximum,proto3" json:"maximum,omitempty"` - ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` - Minimum float64 `protobuf:"fixed64,13,opt,name=minimum,proto3" json:"minimum,omitempty"` - ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` - MaxLength int64 `protobuf:"varint,15,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` - MinLength int64 `protobuf:"varint,16,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` - Pattern string `protobuf:"bytes,17,opt,name=pattern,proto3" json:"pattern,omitempty"` - MaxItems int64 `protobuf:"varint,18,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` - MinItems int64 `protobuf:"varint,19,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` - UniqueItems bool `protobuf:"varint,20,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` - Enum []*Any `protobuf:"bytes,21,rep,name=enum,proto3" json:"enum,omitempty"` - MultipleOf float64 `protobuf:"fixed64,22,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,23,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *QueryParameterSubSchema) Reset() { *m = QueryParameterSubSchema{} } -func (m *QueryParameterSubSchema) String() string { return proto.CompactTextString(m) } -func (*QueryParameterSubSchema) ProtoMessage() {} + AllowEmptyValue bool `protobuf:"varint,5,opt,name=allow_empty_value,json=allowEmptyValue,proto3" json:"allow_empty_value,omitempty"` + Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"` + Format string `protobuf:"bytes,7,opt,name=format,proto3" json:"format,omitempty"` + Items *PrimitivesItems `protobuf:"bytes,8,opt,name=items,proto3" json:"items,omitempty"` + CollectionFormat string `protobuf:"bytes,9,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"` + Default *Any `protobuf:"bytes,10,opt,name=default,proto3" json:"default,omitempty"` + Maximum float64 `protobuf:"fixed64,11,opt,name=maximum,proto3" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` + Minimum float64 `protobuf:"fixed64,13,opt,name=minimum,proto3" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` + MaxLength int64 `protobuf:"varint,15,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` + MinLength int64 `protobuf:"varint,16,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,17,opt,name=pattern,proto3" json:"pattern,omitempty"` + MaxItems int64 `protobuf:"varint,18,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` + MinItems int64 `protobuf:"varint,19,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,20,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` + Enum []*Any `protobuf:"bytes,21,rep,name=enum,proto3" json:"enum,omitempty"` + MultipleOf float64 `protobuf:"fixed64,22,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,23,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` +} + +func (x *QueryParameterSubSchema) Reset() { + *x = QueryParameterSubSchema{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParameterSubSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParameterSubSchema) ProtoMessage() {} + +func (x *QueryParameterSubSchema) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryParameterSubSchema.ProtoReflect.Descriptor instead. func (*QueryParameterSubSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{45} + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{45} } -func (m *QueryParameterSubSchema) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QueryParameterSubSchema.Unmarshal(m, b) -} -func (m *QueryParameterSubSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QueryParameterSubSchema.Marshal(b, m, deterministic) -} -func (m *QueryParameterSubSchema) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParameterSubSchema.Merge(m, src) -} -func (m *QueryParameterSubSchema) XXX_Size() int { - return xxx_messageInfo_QueryParameterSubSchema.Size(m) -} -func (m *QueryParameterSubSchema) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParameterSubSchema.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParameterSubSchema proto.InternalMessageInfo - -func (m *QueryParameterSubSchema) GetRequired() bool { - if m != nil { - return m.Required +func (x *QueryParameterSubSchema) GetRequired() bool { + if x != nil { + return x.Required } return false } -func (m *QueryParameterSubSchema) GetIn() string { - if m != nil { - return m.In +func (x *QueryParameterSubSchema) GetIn() string { + if x != nil { + return x.In } return "" } -func (m *QueryParameterSubSchema) GetDescription() string { - if m != nil { - return m.Description +func (x *QueryParameterSubSchema) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *QueryParameterSubSchema) GetName() string { - if m != nil { - return m.Name +func (x *QueryParameterSubSchema) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *QueryParameterSubSchema) GetAllowEmptyValue() bool { - if m != nil { - return m.AllowEmptyValue +func (x *QueryParameterSubSchema) GetAllowEmptyValue() bool { + if x != nil { + return x.AllowEmptyValue } return false } -func (m *QueryParameterSubSchema) GetType() string { - if m != nil { - return m.Type +func (x *QueryParameterSubSchema) GetType() string { + if x != nil { + return x.Type } return "" } -func (m *QueryParameterSubSchema) GetFormat() string { - if m != nil { - return m.Format +func (x *QueryParameterSubSchema) GetFormat() string { + if x != nil { + return x.Format } return "" } -func (m *QueryParameterSubSchema) GetItems() *PrimitivesItems { - if m != nil { - return m.Items +func (x *QueryParameterSubSchema) GetItems() *PrimitivesItems { + if x != nil { + return x.Items } return nil } -func (m *QueryParameterSubSchema) GetCollectionFormat() string { - if m != nil { - return m.CollectionFormat +func (x *QueryParameterSubSchema) GetCollectionFormat() string { + if x != nil { + return x.CollectionFormat } return "" } -func (m *QueryParameterSubSchema) GetDefault() *Any { - if m != nil { - return m.Default +func (x *QueryParameterSubSchema) GetDefault() *Any { + if x != nil { + return x.Default } return nil } -func (m *QueryParameterSubSchema) GetMaximum() float64 { - if m != nil { - return m.Maximum +func (x *QueryParameterSubSchema) GetMaximum() float64 { + if x != nil { + return x.Maximum } return 0 } -func (m *QueryParameterSubSchema) GetExclusiveMaximum() bool { - if m != nil { - return m.ExclusiveMaximum +func (x *QueryParameterSubSchema) GetExclusiveMaximum() bool { + if x != nil { + return x.ExclusiveMaximum } return false } -func (m *QueryParameterSubSchema) GetMinimum() float64 { - if m != nil { - return m.Minimum +func (x *QueryParameterSubSchema) GetMinimum() float64 { + if x != nil { + return x.Minimum } return 0 } -func (m *QueryParameterSubSchema) GetExclusiveMinimum() bool { - if m != nil { - return m.ExclusiveMinimum +func (x *QueryParameterSubSchema) GetExclusiveMinimum() bool { + if x != nil { + return x.ExclusiveMinimum } return false } -func (m *QueryParameterSubSchema) GetMaxLength() int64 { - if m != nil { - return m.MaxLength +func (x *QueryParameterSubSchema) GetMaxLength() int64 { + if x != nil { + return x.MaxLength } return 0 } -func (m *QueryParameterSubSchema) GetMinLength() int64 { - if m != nil { - return m.MinLength +func (x *QueryParameterSubSchema) GetMinLength() int64 { + if x != nil { + return x.MinLength } return 0 } -func (m *QueryParameterSubSchema) GetPattern() string { - if m != nil { - return m.Pattern +func (x *QueryParameterSubSchema) GetPattern() string { + if x != nil { + return x.Pattern } return "" } -func (m *QueryParameterSubSchema) GetMaxItems() int64 { - if m != nil { - return m.MaxItems +func (x *QueryParameterSubSchema) GetMaxItems() int64 { + if x != nil { + return x.MaxItems } return 0 } -func (m *QueryParameterSubSchema) GetMinItems() int64 { - if m != nil { - return m.MinItems +func (x *QueryParameterSubSchema) GetMinItems() int64 { + if x != nil { + return x.MinItems } return 0 } -func (m *QueryParameterSubSchema) GetUniqueItems() bool { - if m != nil { - return m.UniqueItems +func (x *QueryParameterSubSchema) GetUniqueItems() bool { + if x != nil { + return x.UniqueItems } return false } -func (m *QueryParameterSubSchema) GetEnum() []*Any { - if m != nil { - return m.Enum +func (x *QueryParameterSubSchema) GetEnum() []*Any { + if x != nil { + return x.Enum } return nil } -func (m *QueryParameterSubSchema) GetMultipleOf() float64 { - if m != nil { - return m.MultipleOf +func (x *QueryParameterSubSchema) GetMultipleOf() float64 { + if x != nil { + return x.MultipleOf } return 0 } -func (m *QueryParameterSubSchema) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *QueryParameterSubSchema) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type Response struct { - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - Schema *SchemaItem `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` - Headers *Headers `protobuf:"bytes,3,opt,name=headers,proto3" json:"headers,omitempty"` - Examples *Examples `protobuf:"bytes,4,opt,name=examples,proto3" json:"examples,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,5,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Response) Reset() { *m = Response{} } -func (m *Response) String() string { return proto.CompactTextString(m) } -func (*Response) ProtoMessage() {} -func (*Response) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{46} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Response) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Response.Unmarshal(m, b) -} -func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Response.Marshal(b, m, deterministic) + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + Schema *SchemaItem `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` + Headers *Headers `protobuf:"bytes,3,opt,name=headers,proto3" json:"headers,omitempty"` + Examples *Examples `protobuf:"bytes,4,opt,name=examples,proto3" json:"examples,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,5,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *Response) XXX_Merge(src proto.Message) { - xxx_messageInfo_Response.Merge(m, src) + +func (x *Response) Reset() { + *x = Response{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Response) XXX_Size() int { - return xxx_messageInfo_Response.Size(m) + +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Response) XXX_DiscardUnknown() { - xxx_messageInfo_Response.DiscardUnknown(m) + +func (*Response) ProtoMessage() {} + +func (x *Response) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[46] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Response proto.InternalMessageInfo +// Deprecated: Use Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{46} +} -func (m *Response) GetDescription() string { - if m != nil { - return m.Description +func (x *Response) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *Response) GetSchema() *SchemaItem { - if m != nil { - return m.Schema +func (x *Response) GetSchema() *SchemaItem { + if x != nil { + return x.Schema } return nil } -func (m *Response) GetHeaders() *Headers { - if m != nil { - return m.Headers +func (x *Response) GetHeaders() *Headers { + if x != nil { + return x.Headers } return nil } -func (m *Response) GetExamples() *Examples { - if m != nil { - return m.Examples +func (x *Response) GetExamples() *Examples { + if x != nil { + return x.Examples } return nil } -func (m *Response) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *Response) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } -// One or more JSON representations for parameters +// One or more JSON representations for responses type ResponseDefinitions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + AdditionalProperties []*NamedResponse `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } -func (m *ResponseDefinitions) Reset() { *m = ResponseDefinitions{} } -func (m *ResponseDefinitions) String() string { return proto.CompactTextString(m) } -func (*ResponseDefinitions) ProtoMessage() {} -func (*ResponseDefinitions) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{47} +func (x *ResponseDefinitions) Reset() { + *x = ResponseDefinitions{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ResponseDefinitions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResponseDefinitions.Unmarshal(m, b) -} -func (m *ResponseDefinitions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResponseDefinitions.Marshal(b, m, deterministic) +func (x *ResponseDefinitions) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ResponseDefinitions) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseDefinitions.Merge(m, src) -} -func (m *ResponseDefinitions) XXX_Size() int { - return xxx_messageInfo_ResponseDefinitions.Size(m) -} -func (m *ResponseDefinitions) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseDefinitions.DiscardUnknown(m) + +func (*ResponseDefinitions) ProtoMessage() {} + +func (x *ResponseDefinitions) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[47] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ResponseDefinitions proto.InternalMessageInfo +// Deprecated: Use ResponseDefinitions.ProtoReflect.Descriptor instead. +func (*ResponseDefinitions) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{47} +} -func (m *ResponseDefinitions) GetAdditionalProperties() []*NamedResponse { - if m != nil { - return m.AdditionalProperties +func (x *ResponseDefinitions) GetAdditionalProperties() []*NamedResponse { + if x != nil { + return x.AdditionalProperties } return nil } type ResponseValue struct { - // Types that are valid to be assigned to Oneof: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Oneof: // *ResponseValue_Response // *ResponseValue_JsonReference - Oneof isResponseValue_Oneof `protobuf_oneof:"oneof"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Oneof isResponseValue_Oneof `protobuf_oneof:"oneof"` } -func (m *ResponseValue) Reset() { *m = ResponseValue{} } -func (m *ResponseValue) String() string { return proto.CompactTextString(m) } -func (*ResponseValue) ProtoMessage() {} -func (*ResponseValue) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{48} +func (x *ResponseValue) Reset() { + *x = ResponseValue{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ResponseValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResponseValue.Unmarshal(m, b) -} -func (m *ResponseValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResponseValue.Marshal(b, m, deterministic) -} -func (m *ResponseValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseValue.Merge(m, src) -} -func (m *ResponseValue) XXX_Size() int { - return xxx_messageInfo_ResponseValue.Size(m) -} -func (m *ResponseValue) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseValue.DiscardUnknown(m) +func (x *ResponseValue) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_ResponseValue proto.InternalMessageInfo +func (*ResponseValue) ProtoMessage() {} -type isResponseValue_Oneof interface { - isResponseValue_Oneof() -} - -type ResponseValue_Response struct { - Response *Response `protobuf:"bytes,1,opt,name=response,proto3,oneof"` +func (x *ResponseValue) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[48] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type ResponseValue_JsonReference struct { - JsonReference *JsonReference `protobuf:"bytes,2,opt,name=json_reference,json=jsonReference,proto3,oneof"` +// Deprecated: Use ResponseValue.ProtoReflect.Descriptor instead. +func (*ResponseValue) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{48} } -func (*ResponseValue_Response) isResponseValue_Oneof() {} - -func (*ResponseValue_JsonReference) isResponseValue_Oneof() {} - func (m *ResponseValue) GetOneof() isResponseValue_Oneof { if m != nil { return m.Oneof @@ -4052,78 +4415,98 @@ func (m *ResponseValue) GetOneof() isResponseValue_Oneof { return nil } -func (m *ResponseValue) GetResponse() *Response { - if x, ok := m.GetOneof().(*ResponseValue_Response); ok { +func (x *ResponseValue) GetResponse() *Response { + if x, ok := x.GetOneof().(*ResponseValue_Response); ok { return x.Response } return nil } -func (m *ResponseValue) GetJsonReference() *JsonReference { - if x, ok := m.GetOneof().(*ResponseValue_JsonReference); ok { +func (x *ResponseValue) GetJsonReference() *JsonReference { + if x, ok := x.GetOneof().(*ResponseValue_JsonReference); ok { return x.JsonReference } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*ResponseValue) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*ResponseValue_Response)(nil), - (*ResponseValue_JsonReference)(nil), - } +type isResponseValue_Oneof interface { + isResponseValue_Oneof() } -// Response objects names can either be any valid HTTP status code or 'default'. -type Responses struct { - ResponseCode []*NamedResponseValue `protobuf:"bytes,1,rep,name=response_code,json=responseCode,proto3" json:"response_code,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,2,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type ResponseValue_Response struct { + Response *Response `protobuf:"bytes,1,opt,name=response,proto3,oneof"` } -func (m *Responses) Reset() { *m = Responses{} } -func (m *Responses) String() string { return proto.CompactTextString(m) } -func (*Responses) ProtoMessage() {} -func (*Responses) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{49} +type ResponseValue_JsonReference struct { + JsonReference *JsonReference `protobuf:"bytes,2,opt,name=json_reference,json=jsonReference,proto3,oneof"` } -func (m *Responses) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Responses.Unmarshal(m, b) -} -func (m *Responses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Responses.Marshal(b, m, deterministic) +func (*ResponseValue_Response) isResponseValue_Oneof() {} + +func (*ResponseValue_JsonReference) isResponseValue_Oneof() {} + +// Response objects names can either be any valid HTTP status code or 'default'. +type Responses struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ResponseCode []*NamedResponseValue `protobuf:"bytes,1,rep,name=response_code,json=responseCode,proto3" json:"response_code,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,2,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *Responses) XXX_Merge(src proto.Message) { - xxx_messageInfo_Responses.Merge(m, src) + +func (x *Responses) Reset() { + *x = Responses{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Responses) XXX_Size() int { - return xxx_messageInfo_Responses.Size(m) + +func (x *Responses) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Responses) XXX_DiscardUnknown() { - xxx_messageInfo_Responses.DiscardUnknown(m) + +func (*Responses) ProtoMessage() {} + +func (x *Responses) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[49] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Responses proto.InternalMessageInfo +// Deprecated: Use Responses.ProtoReflect.Descriptor instead. +func (*Responses) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{49} +} -func (m *Responses) GetResponseCode() []*NamedResponseValue { - if m != nil { - return m.ResponseCode +func (x *Responses) GetResponseCode() []*NamedResponseValue { + if x != nil { + return x.ResponseCode } return nil } -func (m *Responses) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *Responses) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } // A deterministic version of a JSON Schema object. type Schema struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref,proto3" json:"_ref,omitempty"` Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"` Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` @@ -4155,304 +4538,300 @@ type Schema struct { ExternalDocs *ExternalDocs `protobuf:"bytes,29,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` Example *Any `protobuf:"bytes,30,opt,name=example,proto3" json:"example,omitempty"` VendorExtension []*NamedAny `protobuf:"bytes,31,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } -func (m *Schema) Reset() { *m = Schema{} } -func (m *Schema) String() string { return proto.CompactTextString(m) } -func (*Schema) ProtoMessage() {} -func (*Schema) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{50} +func (x *Schema) Reset() { + *x = Schema{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Schema) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Schema.Unmarshal(m, b) -} -func (m *Schema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Schema.Marshal(b, m, deterministic) -} -func (m *Schema) XXX_Merge(src proto.Message) { - xxx_messageInfo_Schema.Merge(m, src) -} -func (m *Schema) XXX_Size() int { - return xxx_messageInfo_Schema.Size(m) +func (x *Schema) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Schema) XXX_DiscardUnknown() { - xxx_messageInfo_Schema.DiscardUnknown(m) + +func (*Schema) ProtoMessage() {} + +func (x *Schema) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[50] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Schema proto.InternalMessageInfo +// Deprecated: Use Schema.ProtoReflect.Descriptor instead. +func (*Schema) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{50} +} -func (m *Schema) GetXRef() string { - if m != nil { - return m.XRef +func (x *Schema) GetXRef() string { + if x != nil { + return x.XRef } return "" } -func (m *Schema) GetFormat() string { - if m != nil { - return m.Format +func (x *Schema) GetFormat() string { + if x != nil { + return x.Format } return "" } -func (m *Schema) GetTitle() string { - if m != nil { - return m.Title +func (x *Schema) GetTitle() string { + if x != nil { + return x.Title } return "" } -func (m *Schema) GetDescription() string { - if m != nil { - return m.Description +func (x *Schema) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *Schema) GetDefault() *Any { - if m != nil { - return m.Default +func (x *Schema) GetDefault() *Any { + if x != nil { + return x.Default } return nil } -func (m *Schema) GetMultipleOf() float64 { - if m != nil { - return m.MultipleOf +func (x *Schema) GetMultipleOf() float64 { + if x != nil { + return x.MultipleOf } return 0 } -func (m *Schema) GetMaximum() float64 { - if m != nil { - return m.Maximum +func (x *Schema) GetMaximum() float64 { + if x != nil { + return x.Maximum } return 0 } -func (m *Schema) GetExclusiveMaximum() bool { - if m != nil { - return m.ExclusiveMaximum +func (x *Schema) GetExclusiveMaximum() bool { + if x != nil { + return x.ExclusiveMaximum } return false } -func (m *Schema) GetMinimum() float64 { - if m != nil { - return m.Minimum +func (x *Schema) GetMinimum() float64 { + if x != nil { + return x.Minimum } return 0 } -func (m *Schema) GetExclusiveMinimum() bool { - if m != nil { - return m.ExclusiveMinimum +func (x *Schema) GetExclusiveMinimum() bool { + if x != nil { + return x.ExclusiveMinimum } return false } -func (m *Schema) GetMaxLength() int64 { - if m != nil { - return m.MaxLength +func (x *Schema) GetMaxLength() int64 { + if x != nil { + return x.MaxLength } return 0 } -func (m *Schema) GetMinLength() int64 { - if m != nil { - return m.MinLength +func (x *Schema) GetMinLength() int64 { + if x != nil { + return x.MinLength } return 0 } -func (m *Schema) GetPattern() string { - if m != nil { - return m.Pattern +func (x *Schema) GetPattern() string { + if x != nil { + return x.Pattern } return "" } -func (m *Schema) GetMaxItems() int64 { - if m != nil { - return m.MaxItems +func (x *Schema) GetMaxItems() int64 { + if x != nil { + return x.MaxItems } return 0 } -func (m *Schema) GetMinItems() int64 { - if m != nil { - return m.MinItems +func (x *Schema) GetMinItems() int64 { + if x != nil { + return x.MinItems } return 0 } -func (m *Schema) GetUniqueItems() bool { - if m != nil { - return m.UniqueItems +func (x *Schema) GetUniqueItems() bool { + if x != nil { + return x.UniqueItems } return false } -func (m *Schema) GetMaxProperties() int64 { - if m != nil { - return m.MaxProperties +func (x *Schema) GetMaxProperties() int64 { + if x != nil { + return x.MaxProperties } return 0 } -func (m *Schema) GetMinProperties() int64 { - if m != nil { - return m.MinProperties +func (x *Schema) GetMinProperties() int64 { + if x != nil { + return x.MinProperties } return 0 } -func (m *Schema) GetRequired() []string { - if m != nil { - return m.Required +func (x *Schema) GetRequired() []string { + if x != nil { + return x.Required } return nil } -func (m *Schema) GetEnum() []*Any { - if m != nil { - return m.Enum +func (x *Schema) GetEnum() []*Any { + if x != nil { + return x.Enum } return nil } -func (m *Schema) GetAdditionalProperties() *AdditionalPropertiesItem { - if m != nil { - return m.AdditionalProperties +func (x *Schema) GetAdditionalProperties() *AdditionalPropertiesItem { + if x != nil { + return x.AdditionalProperties } return nil } -func (m *Schema) GetType() *TypeItem { - if m != nil { - return m.Type +func (x *Schema) GetType() *TypeItem { + if x != nil { + return x.Type } return nil } -func (m *Schema) GetItems() *ItemsItem { - if m != nil { - return m.Items +func (x *Schema) GetItems() *ItemsItem { + if x != nil { + return x.Items } return nil } -func (m *Schema) GetAllOf() []*Schema { - if m != nil { - return m.AllOf +func (x *Schema) GetAllOf() []*Schema { + if x != nil { + return x.AllOf } return nil } -func (m *Schema) GetProperties() *Properties { - if m != nil { - return m.Properties +func (x *Schema) GetProperties() *Properties { + if x != nil { + return x.Properties } return nil } -func (m *Schema) GetDiscriminator() string { - if m != nil { - return m.Discriminator +func (x *Schema) GetDiscriminator() string { + if x != nil { + return x.Discriminator } return "" } -func (m *Schema) GetReadOnly() bool { - if m != nil { - return m.ReadOnly +func (x *Schema) GetReadOnly() bool { + if x != nil { + return x.ReadOnly } return false } -func (m *Schema) GetXml() *Xml { - if m != nil { - return m.Xml +func (x *Schema) GetXml() *Xml { + if x != nil { + return x.Xml } return nil } -func (m *Schema) GetExternalDocs() *ExternalDocs { - if m != nil { - return m.ExternalDocs +func (x *Schema) GetExternalDocs() *ExternalDocs { + if x != nil { + return x.ExternalDocs } return nil } -func (m *Schema) GetExample() *Any { - if m != nil { - return m.Example +func (x *Schema) GetExample() *Any { + if x != nil { + return x.Example } return nil } -func (m *Schema) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *Schema) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type SchemaItem struct { - // Types that are valid to be assigned to Oneof: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Oneof: // *SchemaItem_Schema // *SchemaItem_FileSchema - Oneof isSchemaItem_Oneof `protobuf_oneof:"oneof"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Oneof isSchemaItem_Oneof `protobuf_oneof:"oneof"` } -func (m *SchemaItem) Reset() { *m = SchemaItem{} } -func (m *SchemaItem) String() string { return proto.CompactTextString(m) } -func (*SchemaItem) ProtoMessage() {} -func (*SchemaItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{51} +func (x *SchemaItem) Reset() { + *x = SchemaItem{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SchemaItem) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SchemaItem.Unmarshal(m, b) -} -func (m *SchemaItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SchemaItem.Marshal(b, m, deterministic) -} -func (m *SchemaItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_SchemaItem.Merge(m, src) +func (x *SchemaItem) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SchemaItem) XXX_Size() int { - return xxx_messageInfo_SchemaItem.Size(m) -} -func (m *SchemaItem) XXX_DiscardUnknown() { - xxx_messageInfo_SchemaItem.DiscardUnknown(m) -} - -var xxx_messageInfo_SchemaItem proto.InternalMessageInfo -type isSchemaItem_Oneof interface { - isSchemaItem_Oneof() -} +func (*SchemaItem) ProtoMessage() {} -type SchemaItem_Schema struct { - Schema *Schema `protobuf:"bytes,1,opt,name=schema,proto3,oneof"` +func (x *SchemaItem) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[51] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type SchemaItem_FileSchema struct { - FileSchema *FileSchema `protobuf:"bytes,2,opt,name=file_schema,json=fileSchema,proto3,oneof"` +// Deprecated: Use SchemaItem.ProtoReflect.Descriptor instead. +func (*SchemaItem) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{51} } -func (*SchemaItem_Schema) isSchemaItem_Oneof() {} - -func (*SchemaItem_FileSchema) isSchemaItem_Oneof() {} - func (m *SchemaItem) GetOneof() isSchemaItem_Oneof { if m != nil { return m.Oneof @@ -4460,105 +4839,178 @@ func (m *SchemaItem) GetOneof() isSchemaItem_Oneof { return nil } -func (m *SchemaItem) GetSchema() *Schema { - if x, ok := m.GetOneof().(*SchemaItem_Schema); ok { +func (x *SchemaItem) GetSchema() *Schema { + if x, ok := x.GetOneof().(*SchemaItem_Schema); ok { return x.Schema } return nil } -func (m *SchemaItem) GetFileSchema() *FileSchema { - if x, ok := m.GetOneof().(*SchemaItem_FileSchema); ok { +func (x *SchemaItem) GetFileSchema() *FileSchema { + if x, ok := x.GetOneof().(*SchemaItem_FileSchema); ok { return x.FileSchema } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*SchemaItem) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*SchemaItem_Schema)(nil), - (*SchemaItem_FileSchema)(nil), - } +type isSchemaItem_Oneof interface { + isSchemaItem_Oneof() } -type SecurityDefinitions struct { - AdditionalProperties []*NamedSecurityDefinitionsItem `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type SchemaItem_Schema struct { + Schema *Schema `protobuf:"bytes,1,opt,name=schema,proto3,oneof"` } -func (m *SecurityDefinitions) Reset() { *m = SecurityDefinitions{} } -func (m *SecurityDefinitions) String() string { return proto.CompactTextString(m) } -func (*SecurityDefinitions) ProtoMessage() {} -func (*SecurityDefinitions) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{52} +type SchemaItem_FileSchema struct { + FileSchema *FileSchema `protobuf:"bytes,2,opt,name=file_schema,json=fileSchema,proto3,oneof"` } -func (m *SecurityDefinitions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SecurityDefinitions.Unmarshal(m, b) -} -func (m *SecurityDefinitions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SecurityDefinitions.Marshal(b, m, deterministic) +func (*SchemaItem_Schema) isSchemaItem_Oneof() {} + +func (*SchemaItem_FileSchema) isSchemaItem_Oneof() {} + +type SecurityDefinitions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AdditionalProperties []*NamedSecurityDefinitionsItem `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"` } -func (m *SecurityDefinitions) XXX_Merge(src proto.Message) { - xxx_messageInfo_SecurityDefinitions.Merge(m, src) + +func (x *SecurityDefinitions) Reset() { + *x = SecurityDefinitions{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SecurityDefinitions) XXX_Size() int { - return xxx_messageInfo_SecurityDefinitions.Size(m) + +func (x *SecurityDefinitions) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SecurityDefinitions) XXX_DiscardUnknown() { - xxx_messageInfo_SecurityDefinitions.DiscardUnknown(m) + +func (*SecurityDefinitions) ProtoMessage() {} + +func (x *SecurityDefinitions) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[52] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SecurityDefinitions proto.InternalMessageInfo +// Deprecated: Use SecurityDefinitions.ProtoReflect.Descriptor instead. +func (*SecurityDefinitions) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{52} +} -func (m *SecurityDefinitions) GetAdditionalProperties() []*NamedSecurityDefinitionsItem { - if m != nil { - return m.AdditionalProperties +func (x *SecurityDefinitions) GetAdditionalProperties() []*NamedSecurityDefinitionsItem { + if x != nil { + return x.AdditionalProperties } return nil } type SecurityDefinitionsItem struct { - // Types that are valid to be assigned to Oneof: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Oneof: // *SecurityDefinitionsItem_BasicAuthenticationSecurity // *SecurityDefinitionsItem_ApiKeySecurity // *SecurityDefinitionsItem_Oauth2ImplicitSecurity // *SecurityDefinitionsItem_Oauth2PasswordSecurity // *SecurityDefinitionsItem_Oauth2ApplicationSecurity // *SecurityDefinitionsItem_Oauth2AccessCodeSecurity - Oneof isSecurityDefinitionsItem_Oneof `protobuf_oneof:"oneof"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Oneof isSecurityDefinitionsItem_Oneof `protobuf_oneof:"oneof"` } -func (m *SecurityDefinitionsItem) Reset() { *m = SecurityDefinitionsItem{} } -func (m *SecurityDefinitionsItem) String() string { return proto.CompactTextString(m) } -func (*SecurityDefinitionsItem) ProtoMessage() {} +func (x *SecurityDefinitionsItem) Reset() { + *x = SecurityDefinitionsItem{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecurityDefinitionsItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityDefinitionsItem) ProtoMessage() {} + +func (x *SecurityDefinitionsItem) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[53] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SecurityDefinitionsItem.ProtoReflect.Descriptor instead. func (*SecurityDefinitionsItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{53} + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{53} } -func (m *SecurityDefinitionsItem) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SecurityDefinitionsItem.Unmarshal(m, b) +func (m *SecurityDefinitionsItem) GetOneof() isSecurityDefinitionsItem_Oneof { + if m != nil { + return m.Oneof + } + return nil } -func (m *SecurityDefinitionsItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SecurityDefinitionsItem.Marshal(b, m, deterministic) + +func (x *SecurityDefinitionsItem) GetBasicAuthenticationSecurity() *BasicAuthenticationSecurity { + if x, ok := x.GetOneof().(*SecurityDefinitionsItem_BasicAuthenticationSecurity); ok { + return x.BasicAuthenticationSecurity + } + return nil +} + +func (x *SecurityDefinitionsItem) GetApiKeySecurity() *ApiKeySecurity { + if x, ok := x.GetOneof().(*SecurityDefinitionsItem_ApiKeySecurity); ok { + return x.ApiKeySecurity + } + return nil } -func (m *SecurityDefinitionsItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_SecurityDefinitionsItem.Merge(m, src) + +func (x *SecurityDefinitionsItem) GetOauth2ImplicitSecurity() *Oauth2ImplicitSecurity { + if x, ok := x.GetOneof().(*SecurityDefinitionsItem_Oauth2ImplicitSecurity); ok { + return x.Oauth2ImplicitSecurity + } + return nil } -func (m *SecurityDefinitionsItem) XXX_Size() int { - return xxx_messageInfo_SecurityDefinitionsItem.Size(m) + +func (x *SecurityDefinitionsItem) GetOauth2PasswordSecurity() *Oauth2PasswordSecurity { + if x, ok := x.GetOneof().(*SecurityDefinitionsItem_Oauth2PasswordSecurity); ok { + return x.Oauth2PasswordSecurity + } + return nil } -func (m *SecurityDefinitionsItem) XXX_DiscardUnknown() { - xxx_messageInfo_SecurityDefinitionsItem.DiscardUnknown(m) + +func (x *SecurityDefinitionsItem) GetOauth2ApplicationSecurity() *Oauth2ApplicationSecurity { + if x, ok := x.GetOneof().(*SecurityDefinitionsItem_Oauth2ApplicationSecurity); ok { + return x.Oauth2ApplicationSecurity + } + return nil } -var xxx_messageInfo_SecurityDefinitionsItem proto.InternalMessageInfo +func (x *SecurityDefinitionsItem) GetOauth2AccessCodeSecurity() *Oauth2AccessCodeSecurity { + if x, ok := x.GetOneof().(*SecurityDefinitionsItem_Oauth2AccessCodeSecurity); ok { + return x.Oauth2AccessCodeSecurity + } + return nil +} type isSecurityDefinitionsItem_Oneof interface { isSecurityDefinitionsItem_Oneof() @@ -4600,627 +5052,2296 @@ func (*SecurityDefinitionsItem_Oauth2ApplicationSecurity) isSecurityDefinitionsI func (*SecurityDefinitionsItem_Oauth2AccessCodeSecurity) isSecurityDefinitionsItem_Oneof() {} -func (m *SecurityDefinitionsItem) GetOneof() isSecurityDefinitionsItem_Oneof { - if m != nil { - return m.Oneof - } - return nil +type SecurityRequirement struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AdditionalProperties []*NamedStringArray `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"` } -func (m *SecurityDefinitionsItem) GetBasicAuthenticationSecurity() *BasicAuthenticationSecurity { - if x, ok := m.GetOneof().(*SecurityDefinitionsItem_BasicAuthenticationSecurity); ok { - return x.BasicAuthenticationSecurity +func (x *SecurityRequirement) Reset() { + *x = SecurityRequirement{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (m *SecurityDefinitionsItem) GetApiKeySecurity() *ApiKeySecurity { - if x, ok := m.GetOneof().(*SecurityDefinitionsItem_ApiKeySecurity); ok { - return x.ApiKeySecurity - } - return nil +func (x *SecurityRequirement) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SecurityDefinitionsItem) GetOauth2ImplicitSecurity() *Oauth2ImplicitSecurity { - if x, ok := m.GetOneof().(*SecurityDefinitionsItem_Oauth2ImplicitSecurity); ok { - return x.Oauth2ImplicitSecurity +func (*SecurityRequirement) ProtoMessage() {} + +func (x *SecurityRequirement) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[54] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (m *SecurityDefinitionsItem) GetOauth2PasswordSecurity() *Oauth2PasswordSecurity { - if x, ok := m.GetOneof().(*SecurityDefinitionsItem_Oauth2PasswordSecurity); ok { - return x.Oauth2PasswordSecurity - } - return nil +// Deprecated: Use SecurityRequirement.ProtoReflect.Descriptor instead. +func (*SecurityRequirement) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{54} } -func (m *SecurityDefinitionsItem) GetOauth2ApplicationSecurity() *Oauth2ApplicationSecurity { - if x, ok := m.GetOneof().(*SecurityDefinitionsItem_Oauth2ApplicationSecurity); ok { - return x.Oauth2ApplicationSecurity +func (x *SecurityRequirement) GetAdditionalProperties() []*NamedStringArray { + if x != nil { + return x.AdditionalProperties } return nil } -func (m *SecurityDefinitionsItem) GetOauth2AccessCodeSecurity() *Oauth2AccessCodeSecurity { - if x, ok := m.GetOneof().(*SecurityDefinitionsItem_Oauth2AccessCodeSecurity); ok { - return x.Oauth2AccessCodeSecurity - } - return nil +type StringArray struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*SecurityDefinitionsItem) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*SecurityDefinitionsItem_BasicAuthenticationSecurity)(nil), - (*SecurityDefinitionsItem_ApiKeySecurity)(nil), - (*SecurityDefinitionsItem_Oauth2ImplicitSecurity)(nil), - (*SecurityDefinitionsItem_Oauth2PasswordSecurity)(nil), - (*SecurityDefinitionsItem_Oauth2ApplicationSecurity)(nil), - (*SecurityDefinitionsItem_Oauth2AccessCodeSecurity)(nil), +func (x *StringArray) Reset() { + *x = StringArray{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -type SecurityRequirement struct { - AdditionalProperties []*NamedStringArray `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *StringArray) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SecurityRequirement) Reset() { *m = SecurityRequirement{} } -func (m *SecurityRequirement) String() string { return proto.CompactTextString(m) } -func (*SecurityRequirement) ProtoMessage() {} -func (*SecurityRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{54} -} +func (*StringArray) ProtoMessage() {} -func (m *SecurityRequirement) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SecurityRequirement.Unmarshal(m, b) -} -func (m *SecurityRequirement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SecurityRequirement.Marshal(b, m, deterministic) -} -func (m *SecurityRequirement) XXX_Merge(src proto.Message) { - xxx_messageInfo_SecurityRequirement.Merge(m, src) -} -func (m *SecurityRequirement) XXX_Size() int { - return xxx_messageInfo_SecurityRequirement.Size(m) -} -func (m *SecurityRequirement) XXX_DiscardUnknown() { - xxx_messageInfo_SecurityRequirement.DiscardUnknown(m) +func (x *StringArray) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[55] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SecurityRequirement proto.InternalMessageInfo +// Deprecated: Use StringArray.ProtoReflect.Descriptor instead. +func (*StringArray) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{55} +} -func (m *SecurityRequirement) GetAdditionalProperties() []*NamedStringArray { - if m != nil { - return m.AdditionalProperties +func (x *StringArray) GetValue() []string { + if x != nil { + return x.Value } return nil } -type StringArray struct { - Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} +type Tag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StringArray) Reset() { *m = StringArray{} } -func (m *StringArray) String() string { return proto.CompactTextString(m) } -func (*StringArray) ProtoMessage() {} -func (*StringArray) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{55} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + ExternalDocs *ExternalDocs `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,4,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *StringArray) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StringArray.Unmarshal(m, b) -} -func (m *StringArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StringArray.Marshal(b, m, deterministic) -} -func (m *StringArray) XXX_Merge(src proto.Message) { - xxx_messageInfo_StringArray.Merge(m, src) -} -func (m *StringArray) XXX_Size() int { - return xxx_messageInfo_StringArray.Size(m) +func (x *Tag) Reset() { + *x = Tag{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StringArray) XXX_DiscardUnknown() { - xxx_messageInfo_StringArray.DiscardUnknown(m) + +func (x *Tag) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_StringArray proto.InternalMessageInfo +func (*Tag) ProtoMessage() {} -func (m *StringArray) GetValue() []string { - if m != nil { - return m.Value +func (x *Tag) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[56] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -type Tag struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - ExternalDocs *ExternalDocs `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,4,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Tag) Reset() { *m = Tag{} } -func (m *Tag) String() string { return proto.CompactTextString(m) } -func (*Tag) ProtoMessage() {} +// Deprecated: Use Tag.ProtoReflect.Descriptor instead. func (*Tag) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{56} + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{56} } -func (m *Tag) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Tag.Unmarshal(m, b) -} -func (m *Tag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Tag.Marshal(b, m, deterministic) -} -func (m *Tag) XXX_Merge(src proto.Message) { - xxx_messageInfo_Tag.Merge(m, src) -} -func (m *Tag) XXX_Size() int { - return xxx_messageInfo_Tag.Size(m) -} -func (m *Tag) XXX_DiscardUnknown() { - xxx_messageInfo_Tag.DiscardUnknown(m) -} - -var xxx_messageInfo_Tag proto.InternalMessageInfo - -func (m *Tag) GetName() string { - if m != nil { - return m.Name +func (x *Tag) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *Tag) GetDescription() string { - if m != nil { - return m.Description +func (x *Tag) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *Tag) GetExternalDocs() *ExternalDocs { - if m != nil { - return m.ExternalDocs +func (x *Tag) GetExternalDocs() *ExternalDocs { + if x != nil { + return x.ExternalDocs } return nil } -func (m *Tag) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension +func (x *Tag) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension } return nil } type TypeItem struct { - Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *TypeItem) Reset() { *m = TypeItem{} } -func (m *TypeItem) String() string { return proto.CompactTextString(m) } -func (*TypeItem) ProtoMessage() {} -func (*TypeItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{57} + Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` } -func (m *TypeItem) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TypeItem.Unmarshal(m, b) -} -func (m *TypeItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TypeItem.Marshal(b, m, deterministic) -} -func (m *TypeItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_TypeItem.Merge(m, src) +func (x *TypeItem) Reset() { + *x = TypeItem{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TypeItem) XXX_Size() int { - return xxx_messageInfo_TypeItem.Size(m) + +func (x *TypeItem) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TypeItem) XXX_DiscardUnknown() { - xxx_messageInfo_TypeItem.DiscardUnknown(m) + +func (*TypeItem) ProtoMessage() {} + +func (x *TypeItem) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[57] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TypeItem proto.InternalMessageInfo +// Deprecated: Use TypeItem.ProtoReflect.Descriptor instead. +func (*TypeItem) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{57} +} -func (m *TypeItem) GetValue() []string { - if m != nil { - return m.Value +func (x *TypeItem) GetValue() []string { + if x != nil { + return x.Value } return nil } // Any property starting with x- is valid. type VendorExtension struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + AdditionalProperties []*NamedAny `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } -func (m *VendorExtension) Reset() { *m = VendorExtension{} } -func (m *VendorExtension) String() string { return proto.CompactTextString(m) } -func (*VendorExtension) ProtoMessage() {} -func (*VendorExtension) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{58} +func (x *VendorExtension) Reset() { + *x = VendorExtension{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *VendorExtension) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VendorExtension.Unmarshal(m, b) -} -func (m *VendorExtension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VendorExtension.Marshal(b, m, deterministic) +func (x *VendorExtension) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *VendorExtension) XXX_Merge(src proto.Message) { - xxx_messageInfo_VendorExtension.Merge(m, src) -} -func (m *VendorExtension) XXX_Size() int { - return xxx_messageInfo_VendorExtension.Size(m) -} -func (m *VendorExtension) XXX_DiscardUnknown() { - xxx_messageInfo_VendorExtension.DiscardUnknown(m) + +func (*VendorExtension) ProtoMessage() {} + +func (x *VendorExtension) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[58] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_VendorExtension proto.InternalMessageInfo +// Deprecated: Use VendorExtension.ProtoReflect.Descriptor instead. +func (*VendorExtension) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{58} +} -func (m *VendorExtension) GetAdditionalProperties() []*NamedAny { - if m != nil { - return m.AdditionalProperties +func (x *VendorExtension) GetAdditionalProperties() []*NamedAny { + if x != nil { + return x.AdditionalProperties } return nil } type Xml struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"` - Attribute bool `protobuf:"varint,4,opt,name=attribute,proto3" json:"attribute,omitempty"` - Wrapped bool `protobuf:"varint,5,opt,name=wrapped,proto3" json:"wrapped,omitempty"` - VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Xml) Reset() { *m = Xml{} } -func (m *Xml) String() string { return proto.CompactTextString(m) } -func (*Xml) ProtoMessage() {} -func (*Xml) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{59} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Xml) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Xml.Unmarshal(m, b) -} -func (m *Xml) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Xml.Marshal(b, m, deterministic) + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"` + Attribute bool `protobuf:"varint,4,opt,name=attribute,proto3" json:"attribute,omitempty"` + Wrapped bool `protobuf:"varint,5,opt,name=wrapped,proto3" json:"wrapped,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"` } -func (m *Xml) XXX_Merge(src proto.Message) { - xxx_messageInfo_Xml.Merge(m, src) + +func (x *Xml) Reset() { + *x = Xml{} + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Xml) XXX_Size() int { - return xxx_messageInfo_Xml.Size(m) + +func (x *Xml) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Xml) XXX_DiscardUnknown() { - xxx_messageInfo_Xml.DiscardUnknown(m) + +func (*Xml) ProtoMessage() {} + +func (x *Xml) ProtoReflect() protoreflect.Message { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[59] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Xml proto.InternalMessageInfo +// Deprecated: Use Xml.ProtoReflect.Descriptor instead. +func (*Xml) Descriptor() ([]byte, []int) { + return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{59} +} -func (m *Xml) GetName() string { - if m != nil { - return m.Name +func (x *Xml) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *Xml) GetNamespace() string { - if m != nil { - return m.Namespace +func (x *Xml) GetNamespace() string { + if x != nil { + return x.Namespace } return "" } -func (m *Xml) GetPrefix() string { - if m != nil { - return m.Prefix +func (x *Xml) GetPrefix() string { + if x != nil { + return x.Prefix } return "" } -func (m *Xml) GetAttribute() bool { - if m != nil { - return m.Attribute +func (x *Xml) GetAttribute() bool { + if x != nil { + return x.Attribute } return false } -func (m *Xml) GetWrapped() bool { - if m != nil { - return m.Wrapped +func (x *Xml) GetWrapped() bool { + if x != nil { + return x.Wrapped } return false } -func (m *Xml) GetVendorExtension() []*NamedAny { - if m != nil { - return m.VendorExtension - } - return nil -} - -func init() { - proto.RegisterType((*AdditionalPropertiesItem)(nil), "openapi.v2.AdditionalPropertiesItem") - proto.RegisterType((*Any)(nil), "openapi.v2.Any") - proto.RegisterType((*ApiKeySecurity)(nil), "openapi.v2.ApiKeySecurity") - proto.RegisterType((*BasicAuthenticationSecurity)(nil), "openapi.v2.BasicAuthenticationSecurity") - proto.RegisterType((*BodyParameter)(nil), "openapi.v2.BodyParameter") - proto.RegisterType((*Contact)(nil), "openapi.v2.Contact") - proto.RegisterType((*Default)(nil), "openapi.v2.Default") - proto.RegisterType((*Definitions)(nil), "openapi.v2.Definitions") - proto.RegisterType((*Document)(nil), "openapi.v2.Document") - proto.RegisterType((*Examples)(nil), "openapi.v2.Examples") - proto.RegisterType((*ExternalDocs)(nil), "openapi.v2.ExternalDocs") - proto.RegisterType((*FileSchema)(nil), "openapi.v2.FileSchema") - proto.RegisterType((*FormDataParameterSubSchema)(nil), "openapi.v2.FormDataParameterSubSchema") - proto.RegisterType((*Header)(nil), "openapi.v2.Header") - proto.RegisterType((*HeaderParameterSubSchema)(nil), "openapi.v2.HeaderParameterSubSchema") - proto.RegisterType((*Headers)(nil), "openapi.v2.Headers") - proto.RegisterType((*Info)(nil), "openapi.v2.Info") - proto.RegisterType((*ItemsItem)(nil), "openapi.v2.ItemsItem") - proto.RegisterType((*JsonReference)(nil), "openapi.v2.JsonReference") - proto.RegisterType((*License)(nil), "openapi.v2.License") - proto.RegisterType((*NamedAny)(nil), "openapi.v2.NamedAny") - proto.RegisterType((*NamedHeader)(nil), "openapi.v2.NamedHeader") - proto.RegisterType((*NamedParameter)(nil), "openapi.v2.NamedParameter") - proto.RegisterType((*NamedPathItem)(nil), "openapi.v2.NamedPathItem") - proto.RegisterType((*NamedResponse)(nil), "openapi.v2.NamedResponse") - proto.RegisterType((*NamedResponseValue)(nil), "openapi.v2.NamedResponseValue") - proto.RegisterType((*NamedSchema)(nil), "openapi.v2.NamedSchema") - proto.RegisterType((*NamedSecurityDefinitionsItem)(nil), "openapi.v2.NamedSecurityDefinitionsItem") - proto.RegisterType((*NamedString)(nil), "openapi.v2.NamedString") - proto.RegisterType((*NamedStringArray)(nil), "openapi.v2.NamedStringArray") - proto.RegisterType((*NonBodyParameter)(nil), "openapi.v2.NonBodyParameter") - proto.RegisterType((*Oauth2AccessCodeSecurity)(nil), "openapi.v2.Oauth2AccessCodeSecurity") - proto.RegisterType((*Oauth2ApplicationSecurity)(nil), "openapi.v2.Oauth2ApplicationSecurity") - proto.RegisterType((*Oauth2ImplicitSecurity)(nil), "openapi.v2.Oauth2ImplicitSecurity") - proto.RegisterType((*Oauth2PasswordSecurity)(nil), "openapi.v2.Oauth2PasswordSecurity") - proto.RegisterType((*Oauth2Scopes)(nil), "openapi.v2.Oauth2Scopes") - proto.RegisterType((*Operation)(nil), "openapi.v2.Operation") - proto.RegisterType((*Parameter)(nil), "openapi.v2.Parameter") - proto.RegisterType((*ParameterDefinitions)(nil), "openapi.v2.ParameterDefinitions") - proto.RegisterType((*ParametersItem)(nil), "openapi.v2.ParametersItem") - proto.RegisterType((*PathItem)(nil), "openapi.v2.PathItem") - proto.RegisterType((*PathParameterSubSchema)(nil), "openapi.v2.PathParameterSubSchema") - proto.RegisterType((*Paths)(nil), "openapi.v2.Paths") - proto.RegisterType((*PrimitivesItems)(nil), "openapi.v2.PrimitivesItems") - proto.RegisterType((*Properties)(nil), "openapi.v2.Properties") - proto.RegisterType((*QueryParameterSubSchema)(nil), "openapi.v2.QueryParameterSubSchema") - proto.RegisterType((*Response)(nil), "openapi.v2.Response") - proto.RegisterType((*ResponseDefinitions)(nil), "openapi.v2.ResponseDefinitions") - proto.RegisterType((*ResponseValue)(nil), "openapi.v2.ResponseValue") - proto.RegisterType((*Responses)(nil), "openapi.v2.Responses") - proto.RegisterType((*Schema)(nil), "openapi.v2.Schema") - proto.RegisterType((*SchemaItem)(nil), "openapi.v2.SchemaItem") - proto.RegisterType((*SecurityDefinitions)(nil), "openapi.v2.SecurityDefinitions") - proto.RegisterType((*SecurityDefinitionsItem)(nil), "openapi.v2.SecurityDefinitionsItem") - proto.RegisterType((*SecurityRequirement)(nil), "openapi.v2.SecurityRequirement") - proto.RegisterType((*StringArray)(nil), "openapi.v2.StringArray") - proto.RegisterType((*Tag)(nil), "openapi.v2.Tag") - proto.RegisterType((*TypeItem)(nil), "openapi.v2.TypeItem") - proto.RegisterType((*VendorExtension)(nil), "openapi.v2.VendorExtension") - proto.RegisterType((*Xml)(nil), "openapi.v2.Xml") -} - -func init() { proto.RegisterFile("OpenAPIv2/OpenAPIv2.proto", fileDescriptor_336adc04ae589d92) } - -var fileDescriptor_336adc04ae589d92 = []byte{ - // 3129 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3b, 0x4b, 0x73, 0x1c, 0x57, - 0xd5, 0xf3, 0x7e, 0x1c, 0x69, 0x46, 0xa3, 0x96, 0x2c, 0xb7, 0x24, 0xc7, 0x71, 0xe4, 0x3c, 0x6c, - 0xe7, 0xb3, 0x9c, 0x4f, 0x29, 0x48, 0x05, 0x2a, 0x05, 0xf2, 0xab, 0xc6, 0xc4, 0x44, 0x4a, 0xcb, - 0x0e, 0x09, 0x04, 0xba, 0xae, 0x66, 0xee, 0x48, 0x9d, 0x74, 0xf7, 0x6d, 0x77, 0xf7, 0xc8, 0x1a, - 0x16, 0x2c, 0xa0, 0x8a, 0x35, 0x50, 0x59, 0x53, 0x15, 0x16, 0x14, 0x55, 0x59, 0xb0, 0x62, 0xc5, - 0x1f, 0x60, 0xc7, 0x3f, 0x60, 0x0d, 0x5b, 0xaa, 0x58, 0x51, 0x3c, 0xea, 0xbe, 0xfa, 0x31, 0x7d, - 0x7b, 0x1e, 0x96, 0x0b, 0x28, 0xd0, 0x6a, 0xe6, 0xde, 0x73, 0xee, 0xb9, 0xa7, 0x4f, 0x9f, 0xd7, - 0x3d, 0xe7, 0x36, 0xac, 0xef, 0x79, 0xd8, 0xdd, 0xdd, 0x7f, 0x70, 0xb2, 0x73, 0x2b, 0xfa, 0xb7, - 0xed, 0xf9, 0x24, 0x24, 0x1a, 0x10, 0x0f, 0xbb, 0xc8, 0xb3, 0xb6, 0x4f, 0x76, 0x36, 0xd6, 0x8f, - 0x08, 0x39, 0xb2, 0xf1, 0x2d, 0x06, 0x39, 0x1c, 0x0e, 0x6e, 0x21, 0x77, 0xc4, 0xd1, 0xb6, 0x1c, - 0xd0, 0x77, 0xfb, 0x7d, 0x2b, 0xb4, 0x88, 0x8b, 0xec, 0x7d, 0x9f, 0x78, 0xd8, 0x0f, 0x2d, 0x1c, - 0x3c, 0x08, 0xb1, 0xa3, 0xfd, 0x1f, 0xd4, 0x82, 0xde, 0x31, 0x76, 0x90, 0x5e, 0xbc, 0x52, 0xbc, - 0xb6, 0xb0, 0xa3, 0x6d, 0xc7, 0x34, 0xb7, 0x0f, 0x18, 0xa4, 0x5b, 0x30, 0x04, 0x8e, 0xb6, 0x01, - 0xf5, 0x43, 0x42, 0x6c, 0x8c, 0x5c, 0xbd, 0x74, 0xa5, 0x78, 0xad, 0xd1, 0x2d, 0x18, 0x72, 0xe2, - 0x76, 0x1d, 0xaa, 0xc4, 0xc5, 0x64, 0xb0, 0x75, 0x0f, 0xca, 0xbb, 0xee, 0x48, 0xbb, 0x01, 0xd5, - 0x13, 0x64, 0x0f, 0xb1, 0x20, 0xbc, 0xba, 0xcd, 0x19, 0xdc, 0x96, 0x0c, 0x6e, 0xef, 0xba, 0x23, - 0x83, 0xa3, 0x68, 0x1a, 0x54, 0x46, 0xc8, 0xb1, 0x19, 0xd1, 0xa6, 0xc1, 0xfe, 0x6f, 0x7d, 0x51, - 0x84, 0xf6, 0xae, 0x67, 0xbd, 0x8b, 0x47, 0x07, 0xb8, 0x37, 0xf4, 0xad, 0x70, 0x44, 0xd1, 0xc2, - 0x91, 0xc7, 0x29, 0x36, 0x0d, 0xf6, 0x9f, 0xce, 0xb9, 0xc8, 0xc1, 0x72, 0x29, 0xfd, 0xaf, 0xb5, - 0xa1, 0x64, 0xb9, 0x7a, 0x99, 0xcd, 0x94, 0x2c, 0x57, 0xbb, 0x02, 0x0b, 0x7d, 0x1c, 0xf4, 0x7c, - 0xcb, 0xa3, 0x32, 0xd0, 0x2b, 0x0c, 0x90, 0x9c, 0xd2, 0xbe, 0x06, 0x9d, 0x13, 0xec, 0xf6, 0x89, - 0x6f, 0xe2, 0xd3, 0x10, 0xbb, 0x01, 0x45, 0xab, 0x5e, 0x29, 0x33, 0xbe, 0x13, 0x02, 0x79, 0x0f, - 0x39, 0xb8, 0x4f, 0xf9, 0x5e, 0xe2, 0xd8, 0xf7, 0x24, 0xf2, 0xd6, 0x67, 0x45, 0xd8, 0xbc, 0x8d, - 0x02, 0xab, 0xb7, 0x3b, 0x0c, 0x8f, 0xb1, 0x1b, 0x5a, 0x3d, 0x44, 0x09, 0x4f, 0x64, 0x7d, 0x8c, - 0xad, 0xd2, 0x6c, 0x6c, 0x95, 0xe7, 0x61, 0xeb, 0x0f, 0x45, 0x68, 0xdd, 0x26, 0xfd, 0xd1, 0x3e, - 0xf2, 0x91, 0x83, 0x43, 0xec, 0x8f, 0x6f, 0x5a, 0xcc, 0x6e, 0x3a, 0x8b, 0x44, 0x37, 0xa0, 0xe1, - 0xe3, 0x27, 0x43, 0xcb, 0xc7, 0x7d, 0x26, 0xce, 0x86, 0x11, 0x8d, 0xb5, 0x1b, 0x91, 0x4a, 0x55, - 0xf3, 0x54, 0x2a, 0x52, 0x28, 0xd5, 0x03, 0xd6, 0xe6, 0x79, 0xc0, 0x1f, 0x17, 0xa1, 0x7e, 0x87, - 0xb8, 0x21, 0xea, 0x85, 0x11, 0xe3, 0xc5, 0x04, 0xe3, 0x1d, 0x28, 0x0f, 0x7d, 0xa9, 0x58, 0xf4, - 0xaf, 0xb6, 0x0a, 0x55, 0xec, 0x20, 0xcb, 0x16, 0x4f, 0xc3, 0x07, 0x4a, 0x46, 0x2a, 0xf3, 0x30, - 0xf2, 0x08, 0xea, 0x77, 0xf1, 0x00, 0x0d, 0xed, 0x50, 0x7b, 0x00, 0x17, 0x50, 0x64, 0x6f, 0xa6, - 0x17, 0x19, 0x9c, 0x5e, 0x9c, 0x40, 0x70, 0x15, 0x29, 0x4c, 0x74, 0xeb, 0x3b, 0xb0, 0x70, 0x17, - 0x0f, 0x2c, 0x97, 0x41, 0x02, 0xed, 0xe1, 0x64, 0xca, 0x17, 0x33, 0x94, 0x85, 0xb8, 0xd5, 0xc4, - 0xff, 0x58, 0x85, 0xc6, 0x5d, 0xd2, 0x1b, 0x3a, 0xd8, 0x0d, 0x35, 0x1d, 0xea, 0xc1, 0x53, 0x74, - 0x74, 0x84, 0x7d, 0x21, 0x3f, 0x39, 0xd4, 0x5e, 0x86, 0x8a, 0xe5, 0x0e, 0x08, 0x93, 0xe1, 0xc2, - 0x4e, 0x27, 0xb9, 0xc7, 0x03, 0x77, 0x40, 0x0c, 0x06, 0xa5, 0xc2, 0x3f, 0x26, 0x41, 0x28, 0xa4, - 0xca, 0xfe, 0x6b, 0x9b, 0xd0, 0x3c, 0x44, 0x01, 0x36, 0x3d, 0x14, 0x1e, 0x0b, 0xab, 0x6b, 0xd0, - 0x89, 0x7d, 0x14, 0x1e, 0xb3, 0x0d, 0x29, 0x77, 0x38, 0x60, 0x96, 0x46, 0x37, 0xe4, 0x43, 0xaa, - 0x5c, 0x3d, 0xe2, 0x06, 0x43, 0x0a, 0xaa, 0x31, 0x50, 0x34, 0xa6, 0x30, 0xcf, 0x27, 0xfd, 0x61, - 0x0f, 0x07, 0x7a, 0x9d, 0xc3, 0xe4, 0x58, 0x7b, 0x0d, 0xaa, 0x74, 0xa7, 0x40, 0x6f, 0x30, 0x4e, - 0x97, 0x93, 0x9c, 0xd2, 0x2d, 0x03, 0x83, 0xc3, 0xb5, 0xb7, 0xa9, 0x0d, 0x44, 0x52, 0xd5, 0x9b, - 0x0c, 0x3d, 0x25, 0xbc, 0x84, 0xd0, 0x8d, 0x24, 0xae, 0xf6, 0x75, 0x00, 0x4f, 0xda, 0x52, 0xa0, - 0x03, 0x5b, 0x79, 0x25, 0xbd, 0x91, 0x80, 0x26, 0x49, 0x24, 0xd6, 0x68, 0xef, 0x40, 0xd3, 0xc7, - 0x81, 0x47, 0xdc, 0x00, 0x07, 0xfa, 0x02, 0x23, 0xf0, 0x62, 0x92, 0x80, 0x21, 0x80, 0xc9, 0xf5, - 0xf1, 0x0a, 0xed, 0xab, 0xd0, 0x08, 0x84, 0x53, 0xd1, 0x17, 0xd9, 0x5b, 0x4f, 0xad, 0x96, 0x0e, - 0xc7, 0xe0, 0xd6, 0x48, 0x5f, 0xad, 0x11, 0x2d, 0xd0, 0x0c, 0x58, 0x95, 0xff, 0xcd, 0xa4, 0x04, - 0x5a, 0x59, 0x36, 0x24, 0xa1, 0x24, 0x1b, 0x2b, 0x41, 0x76, 0x52, 0xbb, 0x0a, 0x95, 0x10, 0x1d, - 0x05, 0x7a, 0x9b, 0x31, 0xb3, 0x94, 0xa4, 0xf1, 0x08, 0x1d, 0x19, 0x0c, 0xa8, 0xbd, 0x03, 0x2d, - 0x6a, 0x57, 0x3e, 0x55, 0xdb, 0x3e, 0xe9, 0x05, 0xfa, 0x12, 0xdb, 0x51, 0x4f, 0x62, 0xdf, 0x13, - 0x08, 0x77, 0x49, 0x2f, 0x30, 0x16, 0x71, 0x62, 0xa4, 0xb4, 0xce, 0xce, 0x3c, 0xd6, 0xf9, 0x18, - 0x1a, 0xf7, 0x4e, 0x91, 0xe3, 0xd9, 0x38, 0x78, 0x9e, 0xe6, 0xf9, 0xa3, 0x22, 0x2c, 0x26, 0xd9, - 0x9e, 0xc1, 0xbb, 0x66, 0x1d, 0xd2, 0x99, 0x9d, 0xfc, 0x3f, 0x4a, 0x00, 0xf7, 0x2d, 0x1b, 0x73, - 0x63, 0xd7, 0xd6, 0xa0, 0x36, 0x20, 0xbe, 0x83, 0x42, 0xb1, 0xbd, 0x18, 0x51, 0xc7, 0x17, 0x5a, - 0xa1, 0x2d, 0x1d, 0x3b, 0x1f, 0x8c, 0x73, 0x5c, 0xce, 0x72, 0x7c, 0x1d, 0xea, 0x7d, 0xee, 0xd9, - 0x98, 0x0d, 0x8f, 0xbd, 0x63, 0xca, 0x91, 0x84, 0xa7, 0xc2, 0x02, 0x37, 0xea, 0x38, 0x2c, 0xc8, - 0x08, 0x58, 0x4b, 0x44, 0xc0, 0x4d, 0x6a, 0x0b, 0xa8, 0x6f, 0x12, 0xd7, 0x1e, 0xe9, 0x75, 0x19, - 0x47, 0x50, 0x7f, 0xcf, 0xb5, 0x47, 0x59, 0x9d, 0x69, 0xcc, 0xa5, 0x33, 0xd7, 0xa1, 0x8e, 0xf9, - 0x2b, 0x17, 0x06, 0x9e, 0x65, 0x5b, 0xc0, 0x95, 0x6f, 0x00, 0xe6, 0x79, 0x03, 0x5f, 0xd4, 0x60, - 0xe3, 0x3e, 0xf1, 0x9d, 0xbb, 0x28, 0x44, 0x91, 0x03, 0x38, 0x18, 0x1e, 0x1e, 0xc8, 0xb4, 0x29, - 0x16, 0x4b, 0x71, 0x2c, 0x5a, 0xf2, 0xc8, 0x5a, 0xca, 0xcb, 0x55, 0xca, 0xf9, 0xf1, 0xb9, 0x92, - 0x08, 0x73, 0x37, 0x60, 0x19, 0xd9, 0x36, 0x79, 0x6a, 0x62, 0xc7, 0x0b, 0x47, 0x26, 0x4f, 0xbc, - 0xaa, 0x6c, 0xab, 0x25, 0x06, 0xb8, 0x47, 0xe7, 0x3f, 0x90, 0xc9, 0x56, 0xe6, 0x45, 0xc4, 0x3a, - 0x53, 0x4f, 0xe9, 0xcc, 0xff, 0x43, 0xd5, 0x0a, 0xb1, 0x23, 0x65, 0xbf, 0x99, 0xf2, 0x74, 0xbe, - 0xe5, 0x58, 0xa1, 0x75, 0xc2, 0x33, 0xc9, 0xc0, 0xe0, 0x98, 0xda, 0xeb, 0xb0, 0xdc, 0x23, 0xb6, - 0x8d, 0x7b, 0x94, 0x59, 0x53, 0x50, 0x6d, 0x32, 0xaa, 0x9d, 0x18, 0x70, 0x9f, 0xd3, 0x4f, 0xe8, - 0x16, 0x4c, 0xd1, 0x2d, 0x1d, 0xea, 0x0e, 0x3a, 0xb5, 0x9c, 0xa1, 0xc3, 0xbc, 0x66, 0xd1, 0x90, - 0x43, 0xba, 0x23, 0x3e, 0xed, 0xd9, 0xc3, 0xc0, 0x3a, 0xc1, 0xa6, 0xc4, 0x59, 0x64, 0x0f, 0xdf, - 0x89, 0x00, 0xdf, 0x14, 0xc8, 0x94, 0x8c, 0xe5, 0x32, 0x94, 0x96, 0x20, 0xc3, 0x87, 0x63, 0x64, - 0x04, 0x4e, 0x7b, 0x9c, 0x8c, 0x40, 0x7e, 0x01, 0xc0, 0x41, 0xa7, 0xa6, 0x8d, 0xdd, 0xa3, 0xf0, - 0x98, 0x79, 0xb3, 0xb2, 0xd1, 0x74, 0xd0, 0xe9, 0x43, 0x36, 0xc1, 0xc0, 0x96, 0x2b, 0xc1, 0x1d, - 0x01, 0xb6, 0x5c, 0x01, 0xd6, 0xa1, 0xee, 0xa1, 0x90, 0x2a, 0xab, 0xbe, 0xcc, 0x83, 0xad, 0x18, - 0x52, 0x8b, 0xa0, 0x74, 0xb9, 0xd0, 0x35, 0xb6, 0xae, 0xe1, 0xa0, 0x53, 0x26, 0x61, 0x06, 0xb4, - 0x5c, 0x01, 0x5c, 0x11, 0x40, 0xcb, 0xe5, 0xc0, 0x97, 0x60, 0x71, 0xe8, 0x5a, 0x4f, 0x86, 0x58, - 0xc0, 0x57, 0x19, 0xe7, 0x0b, 0x7c, 0x8e, 0xa3, 0x5c, 0x85, 0x0a, 0x76, 0x87, 0x8e, 0x7e, 0x21, - 0xeb, 0xaa, 0xa9, 0xa8, 0x19, 0x50, 0x7b, 0x11, 0x16, 0x9c, 0xa1, 0x1d, 0x5a, 0x9e, 0x8d, 0x4d, - 0x32, 0xd0, 0xd7, 0x98, 0x90, 0x40, 0x4e, 0xed, 0x0d, 0x94, 0xd6, 0x72, 0x71, 0x2e, 0x6b, 0xa9, - 0x42, 0xad, 0x8b, 0x51, 0x1f, 0xfb, 0xca, 0xb4, 0x38, 0xd6, 0xc5, 0x92, 0x5a, 0x17, 0xcb, 0x67, - 0xd3, 0xc5, 0xca, 0x74, 0x5d, 0xac, 0xce, 0xae, 0x8b, 0xb5, 0x19, 0x74, 0xb1, 0x3e, 0x5d, 0x17, - 0x1b, 0x33, 0xe8, 0x62, 0x73, 0x26, 0x5d, 0x84, 0xc9, 0xba, 0xb8, 0x30, 0x41, 0x17, 0x17, 0x27, - 0xe8, 0x62, 0x6b, 0x92, 0x2e, 0xb6, 0xa7, 0xe8, 0xe2, 0x52, 0xbe, 0x2e, 0x76, 0xe6, 0xd0, 0xc5, - 0xe5, 0x8c, 0x2e, 0x8e, 0x79, 0x4b, 0x6d, 0xb6, 0x23, 0xd4, 0xca, 0x3c, 0xda, 0xfa, 0xb7, 0x2a, - 0xe8, 0x5c, 0x5b, 0xff, 0x2d, 0x9e, 0x5d, 0x5a, 0x48, 0x55, 0x69, 0x21, 0x35, 0xb5, 0x85, 0xd4, - 0xcf, 0x66, 0x21, 0x8d, 0xe9, 0x16, 0xd2, 0x9c, 0xdd, 0x42, 0x60, 0x06, 0x0b, 0x59, 0x98, 0x6e, - 0x21, 0x8b, 0x33, 0x58, 0x48, 0x6b, 0x26, 0x0b, 0x69, 0x4f, 0xb6, 0x90, 0xa5, 0x09, 0x16, 0xd2, - 0x99, 0x60, 0x21, 0xcb, 0x93, 0x2c, 0x44, 0x9b, 0x62, 0x21, 0x2b, 0xf9, 0x16, 0xb2, 0x3a, 0x87, - 0x85, 0x5c, 0x98, 0xc9, 0x5b, 0xaf, 0xcd, 0xa3, 0xff, 0xdf, 0x82, 0x3a, 0x57, 0xff, 0x67, 0x38, - 0x7e, 0xf2, 0x85, 0x39, 0xc9, 0xf3, 0xe7, 0x25, 0xa8, 0xd0, 0x03, 0x64, 0x9c, 0x98, 0x16, 0x93, - 0x89, 0xa9, 0x0e, 0xf5, 0x13, 0xec, 0x07, 0x71, 0x65, 0x44, 0x0e, 0x67, 0x30, 0xa4, 0x6b, 0xd0, - 0x09, 0xb1, 0xef, 0x04, 0x26, 0x19, 0x98, 0x01, 0xf6, 0x4f, 0xac, 0x9e, 0x34, 0xaa, 0x36, 0x9b, - 0xdf, 0x1b, 0x1c, 0xf0, 0x59, 0xed, 0x26, 0xd4, 0x7b, 0xbc, 0x7c, 0x20, 0x9c, 0xfe, 0x4a, 0xf2, - 0x21, 0x44, 0x65, 0xc1, 0x90, 0x38, 0x14, 0xdd, 0xb6, 0x7a, 0xd8, 0x0d, 0x78, 0xfa, 0x34, 0x86, - 0xfe, 0x90, 0x83, 0x0c, 0x89, 0xa3, 0x14, 0x7e, 0x7d, 0x1e, 0xe1, 0xbf, 0x05, 0x4d, 0xa6, 0x0c, - 0xac, 0x56, 0x77, 0x23, 0x51, 0xab, 0x2b, 0x4f, 0x2e, 0xac, 0x6c, 0xdd, 0x85, 0xd6, 0x37, 0x02, - 0xe2, 0x1a, 0x78, 0x80, 0x7d, 0xec, 0xf6, 0xb0, 0xb6, 0x0c, 0x15, 0xd3, 0xc7, 0x03, 0x21, 0xe3, - 0xb2, 0x81, 0x07, 0xd3, 0xeb, 0x4f, 0x5b, 0x1e, 0xd4, 0xc5, 0x33, 0xcd, 0x58, 0x5c, 0x39, 0xf3, - 0x59, 0xe6, 0x1e, 0x34, 0x24, 0x50, 0xb9, 0xe5, 0x2b, 0xb2, 0xaa, 0x58, 0x52, 0x3b, 0x20, 0x0e, - 0xdd, 0x7a, 0x17, 0x16, 0x12, 0x0a, 0xa8, 0xa4, 0x74, 0x2d, 0x4d, 0x29, 0x25, 0x4c, 0xa1, 0xb7, - 0x82, 0xd8, 0xfb, 0xd0, 0x66, 0xc4, 0xe2, 0x22, 0x9a, 0x8a, 0xde, 0xeb, 0x69, 0x7a, 0x17, 0x94, - 0x45, 0x01, 0x49, 0x72, 0x0f, 0x5a, 0x82, 0x64, 0x78, 0xcc, 0xde, 0xad, 0x8a, 0xe2, 0x8d, 0x34, - 0xc5, 0xd5, 0xf1, 0x7a, 0x06, 0x5d, 0x38, 0x4e, 0x50, 0x56, 0x0f, 0xe6, 0x26, 0x28, 0x17, 0x4a, - 0x82, 0x1f, 0x81, 0x96, 0x22, 0x18, 0x9d, 0x1d, 0x32, 0x54, 0x6f, 0xa5, 0xa9, 0xae, 0xab, 0xa8, - 0xb2, 0xd5, 0xe3, 0x2f, 0x47, 0xc4, 0xd0, 0x79, 0x5f, 0x8e, 0xd0, 0x74, 0x41, 0xcc, 0x81, 0x4b, - 0x9c, 0x58, 0xb6, 0x34, 0x91, 0x2b, 0xd8, 0xb7, 0xd3, 0xd4, 0xaf, 0x4e, 0xa9, 0x7b, 0x24, 0xe5, - 0xfc, 0x96, 0xe4, 0x3d, 0xf4, 0x2d, 0xf7, 0x48, 0x49, 0x7d, 0x35, 0x49, 0xbd, 0x29, 0x17, 0x3e, - 0x86, 0x4e, 0x62, 0xe1, 0xae, 0xef, 0x23, 0xb5, 0x82, 0xdf, 0x4c, 0xf3, 0x96, 0xf2, 0xa9, 0x89, - 0xb5, 0x92, 0xec, 0x6f, 0xca, 0xd0, 0x79, 0x8f, 0xb8, 0xe9, 0x1a, 0x2f, 0x86, 0xcd, 0x63, 0xa6, - 0xc1, 0x66, 0x54, 0x77, 0x32, 0x83, 0xe1, 0xa1, 0x99, 0xaa, 0xf4, 0xbf, 0x9c, 0x55, 0xf8, 0x6c, - 0x82, 0xd3, 0x2d, 0x18, 0xfa, 0x71, 0x5e, 0xf2, 0x63, 0xc3, 0x65, 0x9a, 0x30, 0x98, 0x7d, 0x14, - 0x22, 0xf5, 0x4e, 0xfc, 0x19, 0x5e, 0x4d, 0xee, 0x94, 0x7f, 0x4c, 0xee, 0x16, 0x8c, 0x8d, 0x41, - 0xfe, 0x21, 0xfa, 0x10, 0x36, 0x9e, 0x0c, 0xb1, 0x3f, 0x52, 0xef, 0x54, 0xce, 0xbe, 0xc9, 0xf7, - 0x29, 0xb6, 0x72, 0x9b, 0x8b, 0x4f, 0xd4, 0x20, 0xcd, 0x84, 0x75, 0x0f, 0x85, 0xc7, 0xea, 0x2d, - 0x78, 0xf1, 0x63, 0x6b, 0xdc, 0x0a, 0x95, 0x3b, 0xac, 0x79, 0x4a, 0x48, 0xdc, 0x24, 0xf9, 0xbc, - 0x04, 0xfa, 0x1e, 0x1a, 0x86, 0xc7, 0x3b, 0xbb, 0xbd, 0x1e, 0x0e, 0x82, 0x3b, 0xa4, 0x8f, 0xa7, - 0xf5, 0x39, 0x06, 0x36, 0x79, 0x2a, 0xab, 0xf2, 0xf4, 0xbf, 0xf6, 0x06, 0x0d, 0x08, 0xc4, 0xc3, - 0xf2, 0x48, 0x94, 0x2a, 0x8d, 0x70, 0xea, 0x07, 0x0c, 0x6e, 0x08, 0x3c, 0x9a, 0x35, 0xd1, 0x69, - 0xe2, 0x5b, 0xdf, 0x67, 0xfd, 0x09, 0x93, 0xfa, 0x6f, 0x71, 0x20, 0x4a, 0x01, 0x1e, 0xfb, 0x36, - 0x4d, 0x60, 0x42, 0xf2, 0x29, 0xe6, 0x48, 0x3c, 0xff, 0x6c, 0xb0, 0x09, 0x0a, 0x1c, 0x0b, 0x1e, - 0xb5, 0xd9, 0x32, 0xef, 0xb9, 0x82, 0xdf, 0x5f, 0x8a, 0xb0, 0x2e, 0x64, 0xe4, 0x79, 0xf6, 0x2c, - 0x1d, 0x95, 0xe7, 0x23, 0xa4, 0xd4, 0x73, 0x57, 0x26, 0x3f, 0x77, 0x75, 0xb6, 0xe7, 0x9e, 0xab, - 0xa7, 0xf1, 0xc3, 0x12, 0xac, 0x71, 0xc6, 0x1e, 0x38, 0xf4, 0xb9, 0xad, 0xf0, 0x3f, 0x4d, 0x33, - 0xfe, 0x05, 0x42, 0xf8, 0x73, 0x51, 0x0a, 0x61, 0x1f, 0x05, 0xc1, 0x53, 0xe2, 0xf7, 0xff, 0x07, - 0xde, 0xfc, 0xc7, 0xb0, 0x98, 0xe4, 0xeb, 0x19, 0xfa, 0x3d, 0x2c, 0x42, 0xe4, 0x24, 0xdc, 0x3f, - 0xaf, 0x40, 0x73, 0xcf, 0xc3, 0x3e, 0x92, 0x87, 0x4d, 0x56, 0xb7, 0x2f, 0xb2, 0x3a, 0x2d, 0x2f, - 0xd3, 0xeb, 0x50, 0x0f, 0x86, 0x8e, 0x83, 0xfc, 0x91, 0xcc, 0xb9, 0xc5, 0x70, 0x86, 0x9c, 0x3b, - 0x53, 0xae, 0xad, 0xcc, 0x55, 0xae, 0x7d, 0x09, 0x16, 0x89, 0xe4, 0xcd, 0xb4, 0xfa, 0x52, 0xbc, - 0xd1, 0xdc, 0x83, 0x7e, 0xaa, 0xf7, 0x53, 0x1b, 0xeb, 0xfd, 0x24, 0x7b, 0x46, 0xf5, 0xb1, 0x9e, - 0xd1, 0x57, 0x52, 0x3d, 0x9b, 0x06, 0x13, 0xdd, 0x86, 0x32, 0x3d, 0xe3, 0xa1, 0x3e, 0xd9, 0xad, - 0x79, 0x33, 0xd9, 0xad, 0x69, 0x66, 0x33, 0x3b, 0x99, 0xe0, 0xa4, 0x7a, 0x34, 0x89, 0xd6, 0x16, - 0xa4, 0x5b, 0x5b, 0x97, 0x01, 0xfa, 0xd8, 0xf3, 0x71, 0x0f, 0x85, 0xb8, 0x2f, 0x4e, 0xbd, 0x89, - 0x99, 0xb3, 0x75, 0x77, 0x54, 0xea, 0xd7, 0x9a, 0x47, 0xfd, 0x7e, 0x59, 0x84, 0x66, 0x9c, 0x45, - 0xdc, 0x86, 0xf6, 0x21, 0xe9, 0x27, 0xe2, 0xad, 0x48, 0x1c, 0x52, 0x09, 0x5e, 0x2a, 0xf1, 0xe8, - 0x16, 0x8c, 0xd6, 0x61, 0x2a, 0x13, 0x79, 0x08, 0x9a, 0x4b, 0x5c, 0x73, 0x8c, 0x0e, 0x4f, 0x0b, - 0x2e, 0xa5, 0x98, 0x1a, 0xcb, 0x61, 0xba, 0x05, 0xa3, 0xe3, 0x8e, 0xcd, 0xc5, 0xd1, 0xf3, 0x08, - 0x56, 0x55, 0x7d, 0x36, 0x6d, 0x6f, 0xb2, 0xbd, 0x6c, 0x64, 0xc4, 0x10, 0x27, 0xe6, 0x6a, 0x93, - 0xf9, 0xac, 0x08, 0xed, 0xb4, 0x76, 0x68, 0x5f, 0x82, 0xe6, 0xb8, 0x44, 0xd4, 0xb9, 0x7e, 0xb7, - 0x60, 0xc4, 0x98, 0x54, 0x9a, 0x9f, 0x04, 0xc4, 0xa5, 0x67, 0x30, 0x7e, 0x22, 0x53, 0xa5, 0xcb, - 0xa9, 0x23, 0x1b, 0x95, 0xe6, 0x27, 0xc9, 0x89, 0xf8, 0xf9, 0x7f, 0x5f, 0x86, 0x46, 0x74, 0x74, - 0x50, 0x9c, 0xec, 0x5e, 0x83, 0xf2, 0x11, 0x0e, 0x55, 0x27, 0x91, 0xc8, 0xfe, 0x0d, 0x8a, 0x41, - 0x11, 0xbd, 0x61, 0x28, 0xfc, 0x63, 0x1e, 0xa2, 0x37, 0x0c, 0xb5, 0xeb, 0x50, 0xf1, 0x48, 0x20, - 0x3b, 0x40, 0x39, 0x98, 0x0c, 0x45, 0xbb, 0x09, 0xb5, 0x3e, 0xb6, 0x71, 0x88, 0xc5, 0x89, 0x3a, - 0x07, 0x59, 0x20, 0x69, 0xb7, 0xa0, 0x4e, 0x3c, 0xde, 0x86, 0xac, 0x4d, 0xc2, 0x97, 0x58, 0x94, - 0x15, 0x9a, 0x92, 0x8a, 0x22, 0x57, 0x1e, 0x2b, 0x14, 0x85, 0x9e, 0xc9, 0x3c, 0x14, 0xf6, 0x8e, - 0x45, 0xfb, 0x22, 0x07, 0x97, 0xe3, 0x8c, 0xb9, 0x89, 0xe6, 0x5c, 0x6e, 0xe2, 0xcc, 0x1d, 0xa4, - 0xbf, 0x56, 0x61, 0x4d, 0x9d, 0x4d, 0x9e, 0xd7, 0x18, 0xcf, 0x6b, 0x8c, 0xff, 0xed, 0x35, 0xc6, - 0xa7, 0x50, 0x65, 0x17, 0x34, 0x94, 0x94, 0x8a, 0x73, 0x50, 0xd2, 0x6e, 0x42, 0x85, 0xdd, 0x36, - 0x29, 0xb1, 0x45, 0xeb, 0x0a, 0x87, 0x2f, 0xea, 0x26, 0x0c, 0x6d, 0xeb, 0x67, 0x55, 0x58, 0x1a, - 0xd3, 0xda, 0xf3, 0x9e, 0xd4, 0x79, 0x4f, 0xea, 0x4c, 0x3d, 0x29, 0x95, 0x0e, 0x6b, 0xf3, 0x58, - 0xc3, 0xb7, 0x01, 0xe2, 0x14, 0xe4, 0x39, 0xdf, 0xf9, 0xfa, 0x55, 0x0d, 0x2e, 0xe6, 0x14, 0x46, - 0xce, 0xaf, 0x29, 0x9c, 0x5f, 0x53, 0x38, 0xbf, 0xa6, 0x10, 0x9b, 0xe1, 0xdf, 0x8b, 0xd0, 0x88, - 0xca, 0xe9, 0xd3, 0x2f, 0x76, 0x6d, 0x47, 0xdd, 0x19, 0x9e, 0x76, 0xaf, 0x65, 0x6b, 0xd6, 0x2c, - 0xf0, 0xc8, 0xab, 0xaf, 0x37, 0xa1, 0xce, 0x2b, 0xab, 0x32, 0x78, 0xac, 0x64, 0x0b, 0xb2, 0x81, - 0x21, 0x71, 0xb4, 0x37, 0xa0, 0x21, 0xae, 0x2b, 0xc9, 0x93, 0xf5, 0x6a, 0xfa, 0x64, 0xcd, 0x61, - 0x46, 0x84, 0x75, 0xf6, 0x3b, 0xcd, 0x18, 0x56, 0x14, 0x97, 0x11, 0xb5, 0xf7, 0x26, 0x3b, 0xa4, - 0x6c, 0xcc, 0x8d, 0x5a, 0x0b, 0x6a, 0x97, 0xf4, 0x93, 0x22, 0xb4, 0xd2, 0x5d, 0x86, 0x1d, 0xea, - 0x88, 0xf8, 0x44, 0x74, 0x7b, 0x5c, 0x71, 0xe6, 0xee, 0x16, 0x8c, 0x08, 0xef, 0xf9, 0x9e, 0xaf, - 0x7e, 0x5a, 0x84, 0x66, 0x74, 0xb2, 0xd7, 0xee, 0x40, 0x4b, 0x6e, 0x63, 0xf6, 0x48, 0x1f, 0x8b, - 0x07, 0xbd, 0x9c, 0xfb, 0xa0, 0xbc, 0xdb, 0xb1, 0x28, 0x17, 0xdd, 0x21, 0x7d, 0x75, 0x2b, 0xb0, - 0x34, 0xcf, 0xdb, 0xf8, 0x75, 0x13, 0x6a, 0xc2, 0x51, 0x2b, 0x4e, 0x7c, 0x79, 0x09, 0x4a, 0xd4, - 0x5b, 0x2d, 0x4f, 0xb8, 0xf4, 0x57, 0x99, 0x78, 0xe9, 0x6f, 0x5a, 0xe2, 0x31, 0x66, 0x89, 0xb5, - 0x8c, 0x25, 0x26, 0x5c, 0x62, 0x7d, 0x06, 0x97, 0xd8, 0x98, 0xee, 0x12, 0x9b, 0x33, 0xb8, 0x44, - 0x98, 0xc9, 0x25, 0x2e, 0x4c, 0x76, 0x89, 0x8b, 0x13, 0x5c, 0x62, 0x6b, 0x82, 0x4b, 0x6c, 0x4f, - 0x72, 0x89, 0x4b, 0x53, 0x5c, 0x62, 0x27, 0xeb, 0x12, 0x5f, 0x81, 0x36, 0x25, 0x9e, 0x30, 0x36, - 0x7e, 0x12, 0x68, 0x39, 0xe8, 0x34, 0x91, 0x2b, 0x50, 0x34, 0xcb, 0x4d, 0xa2, 0x69, 0x02, 0xcd, - 0x72, 0x13, 0x68, 0xc9, 0x40, 0xbf, 0x32, 0x76, 0x4d, 0x73, 0xa6, 0x13, 0xc1, 0x47, 0x79, 0x2e, - 0xe0, 0x42, 0xb6, 0xb5, 0x94, 0xf7, 0xe9, 0x89, 0xda, 0x1b, 0x68, 0xd7, 0x44, 0xd8, 0x5f, 0xcb, - 0xda, 0xfd, 0xa3, 0x91, 0x87, 0x79, 0xee, 0xce, 0x92, 0x81, 0xd7, 0x65, 0xd0, 0xbf, 0x98, 0x3d, - 0xdc, 0x47, 0x4d, 0x73, 0x19, 0xee, 0xaf, 0x43, 0x0d, 0xd9, 0x36, 0xd5, 0x4f, 0x3d, 0xb7, 0x77, - 0x5e, 0x45, 0xb6, 0xbd, 0x37, 0xd0, 0xbe, 0x0c, 0x90, 0x78, 0xa2, 0xf5, 0xac, 0x33, 0x8f, 0xb9, - 0x35, 0x12, 0x98, 0xda, 0xcb, 0xd0, 0xea, 0x5b, 0xd4, 0x82, 0x1c, 0xcb, 0x45, 0x21, 0xf1, 0xf5, - 0x0d, 0xa6, 0x20, 0xe9, 0xc9, 0xf4, 0x95, 0xd7, 0xcd, 0xb1, 0x2b, 0xaf, 0x2f, 0x41, 0xf9, 0xd4, - 0xb1, 0xf5, 0x4b, 0x59, 0x8b, 0xfb, 0xd0, 0xb1, 0x0d, 0x0a, 0xcb, 0x96, 0x59, 0x5f, 0x78, 0xd6, - 0x5b, 0xb1, 0x97, 0x9f, 0xe1, 0x56, 0xec, 0x8b, 0xf3, 0x78, 0xac, 0x1f, 0x00, 0xc4, 0x71, 0x6f, - 0xce, 0x2f, 0x8d, 0xde, 0x86, 0x85, 0x81, 0x65, 0x63, 0x33, 0x3f, 0xa4, 0xc6, 0x37, 0x9e, 0xbb, - 0x05, 0x03, 0x06, 0xd1, 0x28, 0xf6, 0xe2, 0x21, 0xac, 0x28, 0xba, 0xb9, 0xda, 0x77, 0x27, 0xc7, - 0xaf, 0x6b, 0xd9, 0x84, 0x3a, 0xa7, 0x25, 0xac, 0x0e, 0x67, 0x7f, 0xaa, 0xc0, 0xc5, 0xbc, 0x66, - 0xb4, 0x03, 0x2f, 0x1c, 0xa2, 0xc0, 0xea, 0x99, 0x28, 0xf5, 0x95, 0x90, 0x19, 0xd5, 0x7c, 0xb9, - 0x68, 0x5e, 0x4b, 0x55, 0x58, 0xf3, 0xbf, 0x2a, 0xea, 0x16, 0x8c, 0xcd, 0xc3, 0x09, 0x1f, 0x1d, - 0xdd, 0x87, 0x0e, 0xf2, 0x2c, 0xf3, 0x53, 0x3c, 0x8a, 0x77, 0xe0, 0x92, 0x4c, 0xd5, 0xb5, 0xd2, - 0x5f, 0x59, 0x75, 0x0b, 0x46, 0x1b, 0xa5, 0xbf, 0xbb, 0xfa, 0x1e, 0xe8, 0x84, 0xb5, 0x25, 0x4c, - 0x4b, 0x34, 0xa4, 0x62, 0x7a, 0xe5, 0x6c, 0x57, 0x54, 0xdd, 0xbb, 0xea, 0x16, 0x8c, 0x35, 0xa2, - 0xee, 0x6a, 0xc5, 0xf4, 0x3d, 0xd1, 0xeb, 0x89, 0xe9, 0x57, 0xf2, 0xe8, 0x8f, 0xb7, 0x85, 0x62, - 0xfa, 0x99, 0x86, 0xd1, 0x11, 0x6c, 0x0a, 0xfa, 0x28, 0x6e, 0x24, 0xc6, 0x5b, 0xf0, 0x00, 0xf7, - 0x4a, 0x76, 0x0b, 0x45, 0xdb, 0xb1, 0x5b, 0x30, 0xd6, 0x49, 0x6e, 0x4f, 0x12, 0xc7, 0x1b, 0xb1, - 0xae, 0x2e, 0x4b, 0x17, 0xe2, 0x8d, 0x6a, 0x59, 0xef, 0x98, 0xd7, 0x03, 0xee, 0x16, 0x0c, 0x21, - 0x93, 0x2c, 0x2c, 0xd6, 0xf0, 0xe3, 0x58, 0xc3, 0x13, 0x2d, 0x01, 0xed, 0xfd, 0xc9, 0x1a, 0x7e, - 0x29, 0xa7, 0x6d, 0xc4, 0x2f, 0x16, 0xa8, 0xb5, 0xfa, 0x2a, 0x2c, 0x24, 0x6f, 0x2e, 0xac, 0xc6, - 0x1f, 0xf7, 0x95, 0xe3, 0x3b, 0x0e, 0xbf, 0x2d, 0x42, 0xf9, 0x11, 0x52, 0xdf, 0x8a, 0x98, 0xfe, - 0xb1, 0x5b, 0xc6, 0xb3, 0x95, 0xcf, 0xfc, 0x8d, 0xc8, 0x5c, 0x5f, 0x70, 0x5d, 0x81, 0x86, 0x8c, - 0x30, 0x39, 0xcf, 0xf7, 0x31, 0x2c, 0x7d, 0x30, 0x56, 0x6f, 0x7a, 0x8e, 0x1f, 0x93, 0xfc, 0xae, - 0x08, 0xe5, 0x0f, 0x1d, 0x5b, 0x29, 0xbd, 0x4b, 0xd0, 0xa4, 0xbf, 0x81, 0x87, 0x7a, 0xf2, 0x5e, - 0x49, 0x3c, 0x41, 0x93, 0x3f, 0xcf, 0xc7, 0x03, 0xeb, 0x54, 0x64, 0x79, 0x62, 0x44, 0x57, 0xa1, - 0x30, 0xf4, 0xad, 0xc3, 0x61, 0x88, 0xc5, 0x67, 0x7a, 0xf1, 0x04, 0x4d, 0x65, 0x9e, 0xfa, 0xc8, - 0xf3, 0x70, 0x5f, 0x1c, 0xc1, 0xe5, 0xf0, 0xcc, 0x7d, 0xcc, 0xdb, 0xaf, 0x42, 0x9b, 0xf8, 0x47, - 0x12, 0xd7, 0x3c, 0xd9, 0xb9, 0xbd, 0x28, 0xbe, 0x5d, 0xdd, 0xf7, 0x49, 0x48, 0xf6, 0x8b, 0xbf, - 0x28, 0x95, 0xf7, 0x76, 0x0f, 0x0e, 0x6b, 0xec, 0x63, 0xd0, 0x37, 0xff, 0x19, 0x00, 0x00, 0xff, - 0xff, 0xd4, 0x0a, 0xef, 0xca, 0xe4, 0x3a, 0x00, 0x00, +func (x *Xml) GetVendorExtension() []*NamedAny { + if x != nil { + return x.VendorExtension + } + return nil +} + +var File_openapiv2_OpenAPIv2_proto protoreflect.FileDescriptor + +var file_openapiv2_OpenAPIv2_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x4f, 0x70, 0x65, 0x6e, + 0x41, 0x50, 0x49, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x6d, 0x0a, 0x18, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x2c, + 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x48, 0x00, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1a, 0x0a, 0x07, + 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, + 0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, + 0x66, 0x22, 0x45, 0x0a, 0x03, 0x41, 0x6e, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x22, 0xab, 0x01, 0x0a, 0x0e, 0x41, 0x70, 0x69, + 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, + 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, 0x0a, 0x1b, 0x42, 0x61, 0x73, 0x69, 0x63, + 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x10, + 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, + 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xde, 0x01, + 0x0a, 0x0d, 0x42, 0x6f, 0x64, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x3f, 0x0a, + 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, + 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x86, + 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, + 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, + 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, + 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x54, 0x0a, 0x07, 0x44, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x12, 0x49, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, + 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x5b, 0x0a, + 0x0b, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4c, 0x0a, 0x15, + 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xe8, 0x05, 0x0a, 0x08, 0x44, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, + 0x72, 0x12, 0x24, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, + 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x62, 0x61, 0x73, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x61, + 0x74, 0x68, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x73, 0x52, 0x05, 0x70, 0x61, + 0x74, 0x68, 0x73, 0x12, 0x39, 0x0a, 0x0b, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x0b, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x40, + 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x12, 0x3d, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, + 0x3b, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x52, 0x0a, 0x14, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x23, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x52, + 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x44, 0x6f, 0x63, 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, + 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x55, 0x0a, 0x08, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x73, 0x12, 0x49, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, + 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x83, 0x01, 0x0a, + 0x0c, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, + 0x6c, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, + 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x22, 0xff, 0x02, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x29, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x41, 0x6e, 0x79, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, + 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x29, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, + 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xab, 0x06, 0x0a, 0x1a, 0x46, 0x6f, 0x72, 0x6d, 0x44, 0x61, 0x74, + 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x6e, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x31, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, + 0x69, 0x76, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x29, 0x0a, + 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, + 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, + 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, + 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, + 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, + 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, + 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, + 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, + 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, + 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x65, + 0x6e, 0x75, 0x6d, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, + 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, + 0x66, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, + 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x22, 0xab, 0x05, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x11, + 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x29, 0x0a, 0x07, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, + 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x69, + 0x6d, 0x75, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, + 0x73, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, + 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x69, + 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, + 0x76, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, + 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, + 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, + 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, + 0x74, 0x65, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x71, + 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, + 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x11, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, 0x66, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, + 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0xfd, 0x05, 0x0a, 0x18, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1a, 0x0a, + 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, + 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2b, + 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x29, 0x0a, 0x07, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, + 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, + 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, + 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, + 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, + 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x69, 0x6e, + 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, + 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, + 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, + 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, + 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x65, 0x6e, 0x75, + 0x6d, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x1f, + 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x15, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, 0x66, 0x12, + 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, + 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0x57, 0x0a, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x4c, 0x0a, 0x15, 0x61, + 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xa1, 0x02, 0x0a, 0x04, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x5f, 0x6f, 0x66, + 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x74, 0x65, 0x72, 0x6d, 0x73, 0x4f, 0x66, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2d, + 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, + 0x74, 0x61, 0x63, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x2d, 0x0a, + 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x63, 0x65, + 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x10, + 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, + 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x37, 0x0a, + 0x09, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x44, 0x0a, 0x0d, 0x4a, 0x73, 0x6f, 0x6e, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x11, 0x0a, 0x04, 0x5f, 0x72, 0x65, 0x66, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x52, 0x65, 0x66, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x70, 0x0a, 0x07, + 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x3f, 0x0a, + 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, + 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x45, + 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4b, 0x0a, 0x0b, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x51, 0x0a, 0x0e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4f, 0x0a, 0x0d, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x61, + 0x74, 0x68, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x49, 0x74, 0x65, 0x6d, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4f, 0x0a, 0x0d, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x59, 0x0a, 0x12, 0x4e, 0x61, 0x6d, 0x65, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x4b, 0x0a, 0x0b, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x6d, 0x0a, 0x1c, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x37, + 0x0a, 0x0b, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x55, 0x0a, 0x10, 0x4e, 0x61, 0x6d, 0x65, 0x64, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb5, + 0x03, 0x0a, 0x10, 0x4e, 0x6f, 0x6e, 0x42, 0x6f, 0x64, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x12, 0x65, 0x0a, 0x1b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x48, 0x00, + 0x52, 0x18, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x6c, 0x0a, 0x1e, 0x66, 0x6f, + 0x72, 0x6d, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x46, 0x6f, 0x72, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x48, 0x00, 0x52, 0x1a, 0x66, 0x6f, + 0x72, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, + 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x62, 0x0a, 0x1a, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x5f, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x48, 0x00, 0x52, 0x17, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x5f, 0x0a, 0x19, + 0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x73, + 0x75, 0x62, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x74, + 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x48, 0x00, 0x52, 0x16, 0x70, 0x61, 0x74, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x42, 0x07, 0x0a, + 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0xa1, 0x02, 0x0a, 0x18, 0x4f, 0x61, 0x75, 0x74, 0x68, + 0x32, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x30, 0x0a, 0x06, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x2b, 0x0a, + 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, + 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, + 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, + 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xf5, 0x01, 0x0a, 0x19, 0x4f, + 0x61, 0x75, 0x74, 0x68, 0x32, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x6c, 0x6f, 0x77, + 0x12, 0x30, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x61, + 0x75, 0x74, 0x68, 0x32, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, + 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x22, 0x82, 0x02, 0x0a, 0x16, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x49, 0x6d, 0x70, + 0x6c, 0x69, 0x63, 0x69, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x52, + 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, + 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, + 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xf2, 0x01, 0x0a, 0x16, 0x4f, 0x61, 0x75, 0x74, + 0x68, 0x32, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x63, + 0x6f, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x53, 0x63, + 0x6f, 0x70, 0x65, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x10, 0x76, + 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, + 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5c, 0x0a, 0x0c, + 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x15, + 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x9e, 0x04, 0x0a, 0x09, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, + 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, + 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x49, 0x74, + 0x65, 0x6d, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x33, + 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x0a, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x12, 0x1e, 0x0a, + 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x3b, 0x0a, + 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, + 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0d, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, + 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa6, 0x01, 0x0a, 0x09, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0e, 0x62, 0x6f, 0x64, + 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x42, + 0x6f, 0x64, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, + 0x62, 0x6f, 0x64, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x4c, 0x0a, + 0x12, 0x6e, 0x6f, 0x6e, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x6f, 0x6e, 0x42, 0x6f, 0x64, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x6e, 0x6f, 0x6e, 0x42, 0x6f, + 0x64, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x6f, + 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x67, 0x0a, 0x14, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4f, 0x0a, 0x15, + 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x94, 0x01, + 0x0a, 0x0e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x49, 0x74, 0x65, 0x6d, + 0x12, 0x35, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0e, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4a, 0x73, 0x6f, + 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x6a, 0x73, + 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x6f, + 0x6e, 0x65, 0x6f, 0x66, 0x22, 0xcf, 0x03, 0x0a, 0x08, 0x50, 0x61, 0x74, 0x68, 0x49, 0x74, 0x65, + 0x6d, 0x12, 0x11, 0x0a, 0x04, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x52, 0x65, 0x66, 0x12, 0x27, 0x0a, 0x03, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, + 0x03, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x03, 0x70, 0x75, 0x74, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x70, 0x6f, 0x73, + 0x74, 0x12, 0x2d, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x29, 0x0a, 0x04, 0x68, 0x65, 0x61, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x68, 0x65, 0x61, 0x64, 0x12, 0x2b, 0x0a, 0x05, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3a, 0x0a, 0x0a, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, + 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xfb, 0x05, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x68, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, + 0x31, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, 0x6d, + 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, + 0x29, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, + 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, + 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, + 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, + 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, + 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, + 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x61, + 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x69, 0x6e, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, + 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, + 0x69, 0x71, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x23, 0x0a, + 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x65, 0x6e, + 0x75, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, + 0x66, 0x18, 0x15, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, + 0x65, 0x4f, 0x66, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, + 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x77, 0x0a, 0x05, 0x50, 0x61, 0x74, 0x68, 0x73, 0x12, 0x3f, 0x0a, + 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, + 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2d, + 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50, + 0x61, 0x74, 0x68, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x92, 0x05, + 0x0a, 0x0f, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, + 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x31, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, + 0x69, 0x76, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x29, 0x0a, + 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, + 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, + 0x6d, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, + 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, + 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, + 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, + 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, + 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, + 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, + 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x65, + 0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, + 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, + 0x66, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, + 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x22, 0x5a, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x12, 0x4c, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, + 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xa8, + 0x06, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x73, + 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x12, 0x29, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, + 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, + 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, + 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, + 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, + 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, + 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, + 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, + 0x6d, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, + 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x16, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, + 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, 0x66, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, + 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x17, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xfe, 0x01, 0x0a, 0x08, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x49, 0x74, 0x65, 0x6d, + 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2d, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x07, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x52, + 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, + 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, + 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x65, 0x0a, 0x13, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x4e, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, + 0x6d, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x22, 0x90, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0e, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4a, 0x73, 0x6f, + 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x6a, 0x73, + 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x6f, + 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x91, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, + 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, + 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xaf, 0x09, 0x0a, 0x06, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x12, 0x11, 0x0a, 0x04, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x52, 0x65, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, + 0x4f, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, + 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, + 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, + 0x76, 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, + 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, + 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, + 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, + 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, + 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, + 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, + 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6d, + 0x61, 0x78, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, + 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x12, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, + 0x13, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, + 0x23, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, + 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x59, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x15, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, + 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x49, + 0x74, 0x65, 0x6d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x29, 0x0a, 0x06, 0x61, 0x6c, 0x6c, 0x5f, 0x6f, 0x66, + 0x18, 0x18, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x05, 0x61, 0x6c, 0x6c, 0x4f, + 0x66, 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, + 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x69, 0x73, + 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x1b, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x21, 0x0a, 0x03, + 0x78, 0x6d, 0x6c, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x58, 0x6d, 0x6c, 0x52, 0x03, 0x78, 0x6d, 0x6c, 0x12, + 0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, + 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, + 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x29, + 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, + 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x1f, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, + 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x7e, 0x0a, 0x0a, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x48, 0x00, 0x52, 0x06, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x39, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x74, 0x0a, 0x13, 0x53, 0x65, + 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x5d, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, + 0x6d, 0x65, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x22, 0xe9, 0x04, 0x0a, 0x17, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x6d, 0x0a, 0x1d, + 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x1b, + 0x62, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x46, 0x0a, 0x10, 0x61, + 0x70, 0x69, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x12, 0x5e, 0x0a, 0x18, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x5f, 0x69, 0x6d, + 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x49, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x69, + 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x16, 0x6f, 0x61, 0x75, + 0x74, 0x68, 0x32, 0x49, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x12, 0x5e, 0x0a, 0x18, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x5f, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x16, 0x6f, 0x61, 0x75, + 0x74, 0x68, 0x32, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x12, 0x67, 0x0a, 0x1b, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x5f, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x41, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x48, + 0x00, 0x52, 0x19, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x65, 0x0a, 0x1b, + 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, + 0x64, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, + 0x61, 0x75, 0x74, 0x68, 0x32, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x53, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x18, 0x6f, 0x61, 0x75, 0x74, 0x68, + 0x32, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x68, 0x0a, 0x13, + 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, + 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x23, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xbb, 0x01, 0x0a, 0x03, + 0x54, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, + 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x0a, 0x08, 0x54, 0x79, 0x70, + 0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5c, 0x0a, 0x0f, 0x56, + 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x49, + 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, + 0x41, 0x6e, 0x79, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xc8, 0x01, 0x0a, 0x03, 0x58, 0x6d, + 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x72, 0x61, + 0x70, 0x70, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x77, 0x72, 0x61, 0x70, + 0x70, 0x65, 0x64, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, + 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x3c, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x5f, 0x76, 0x32, 0x42, 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x14, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x3b, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x4f, + 0x41, 0x53, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_openapiv2_OpenAPIv2_proto_rawDescOnce sync.Once + file_openapiv2_OpenAPIv2_proto_rawDescData = file_openapiv2_OpenAPIv2_proto_rawDesc +) + +func file_openapiv2_OpenAPIv2_proto_rawDescGZIP() []byte { + file_openapiv2_OpenAPIv2_proto_rawDescOnce.Do(func() { + file_openapiv2_OpenAPIv2_proto_rawDescData = protoimpl.X.CompressGZIP(file_openapiv2_OpenAPIv2_proto_rawDescData) + }) + return file_openapiv2_OpenAPIv2_proto_rawDescData +} + +var file_openapiv2_OpenAPIv2_proto_msgTypes = make([]protoimpl.MessageInfo, 60) +var file_openapiv2_OpenAPIv2_proto_goTypes = []interface{}{ + (*AdditionalPropertiesItem)(nil), // 0: openapi.v2.AdditionalPropertiesItem + (*Any)(nil), // 1: openapi.v2.Any + (*ApiKeySecurity)(nil), // 2: openapi.v2.ApiKeySecurity + (*BasicAuthenticationSecurity)(nil), // 3: openapi.v2.BasicAuthenticationSecurity + (*BodyParameter)(nil), // 4: openapi.v2.BodyParameter + (*Contact)(nil), // 5: openapi.v2.Contact + (*Default)(nil), // 6: openapi.v2.Default + (*Definitions)(nil), // 7: openapi.v2.Definitions + (*Document)(nil), // 8: openapi.v2.Document + (*Examples)(nil), // 9: openapi.v2.Examples + (*ExternalDocs)(nil), // 10: openapi.v2.ExternalDocs + (*FileSchema)(nil), // 11: openapi.v2.FileSchema + (*FormDataParameterSubSchema)(nil), // 12: openapi.v2.FormDataParameterSubSchema + (*Header)(nil), // 13: openapi.v2.Header + (*HeaderParameterSubSchema)(nil), // 14: openapi.v2.HeaderParameterSubSchema + (*Headers)(nil), // 15: openapi.v2.Headers + (*Info)(nil), // 16: openapi.v2.Info + (*ItemsItem)(nil), // 17: openapi.v2.ItemsItem + (*JsonReference)(nil), // 18: openapi.v2.JsonReference + (*License)(nil), // 19: openapi.v2.License + (*NamedAny)(nil), // 20: openapi.v2.NamedAny + (*NamedHeader)(nil), // 21: openapi.v2.NamedHeader + (*NamedParameter)(nil), // 22: openapi.v2.NamedParameter + (*NamedPathItem)(nil), // 23: openapi.v2.NamedPathItem + (*NamedResponse)(nil), // 24: openapi.v2.NamedResponse + (*NamedResponseValue)(nil), // 25: openapi.v2.NamedResponseValue + (*NamedSchema)(nil), // 26: openapi.v2.NamedSchema + (*NamedSecurityDefinitionsItem)(nil), // 27: openapi.v2.NamedSecurityDefinitionsItem + (*NamedString)(nil), // 28: openapi.v2.NamedString + (*NamedStringArray)(nil), // 29: openapi.v2.NamedStringArray + (*NonBodyParameter)(nil), // 30: openapi.v2.NonBodyParameter + (*Oauth2AccessCodeSecurity)(nil), // 31: openapi.v2.Oauth2AccessCodeSecurity + (*Oauth2ApplicationSecurity)(nil), // 32: openapi.v2.Oauth2ApplicationSecurity + (*Oauth2ImplicitSecurity)(nil), // 33: openapi.v2.Oauth2ImplicitSecurity + (*Oauth2PasswordSecurity)(nil), // 34: openapi.v2.Oauth2PasswordSecurity + (*Oauth2Scopes)(nil), // 35: openapi.v2.Oauth2Scopes + (*Operation)(nil), // 36: openapi.v2.Operation + (*Parameter)(nil), // 37: openapi.v2.Parameter + (*ParameterDefinitions)(nil), // 38: openapi.v2.ParameterDefinitions + (*ParametersItem)(nil), // 39: openapi.v2.ParametersItem + (*PathItem)(nil), // 40: openapi.v2.PathItem + (*PathParameterSubSchema)(nil), // 41: openapi.v2.PathParameterSubSchema + (*Paths)(nil), // 42: openapi.v2.Paths + (*PrimitivesItems)(nil), // 43: openapi.v2.PrimitivesItems + (*Properties)(nil), // 44: openapi.v2.Properties + (*QueryParameterSubSchema)(nil), // 45: openapi.v2.QueryParameterSubSchema + (*Response)(nil), // 46: openapi.v2.Response + (*ResponseDefinitions)(nil), // 47: openapi.v2.ResponseDefinitions + (*ResponseValue)(nil), // 48: openapi.v2.ResponseValue + (*Responses)(nil), // 49: openapi.v2.Responses + (*Schema)(nil), // 50: openapi.v2.Schema + (*SchemaItem)(nil), // 51: openapi.v2.SchemaItem + (*SecurityDefinitions)(nil), // 52: openapi.v2.SecurityDefinitions + (*SecurityDefinitionsItem)(nil), // 53: openapi.v2.SecurityDefinitionsItem + (*SecurityRequirement)(nil), // 54: openapi.v2.SecurityRequirement + (*StringArray)(nil), // 55: openapi.v2.StringArray + (*Tag)(nil), // 56: openapi.v2.Tag + (*TypeItem)(nil), // 57: openapi.v2.TypeItem + (*VendorExtension)(nil), // 58: openapi.v2.VendorExtension + (*Xml)(nil), // 59: openapi.v2.Xml + (*any.Any)(nil), // 60: google.protobuf.Any +} +var file_openapiv2_OpenAPIv2_proto_depIdxs = []int32{ + 50, // 0: openapi.v2.AdditionalPropertiesItem.schema:type_name -> openapi.v2.Schema + 60, // 1: openapi.v2.Any.value:type_name -> google.protobuf.Any + 20, // 2: openapi.v2.ApiKeySecurity.vendor_extension:type_name -> openapi.v2.NamedAny + 20, // 3: openapi.v2.BasicAuthenticationSecurity.vendor_extension:type_name -> openapi.v2.NamedAny + 50, // 4: openapi.v2.BodyParameter.schema:type_name -> openapi.v2.Schema + 20, // 5: openapi.v2.BodyParameter.vendor_extension:type_name -> openapi.v2.NamedAny + 20, // 6: openapi.v2.Contact.vendor_extension:type_name -> openapi.v2.NamedAny + 20, // 7: openapi.v2.Default.additional_properties:type_name -> openapi.v2.NamedAny + 26, // 8: openapi.v2.Definitions.additional_properties:type_name -> openapi.v2.NamedSchema + 16, // 9: openapi.v2.Document.info:type_name -> openapi.v2.Info + 42, // 10: openapi.v2.Document.paths:type_name -> openapi.v2.Paths + 7, // 11: openapi.v2.Document.definitions:type_name -> openapi.v2.Definitions + 38, // 12: openapi.v2.Document.parameters:type_name -> openapi.v2.ParameterDefinitions + 47, // 13: openapi.v2.Document.responses:type_name -> openapi.v2.ResponseDefinitions + 54, // 14: openapi.v2.Document.security:type_name -> openapi.v2.SecurityRequirement + 52, // 15: openapi.v2.Document.security_definitions:type_name -> openapi.v2.SecurityDefinitions + 56, // 16: openapi.v2.Document.tags:type_name -> openapi.v2.Tag + 10, // 17: openapi.v2.Document.external_docs:type_name -> openapi.v2.ExternalDocs + 20, // 18: openapi.v2.Document.vendor_extension:type_name -> openapi.v2.NamedAny + 20, // 19: openapi.v2.Examples.additional_properties:type_name -> openapi.v2.NamedAny + 20, // 20: openapi.v2.ExternalDocs.vendor_extension:type_name -> openapi.v2.NamedAny + 1, // 21: openapi.v2.FileSchema.default:type_name -> openapi.v2.Any + 10, // 22: openapi.v2.FileSchema.external_docs:type_name -> openapi.v2.ExternalDocs + 1, // 23: openapi.v2.FileSchema.example:type_name -> openapi.v2.Any + 20, // 24: openapi.v2.FileSchema.vendor_extension:type_name -> openapi.v2.NamedAny + 43, // 25: openapi.v2.FormDataParameterSubSchema.items:type_name -> openapi.v2.PrimitivesItems + 1, // 26: openapi.v2.FormDataParameterSubSchema.default:type_name -> openapi.v2.Any + 1, // 27: openapi.v2.FormDataParameterSubSchema.enum:type_name -> openapi.v2.Any + 20, // 28: openapi.v2.FormDataParameterSubSchema.vendor_extension:type_name -> openapi.v2.NamedAny + 43, // 29: openapi.v2.Header.items:type_name -> openapi.v2.PrimitivesItems + 1, // 30: openapi.v2.Header.default:type_name -> openapi.v2.Any + 1, // 31: openapi.v2.Header.enum:type_name -> openapi.v2.Any + 20, // 32: openapi.v2.Header.vendor_extension:type_name -> openapi.v2.NamedAny + 43, // 33: openapi.v2.HeaderParameterSubSchema.items:type_name -> openapi.v2.PrimitivesItems + 1, // 34: openapi.v2.HeaderParameterSubSchema.default:type_name -> openapi.v2.Any + 1, // 35: openapi.v2.HeaderParameterSubSchema.enum:type_name -> openapi.v2.Any + 20, // 36: openapi.v2.HeaderParameterSubSchema.vendor_extension:type_name -> openapi.v2.NamedAny + 21, // 37: openapi.v2.Headers.additional_properties:type_name -> openapi.v2.NamedHeader + 5, // 38: openapi.v2.Info.contact:type_name -> openapi.v2.Contact + 19, // 39: openapi.v2.Info.license:type_name -> openapi.v2.License + 20, // 40: openapi.v2.Info.vendor_extension:type_name -> openapi.v2.NamedAny + 50, // 41: openapi.v2.ItemsItem.schema:type_name -> openapi.v2.Schema + 20, // 42: openapi.v2.License.vendor_extension:type_name -> openapi.v2.NamedAny + 1, // 43: openapi.v2.NamedAny.value:type_name -> openapi.v2.Any + 13, // 44: openapi.v2.NamedHeader.value:type_name -> openapi.v2.Header + 37, // 45: openapi.v2.NamedParameter.value:type_name -> openapi.v2.Parameter + 40, // 46: openapi.v2.NamedPathItem.value:type_name -> openapi.v2.PathItem + 46, // 47: openapi.v2.NamedResponse.value:type_name -> openapi.v2.Response + 48, // 48: openapi.v2.NamedResponseValue.value:type_name -> openapi.v2.ResponseValue + 50, // 49: openapi.v2.NamedSchema.value:type_name -> openapi.v2.Schema + 53, // 50: openapi.v2.NamedSecurityDefinitionsItem.value:type_name -> openapi.v2.SecurityDefinitionsItem + 55, // 51: openapi.v2.NamedStringArray.value:type_name -> openapi.v2.StringArray + 14, // 52: openapi.v2.NonBodyParameter.header_parameter_sub_schema:type_name -> openapi.v2.HeaderParameterSubSchema + 12, // 53: openapi.v2.NonBodyParameter.form_data_parameter_sub_schema:type_name -> openapi.v2.FormDataParameterSubSchema + 45, // 54: openapi.v2.NonBodyParameter.query_parameter_sub_schema:type_name -> openapi.v2.QueryParameterSubSchema + 41, // 55: openapi.v2.NonBodyParameter.path_parameter_sub_schema:type_name -> openapi.v2.PathParameterSubSchema + 35, // 56: openapi.v2.Oauth2AccessCodeSecurity.scopes:type_name -> openapi.v2.Oauth2Scopes + 20, // 57: openapi.v2.Oauth2AccessCodeSecurity.vendor_extension:type_name -> openapi.v2.NamedAny + 35, // 58: openapi.v2.Oauth2ApplicationSecurity.scopes:type_name -> openapi.v2.Oauth2Scopes + 20, // 59: openapi.v2.Oauth2ApplicationSecurity.vendor_extension:type_name -> openapi.v2.NamedAny + 35, // 60: openapi.v2.Oauth2ImplicitSecurity.scopes:type_name -> openapi.v2.Oauth2Scopes + 20, // 61: openapi.v2.Oauth2ImplicitSecurity.vendor_extension:type_name -> openapi.v2.NamedAny + 35, // 62: openapi.v2.Oauth2PasswordSecurity.scopes:type_name -> openapi.v2.Oauth2Scopes + 20, // 63: openapi.v2.Oauth2PasswordSecurity.vendor_extension:type_name -> openapi.v2.NamedAny + 28, // 64: openapi.v2.Oauth2Scopes.additional_properties:type_name -> openapi.v2.NamedString + 10, // 65: openapi.v2.Operation.external_docs:type_name -> openapi.v2.ExternalDocs + 39, // 66: openapi.v2.Operation.parameters:type_name -> openapi.v2.ParametersItem + 49, // 67: openapi.v2.Operation.responses:type_name -> openapi.v2.Responses + 54, // 68: openapi.v2.Operation.security:type_name -> openapi.v2.SecurityRequirement + 20, // 69: openapi.v2.Operation.vendor_extension:type_name -> openapi.v2.NamedAny + 4, // 70: openapi.v2.Parameter.body_parameter:type_name -> openapi.v2.BodyParameter + 30, // 71: openapi.v2.Parameter.non_body_parameter:type_name -> openapi.v2.NonBodyParameter + 22, // 72: openapi.v2.ParameterDefinitions.additional_properties:type_name -> openapi.v2.NamedParameter + 37, // 73: openapi.v2.ParametersItem.parameter:type_name -> openapi.v2.Parameter + 18, // 74: openapi.v2.ParametersItem.json_reference:type_name -> openapi.v2.JsonReference + 36, // 75: openapi.v2.PathItem.get:type_name -> openapi.v2.Operation + 36, // 76: openapi.v2.PathItem.put:type_name -> openapi.v2.Operation + 36, // 77: openapi.v2.PathItem.post:type_name -> openapi.v2.Operation + 36, // 78: openapi.v2.PathItem.delete:type_name -> openapi.v2.Operation + 36, // 79: openapi.v2.PathItem.options:type_name -> openapi.v2.Operation + 36, // 80: openapi.v2.PathItem.head:type_name -> openapi.v2.Operation + 36, // 81: openapi.v2.PathItem.patch:type_name -> openapi.v2.Operation + 39, // 82: openapi.v2.PathItem.parameters:type_name -> openapi.v2.ParametersItem + 20, // 83: openapi.v2.PathItem.vendor_extension:type_name -> openapi.v2.NamedAny + 43, // 84: openapi.v2.PathParameterSubSchema.items:type_name -> openapi.v2.PrimitivesItems + 1, // 85: openapi.v2.PathParameterSubSchema.default:type_name -> openapi.v2.Any + 1, // 86: openapi.v2.PathParameterSubSchema.enum:type_name -> openapi.v2.Any + 20, // 87: openapi.v2.PathParameterSubSchema.vendor_extension:type_name -> openapi.v2.NamedAny + 20, // 88: openapi.v2.Paths.vendor_extension:type_name -> openapi.v2.NamedAny + 23, // 89: openapi.v2.Paths.path:type_name -> openapi.v2.NamedPathItem + 43, // 90: openapi.v2.PrimitivesItems.items:type_name -> openapi.v2.PrimitivesItems + 1, // 91: openapi.v2.PrimitivesItems.default:type_name -> openapi.v2.Any + 1, // 92: openapi.v2.PrimitivesItems.enum:type_name -> openapi.v2.Any + 20, // 93: openapi.v2.PrimitivesItems.vendor_extension:type_name -> openapi.v2.NamedAny + 26, // 94: openapi.v2.Properties.additional_properties:type_name -> openapi.v2.NamedSchema + 43, // 95: openapi.v2.QueryParameterSubSchema.items:type_name -> openapi.v2.PrimitivesItems + 1, // 96: openapi.v2.QueryParameterSubSchema.default:type_name -> openapi.v2.Any + 1, // 97: openapi.v2.QueryParameterSubSchema.enum:type_name -> openapi.v2.Any + 20, // 98: openapi.v2.QueryParameterSubSchema.vendor_extension:type_name -> openapi.v2.NamedAny + 51, // 99: openapi.v2.Response.schema:type_name -> openapi.v2.SchemaItem + 15, // 100: openapi.v2.Response.headers:type_name -> openapi.v2.Headers + 9, // 101: openapi.v2.Response.examples:type_name -> openapi.v2.Examples + 20, // 102: openapi.v2.Response.vendor_extension:type_name -> openapi.v2.NamedAny + 24, // 103: openapi.v2.ResponseDefinitions.additional_properties:type_name -> openapi.v2.NamedResponse + 46, // 104: openapi.v2.ResponseValue.response:type_name -> openapi.v2.Response + 18, // 105: openapi.v2.ResponseValue.json_reference:type_name -> openapi.v2.JsonReference + 25, // 106: openapi.v2.Responses.response_code:type_name -> openapi.v2.NamedResponseValue + 20, // 107: openapi.v2.Responses.vendor_extension:type_name -> openapi.v2.NamedAny + 1, // 108: openapi.v2.Schema.default:type_name -> openapi.v2.Any + 1, // 109: openapi.v2.Schema.enum:type_name -> openapi.v2.Any + 0, // 110: openapi.v2.Schema.additional_properties:type_name -> openapi.v2.AdditionalPropertiesItem + 57, // 111: openapi.v2.Schema.type:type_name -> openapi.v2.TypeItem + 17, // 112: openapi.v2.Schema.items:type_name -> openapi.v2.ItemsItem + 50, // 113: openapi.v2.Schema.all_of:type_name -> openapi.v2.Schema + 44, // 114: openapi.v2.Schema.properties:type_name -> openapi.v2.Properties + 59, // 115: openapi.v2.Schema.xml:type_name -> openapi.v2.Xml + 10, // 116: openapi.v2.Schema.external_docs:type_name -> openapi.v2.ExternalDocs + 1, // 117: openapi.v2.Schema.example:type_name -> openapi.v2.Any + 20, // 118: openapi.v2.Schema.vendor_extension:type_name -> openapi.v2.NamedAny + 50, // 119: openapi.v2.SchemaItem.schema:type_name -> openapi.v2.Schema + 11, // 120: openapi.v2.SchemaItem.file_schema:type_name -> openapi.v2.FileSchema + 27, // 121: openapi.v2.SecurityDefinitions.additional_properties:type_name -> openapi.v2.NamedSecurityDefinitionsItem + 3, // 122: openapi.v2.SecurityDefinitionsItem.basic_authentication_security:type_name -> openapi.v2.BasicAuthenticationSecurity + 2, // 123: openapi.v2.SecurityDefinitionsItem.api_key_security:type_name -> openapi.v2.ApiKeySecurity + 33, // 124: openapi.v2.SecurityDefinitionsItem.oauth2_implicit_security:type_name -> openapi.v2.Oauth2ImplicitSecurity + 34, // 125: openapi.v2.SecurityDefinitionsItem.oauth2_password_security:type_name -> openapi.v2.Oauth2PasswordSecurity + 32, // 126: openapi.v2.SecurityDefinitionsItem.oauth2_application_security:type_name -> openapi.v2.Oauth2ApplicationSecurity + 31, // 127: openapi.v2.SecurityDefinitionsItem.oauth2_access_code_security:type_name -> openapi.v2.Oauth2AccessCodeSecurity + 29, // 128: openapi.v2.SecurityRequirement.additional_properties:type_name -> openapi.v2.NamedStringArray + 10, // 129: openapi.v2.Tag.external_docs:type_name -> openapi.v2.ExternalDocs + 20, // 130: openapi.v2.Tag.vendor_extension:type_name -> openapi.v2.NamedAny + 20, // 131: openapi.v2.VendorExtension.additional_properties:type_name -> openapi.v2.NamedAny + 20, // 132: openapi.v2.Xml.vendor_extension:type_name -> openapi.v2.NamedAny + 133, // [133:133] is the sub-list for method output_type + 133, // [133:133] is the sub-list for method input_type + 133, // [133:133] is the sub-list for extension type_name + 133, // [133:133] is the sub-list for extension extendee + 0, // [0:133] is the sub-list for field type_name +} + +func init() { file_openapiv2_OpenAPIv2_proto_init() } +func file_openapiv2_OpenAPIv2_proto_init() { + if File_openapiv2_OpenAPIv2_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_openapiv2_OpenAPIv2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdditionalPropertiesItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Any); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApiKeySecurity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BasicAuthenticationSecurity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BodyParameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Contact); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Default); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Definitions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Document); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Examples); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExternalDocs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FileSchema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FormDataParameterSubSchema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Header); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeaderParameterSubSchema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Headers); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Info); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ItemsItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JsonReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*License); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedAny); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedParameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedPathItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedResponseValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedSchema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedSecurityDefinitionsItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedString); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedStringArray); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NonBodyParameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Oauth2AccessCodeSecurity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Oauth2ApplicationSecurity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Oauth2ImplicitSecurity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Oauth2PasswordSecurity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Oauth2Scopes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Parameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParameterDefinitions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParametersItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathParameterSubSchema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Paths); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrimitivesItems); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Properties); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParameterSubSchema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseDefinitions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Responses); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Schema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SchemaItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecurityDefinitions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecurityDefinitionsItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecurityRequirement); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StringArray); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TypeItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VendorExtension); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Xml); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*AdditionalPropertiesItem_Schema)(nil), + (*AdditionalPropertiesItem_Boolean)(nil), + } + file_openapiv2_OpenAPIv2_proto_msgTypes[30].OneofWrappers = []interface{}{ + (*NonBodyParameter_HeaderParameterSubSchema)(nil), + (*NonBodyParameter_FormDataParameterSubSchema)(nil), + (*NonBodyParameter_QueryParameterSubSchema)(nil), + (*NonBodyParameter_PathParameterSubSchema)(nil), + } + file_openapiv2_OpenAPIv2_proto_msgTypes[37].OneofWrappers = []interface{}{ + (*Parameter_BodyParameter)(nil), + (*Parameter_NonBodyParameter)(nil), + } + file_openapiv2_OpenAPIv2_proto_msgTypes[39].OneofWrappers = []interface{}{ + (*ParametersItem_Parameter)(nil), + (*ParametersItem_JsonReference)(nil), + } + file_openapiv2_OpenAPIv2_proto_msgTypes[48].OneofWrappers = []interface{}{ + (*ResponseValue_Response)(nil), + (*ResponseValue_JsonReference)(nil), + } + file_openapiv2_OpenAPIv2_proto_msgTypes[51].OneofWrappers = []interface{}{ + (*SchemaItem_Schema)(nil), + (*SchemaItem_FileSchema)(nil), + } + file_openapiv2_OpenAPIv2_proto_msgTypes[53].OneofWrappers = []interface{}{ + (*SecurityDefinitionsItem_BasicAuthenticationSecurity)(nil), + (*SecurityDefinitionsItem_ApiKeySecurity)(nil), + (*SecurityDefinitionsItem_Oauth2ImplicitSecurity)(nil), + (*SecurityDefinitionsItem_Oauth2PasswordSecurity)(nil), + (*SecurityDefinitionsItem_Oauth2ApplicationSecurity)(nil), + (*SecurityDefinitionsItem_Oauth2AccessCodeSecurity)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_openapiv2_OpenAPIv2_proto_rawDesc, + NumEnums: 0, + NumMessages: 60, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_openapiv2_OpenAPIv2_proto_goTypes, + DependencyIndexes: file_openapiv2_OpenAPIv2_proto_depIdxs, + MessageInfos: file_openapiv2_OpenAPIv2_proto_msgTypes, + }.Build() + File_openapiv2_OpenAPIv2_proto = out.File + file_openapiv2_OpenAPIv2_proto_rawDesc = nil + file_openapiv2_OpenAPIv2_proto_goTypes = nil + file_openapiv2_OpenAPIv2_proto_depIdxs = nil } diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto b/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto index 557c8807..00ac1b0a 100644 --- a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. All Rights Reserved. +// Copyright 2020 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -41,6 +41,9 @@ option java_package = "org.openapi_v2"; // the future. 'GPB' is reserved for the protocol buffer implementation itself. option objc_class_prefix = "OAS"; +// The Go package name. +option go_package = "openapiv2;openapi_v2"; + message AdditionalPropertiesItem { oneof oneof { Schema schema = 1; @@ -553,7 +556,7 @@ message Response { repeated NamedAny vendor_extension = 5; } -// One or more JSON representations for parameters +// One or more JSON representations for responses message ResponseDefinitions { repeated NamedResponse additional_properties = 1; } diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md b/vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md index 836fb32a..5276128d 100644 --- a/vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md @@ -1,16 +1,14 @@ # OpenAPI v2 Protocol Buffer Models -This directory contains a Protocol Buffer-language model -and related code for supporting OpenAPI v2. +This directory contains a Protocol Buffer-language model and related code for +supporting OpenAPI v2. -Gnostic applications and plugins can use OpenAPIv2.proto -to generate Protocol Buffer support code for their preferred languages. +Gnostic applications and plugins can use OpenAPIv2.proto to generate Protocol +Buffer support code for their preferred languages. -OpenAPIv2.go is used by Gnostic to read JSON and YAML OpenAPI -descriptions into the Protocol Buffer-based datastructures -generated from OpenAPIv2.proto. +OpenAPIv2.go is used by Gnostic to read JSON and YAML OpenAPI descriptions into +the Protocol Buffer-based datastructures generated from OpenAPIv2.proto. -OpenAPIv2.proto and OpenAPIv2.go are generated by the Gnostic -compiler generator, and OpenAPIv2.pb.go is generated by -protoc, the Protocol Buffer compiler, and protoc-gen-go, the -Protocol Buffer Go code generation plugin. +OpenAPIv2.proto and OpenAPIv2.go are generated by the Gnostic compiler +generator, and OpenAPIv2.pb.go is generated by protoc, the Protocol Buffer +compiler, and protoc-gen-go, the Protocol Buffer Go code generation plugin. diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/document.go b/vendor/github.com/googleapis/gnostic/OpenAPIv2/document.go new file mode 100644 index 00000000..ddeed5c8 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv2/document.go @@ -0,0 +1,26 @@ +// Copyright 2020 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package openapi_v2 + +import "github.com/googleapis/gnostic/compiler" + +// ParseDocument reads an OpenAPI v2 description from a YAML/JSON representation. +func ParseDocument(b []byte) (*Document, error) { + info, err := compiler.ReadInfoFromBytes("", b) + if err != nil { + return nil, err + } + return NewDocument(info.Content[0], compiler.NewContextWithExtensions("$root", nil, nil)) +} diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/openapi-2.0.json b/vendor/github.com/googleapis/gnostic/OpenAPIv2/openapi-2.0.json index 2815a26e..afa12b79 100644 --- a/vendor/github.com/googleapis/gnostic/OpenAPIv2/openapi-2.0.json +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv2/openapi-2.0.json @@ -203,7 +203,7 @@ "additionalProperties": { "$ref": "#/definitions/response" }, - "description": "One or more JSON representations for parameters" + "description": "One or more JSON representations for responses" }, "externalDocs": { "type": "object", @@ -1607,4 +1607,4 @@ } } } -} +} \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/compiler/README.md b/vendor/github.com/googleapis/gnostic/compiler/README.md index 848b16c6..ee9783d2 100644 --- a/vendor/github.com/googleapis/gnostic/compiler/README.md +++ b/vendor/github.com/googleapis/gnostic/compiler/README.md @@ -1,3 +1,4 @@ # Compiler support code -This directory contains compiler support code used by Gnostic and Gnostic extensions. \ No newline at end of file +This directory contains compiler support code used by Gnostic and Gnostic +extensions. diff --git a/vendor/github.com/googleapis/gnostic/compiler/context.go b/vendor/github.com/googleapis/gnostic/compiler/context.go index a64c1b75..1250a6c5 100644 --- a/vendor/github.com/googleapis/gnostic/compiler/context.go +++ b/vendor/github.com/googleapis/gnostic/compiler/context.go @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. All Rights Reserved. +// Copyright 2017 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/github.com/googleapis/gnostic/compiler/error.go b/vendor/github.com/googleapis/gnostic/compiler/error.go index d8672c10..7db23997 100644 --- a/vendor/github.com/googleapis/gnostic/compiler/error.go +++ b/vendor/github.com/googleapis/gnostic/compiler/error.go @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. All Rights Reserved. +// Copyright 2017 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/github.com/googleapis/gnostic/compiler/extension-handler.go b/vendor/github.com/googleapis/gnostic/compiler/extension-handler.go deleted file mode 100644 index 1f85b650..00000000 --- a/vendor/github.com/googleapis/gnostic/compiler/extension-handler.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2017 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package compiler - -import ( - "bytes" - "fmt" - "os/exec" - - "strings" - - "errors" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes/any" - ext_plugin "github.com/googleapis/gnostic/extensions" - yaml "gopkg.in/yaml.v2" -) - -// ExtensionHandler describes a binary that is called by the compiler to handle specification extensions. -type ExtensionHandler struct { - Name string -} - -// HandleExtension calls a binary extension handler. -func HandleExtension(context *Context, in interface{}, extensionName string) (bool, *any.Any, error) { - handled := false - var errFromPlugin error - var outFromPlugin *any.Any - - if context != nil && context.ExtensionHandlers != nil && len(*(context.ExtensionHandlers)) != 0 { - for _, customAnyProtoGenerator := range *(context.ExtensionHandlers) { - outFromPlugin, errFromPlugin = customAnyProtoGenerator.handle(in, extensionName) - if outFromPlugin == nil { - continue - } else { - handled = true - break - } - } - } - return handled, outFromPlugin, errFromPlugin -} - -func (extensionHandlers *ExtensionHandler) handle(in interface{}, extensionName string) (*any.Any, error) { - if extensionHandlers.Name != "" { - binary, _ := yaml.Marshal(in) - - request := &ext_plugin.ExtensionHandlerRequest{} - - version := &ext_plugin.Version{} - version.Major = 0 - version.Minor = 1 - version.Patch = 0 - request.CompilerVersion = version - - request.Wrapper = &ext_plugin.Wrapper{} - - request.Wrapper.Version = "v2" - request.Wrapper.Yaml = string(binary) - request.Wrapper.ExtensionName = extensionName - - requestBytes, _ := proto.Marshal(request) - cmd := exec.Command(extensionHandlers.Name) - cmd.Stdin = bytes.NewReader(requestBytes) - output, err := cmd.Output() - - if err != nil { - fmt.Printf("Error: %+v\n", err) - return nil, err - } - response := &ext_plugin.ExtensionHandlerResponse{} - err = proto.Unmarshal(output, response) - if err != nil { - fmt.Printf("Error: %+v\n", err) - fmt.Printf("%s\n", string(output)) - return nil, err - } - if !response.Handled { - return nil, nil - } - if len(response.Error) != 0 { - message := fmt.Sprintf("Errors when parsing: %+v for field %s by vendor extension handler %s. Details %+v", in, extensionName, extensionHandlers.Name, strings.Join(response.Error, ",")) - return nil, errors.New(message) - } - return response.Value, nil - } - return nil, nil -} diff --git a/vendor/github.com/googleapis/gnostic/compiler/extensions.go b/vendor/github.com/googleapis/gnostic/compiler/extensions.go new file mode 100644 index 00000000..20848a0a --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/compiler/extensions.go @@ -0,0 +1,85 @@ +// Copyright 2017 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package compiler + +import ( + "bytes" + "fmt" + "os/exec" + "strings" + + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes/any" + extensions "github.com/googleapis/gnostic/extensions" + yaml "gopkg.in/yaml.v3" +) + +// ExtensionHandler describes a binary that is called by the compiler to handle specification extensions. +type ExtensionHandler struct { + Name string +} + +// CallExtension calls a binary extension handler. +func CallExtension(context *Context, in *yaml.Node, extensionName string) (handled bool, response *any.Any, err error) { + if context == nil || context.ExtensionHandlers == nil { + return false, nil, nil + } + handled = false + for _, handler := range *(context.ExtensionHandlers) { + response, err = handler.handle(in, extensionName) + if response == nil { + continue + } else { + handled = true + break + } + } + return handled, response, err +} + +func (extensionHandlers *ExtensionHandler) handle(in *yaml.Node, extensionName string) (*any.Any, error) { + if extensionHandlers.Name != "" { + yamlData, _ := yaml.Marshal(in) + request := &extensions.ExtensionHandlerRequest{ + CompilerVersion: &extensions.Version{ + Major: 0, + Minor: 1, + Patch: 0, + }, + Wrapper: &extensions.Wrapper{ + Version: "unknown", // TODO: set this to the type/version of spec being parsed. + Yaml: string(yamlData), + ExtensionName: extensionName, + }, + } + requestBytes, _ := proto.Marshal(request) + cmd := exec.Command(extensionHandlers.Name) + cmd.Stdin = bytes.NewReader(requestBytes) + output, err := cmd.Output() + if err != nil { + return nil, err + } + response := &extensions.ExtensionHandlerResponse{} + err = proto.Unmarshal(output, response) + if err != nil || !response.Handled { + return nil, err + } + if len(response.Errors) != 0 { + return nil, fmt.Errorf("Errors when parsing: %+v for field %s by vendor extension handler %s. Details %+v", in, extensionName, extensionHandlers.Name, strings.Join(response.Errors, ",")) + } + return response.Value, nil + } + return nil, nil +} diff --git a/vendor/github.com/googleapis/gnostic/compiler/helpers.go b/vendor/github.com/googleapis/gnostic/compiler/helpers.go index 76df635f..a580f40a 100644 --- a/vendor/github.com/googleapis/gnostic/compiler/helpers.go +++ b/vendor/github.com/googleapis/gnostic/compiler/helpers.go @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. All Rights Reserved. +// Copyright 2017 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,56 +16,63 @@ package compiler import ( "fmt" - "gopkg.in/yaml.v2" "regexp" "sort" "strconv" + + "github.com/googleapis/gnostic/jsonschema" + "gopkg.in/yaml.v3" ) // compiler helper functions, usually called from generated code -// UnpackMap gets a yaml.MapSlice if possible. -func UnpackMap(in interface{}) (yaml.MapSlice, bool) { - m, ok := in.(yaml.MapSlice) - if ok { - return m, true - } - // do we have an empty array? - a, ok := in.([]interface{}) - if ok && len(a) == 0 { - // if so, return an empty map - return yaml.MapSlice{}, true +// UnpackMap gets a *yaml.Node if possible. +func UnpackMap(in *yaml.Node) (*yaml.Node, bool) { + if in == nil { + return nil, false } - return nil, false + return in, true } -// SortedKeysForMap returns the sorted keys of a yaml.MapSlice. -func SortedKeysForMap(m yaml.MapSlice) []string { +// SortedKeysForMap returns the sorted keys of a yamlv2.MapSlice. +func SortedKeysForMap(m *yaml.Node) []string { keys := make([]string, 0) - for _, item := range m { - keys = append(keys, item.Key.(string)) + if m.Kind == yaml.MappingNode { + for i := 0; i < len(m.Content); i += 2 { + keys = append(keys, m.Content[i].Value) + } } sort.Strings(keys) return keys } -// MapHasKey returns true if a yaml.MapSlice contains a specified key. -func MapHasKey(m yaml.MapSlice, key string) bool { - for _, item := range m { - itemKey, ok := item.Key.(string) - if ok && key == itemKey { - return true +// MapHasKey returns true if a yamlv2.MapSlice contains a specified key. +func MapHasKey(m *yaml.Node, key string) bool { + if m == nil { + return false + } + if m.Kind == yaml.MappingNode { + for i := 0; i < len(m.Content); i += 2 { + itemKey := m.Content[i].Value + if key == itemKey { + return true + } } } return false } // MapValueForKey gets the value of a map value for a specified key. -func MapValueForKey(m yaml.MapSlice, key string) interface{} { - for _, item := range m { - itemKey, ok := item.Key.(string) - if ok && key == itemKey { - return item.Value +func MapValueForKey(m *yaml.Node, key string) *yaml.Node { + if m == nil { + return nil + } + if m.Kind == yaml.MappingNode { + for i := 0; i < len(m.Content); i += 2 { + itemKey := m.Content[i].Value + if key == itemKey { + return m.Content[i+1] + } } } return nil @@ -83,8 +90,116 @@ func ConvertInterfaceArrayToStringArray(interfaceArray []interface{}) []string { return stringArray } +// SequenceNodeForNode returns a node if it is a SequenceNode. +func SequenceNodeForNode(node *yaml.Node) (*yaml.Node, bool) { + if node.Kind != yaml.SequenceNode { + return nil, false + } + return node, true +} + +// BoolForScalarNode returns the bool value of a node. +func BoolForScalarNode(node *yaml.Node) (bool, bool) { + if node == nil { + return false, false + } + if node.Kind == yaml.DocumentNode { + return BoolForScalarNode(node.Content[0]) + } + if node.Kind != yaml.ScalarNode { + return false, false + } + if node.Tag != "!!bool" { + return false, false + } + v, err := strconv.ParseBool(node.Value) + if err != nil { + return false, false + } + return v, true +} + +// IntForScalarNode returns the integer value of a node. +func IntForScalarNode(node *yaml.Node) (int64, bool) { + if node == nil { + return 0, false + } + if node.Kind == yaml.DocumentNode { + return IntForScalarNode(node.Content[0]) + } + if node.Kind != yaml.ScalarNode { + return 0, false + } + if node.Tag != "!!int" { + return 0, false + } + v, err := strconv.ParseInt(node.Value, 10, 64) + if err != nil { + return 0, false + } + return v, true +} + +// FloatForScalarNode returns the float value of a node. +func FloatForScalarNode(node *yaml.Node) (float64, bool) { + if node == nil { + return 0.0, false + } + if node.Kind == yaml.DocumentNode { + return FloatForScalarNode(node.Content[0]) + } + if node.Kind != yaml.ScalarNode { + return 0.0, false + } + if (node.Tag != "!!int") && (node.Tag != "!!float") { + return 0.0, false + } + v, err := strconv.ParseFloat(node.Value, 64) + if err != nil { + return 0.0, false + } + return v, true +} + +// StringForScalarNode returns the string value of a node. +func StringForScalarNode(node *yaml.Node) (string, bool) { + if node == nil { + return "", false + } + if node.Kind == yaml.DocumentNode { + return StringForScalarNode(node.Content[0]) + } + switch node.Kind { + case yaml.ScalarNode: + switch node.Tag { + case "!!int": + return node.Value, true + case "!!str": + return node.Value, true + case "!!null": + return "", true + default: + return "", false + } + default: + return "", false + } +} + +// StringArrayForSequenceNode converts a sequence node to an array of strings, if possible. +func StringArrayForSequenceNode(node *yaml.Node) []string { + stringArray := make([]string, 0) + for _, item := range node.Content { + v, ok := StringForScalarNode(item) + if ok { + stringArray = append(stringArray, v) + } + } + return stringArray +} + // MissingKeysInMap identifies which keys from a list of required keys are not in a map. -func MissingKeysInMap(m yaml.MapSlice, requiredKeys []string) []string { +func MissingKeysInMap(m *yaml.Node, requiredKeys []string) []string { missingKeys := make([]string, 0) for _, k := range requiredKeys { if !MapHasKey(m, k) { @@ -95,64 +210,100 @@ func MissingKeysInMap(m yaml.MapSlice, requiredKeys []string) []string { } // InvalidKeysInMap returns keys in a map that don't match a list of allowed keys and patterns. -func InvalidKeysInMap(m yaml.MapSlice, allowedKeys []string, allowedPatterns []*regexp.Regexp) []string { +func InvalidKeysInMap(m *yaml.Node, allowedKeys []string, allowedPatterns []*regexp.Regexp) []string { invalidKeys := make([]string, 0) - for _, item := range m { - itemKey, ok := item.Key.(string) - if ok { - key := itemKey - found := false - // does the key match an allowed key? - for _, allowedKey := range allowedKeys { - if key == allowedKey { + if m == nil || m.Kind != yaml.MappingNode { + return invalidKeys + } + for i := 0; i < len(m.Content); i += 2 { + key := m.Content[i].Value + found := false + // does the key match an allowed key? + for _, allowedKey := range allowedKeys { + if key == allowedKey { + found = true + break + } + } + if !found { + // does the key match an allowed pattern? + for _, allowedPattern := range allowedPatterns { + if allowedPattern.MatchString(key) { found = true break } } if !found { - // does the key match an allowed pattern? - for _, allowedPattern := range allowedPatterns { - if allowedPattern.MatchString(key) { - found = true - break - } - } - if !found { - invalidKeys = append(invalidKeys, key) - } + invalidKeys = append(invalidKeys, key) } } } return invalidKeys } -// DescribeMap describes a map (for debugging purposes). -func DescribeMap(in interface{}, indent string) string { - description := "" - m, ok := in.(map[string]interface{}) - if ok { - keys := make([]string, 0) - for k := range m { - keys = append(keys, k) - } - sort.Strings(keys) - for _, k := range keys { - v := m[k] - description += fmt.Sprintf("%s%s:\n", indent, k) - description += DescribeMap(v, indent+" ") - } - return description +// NewMappingNode creates a new Mapping node. +func NewMappingNode() *yaml.Node { + return &yaml.Node{ + Kind: yaml.MappingNode, + Content: make([]*yaml.Node, 0), } - a, ok := in.([]interface{}) - if ok { - for i, v := range a { - description += fmt.Sprintf("%s%d:\n", indent, i) - description += DescribeMap(v, indent+" ") - } - return description +} + +// NewSequenceNode creates a new Sequence node. +func NewSequenceNode() *yaml.Node { + node := &yaml.Node{ + Kind: yaml.SequenceNode, + Content: make([]*yaml.Node, 0), + } + return node +} + +// NewScalarNodeForString creates a new node to hold a string. +func NewScalarNodeForString(s string) *yaml.Node { + return &yaml.Node{ + Kind: yaml.ScalarNode, + Tag: "!!str", + Value: s, + } +} + +// NewSequenceNodeForStringArray creates a new node to hold an array of strings. +func NewSequenceNodeForStringArray(strings []string) *yaml.Node { + node := &yaml.Node{ + Kind: yaml.SequenceNode, + Content: make([]*yaml.Node, 0), + } + for _, s := range strings { + node.Content = append(node.Content, NewScalarNodeForString(s)) + } + return node +} + +// NewScalarNodeForBool creates a new node to hold a bool. +func NewScalarNodeForBool(b bool) *yaml.Node { + return &yaml.Node{ + Kind: yaml.ScalarNode, + Tag: "!!bool", + Value: fmt.Sprintf("%t", b), + } +} + +// NewScalarNodeForFloat creates a new node to hold a float. +func NewScalarNodeForFloat(f float64) *yaml.Node { + return &yaml.Node{ + Kind: yaml.ScalarNode, + Tag: "!!float", + Value: fmt.Sprintf("%g", f), + } +} + +// NewScalarNodeForInt creates a new node to hold an integer. +func NewScalarNodeForInt(i int64) *yaml.Node { + return &yaml.Node{ + Kind: yaml.ScalarNode, + Tag: "!!int", + Value: fmt.Sprintf("%d", i), } - description += fmt.Sprintf("%s%+v\n", indent, in) - return description } // PluralProperties returns the string "properties" pluralized. @@ -195,3 +346,40 @@ func StringValue(item interface{}) (value string, ok bool) { } return "", false } + +// Description returns a human-readable represention of an item. +func Description(item interface{}) string { + value, ok := item.(*yaml.Node) + if ok { + return jsonschema.Render(value) + } + return fmt.Sprintf("%+v", item) +} + +// Display returns a description of a node for use in error messages. +func Display(node *yaml.Node) string { + switch node.Kind { + case yaml.ScalarNode: + switch node.Tag { + case "!!str": + return fmt.Sprintf("%s (string)", node.Value) + } + } + return fmt.Sprintf("%+v (%T)", node, node) +} + +// Marshal creates a yaml version of a structure in our preferred style +func Marshal(in *yaml.Node) []byte { + clearStyle(in) + //bytes, _ := yaml.Marshal(&yaml.Node{Kind: yaml.DocumentNode, Content: []*yaml.Node{in}}) + bytes, _ := yaml.Marshal(in) + + return bytes +} + +func clearStyle(node *yaml.Node) { + node.Style = 0 + for _, c := range node.Content { + clearStyle(c) + } +} diff --git a/vendor/github.com/googleapis/gnostic/compiler/main.go b/vendor/github.com/googleapis/gnostic/compiler/main.go index 9713a21c..ce9fcc45 100644 --- a/vendor/github.com/googleapis/gnostic/compiler/main.go +++ b/vendor/github.com/googleapis/gnostic/compiler/main.go @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. All Rights Reserved. +// Copyright 2017 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/github.com/googleapis/gnostic/compiler/reader.go b/vendor/github.com/googleapis/gnostic/compiler/reader.go index 25affd06..be0e8b40 100644 --- a/vendor/github.com/googleapis/gnostic/compiler/reader.go +++ b/vendor/github.com/googleapis/gnostic/compiler/reader.go @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. All Rights Reserved. +// Copyright 2017 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ package compiler import ( - "errors" "fmt" "io/ioutil" "log" @@ -23,18 +22,30 @@ import ( "net/url" "path/filepath" "strings" + "sync" - yaml "gopkg.in/yaml.v2" + yaml "gopkg.in/yaml.v3" ) +var verboseReader = false + var fileCache map[string][]byte -var infoCache map[string]interface{} -var count int64 +var infoCache map[string]*yaml.Node -var verboseReader = false var fileCacheEnable = true var infoCacheEnable = true +// These locks are used to synchronize accesses to the fileCache and infoCache +// maps (above). They are global state and can throw thread-related errors +// when modified from separate goroutines. The general strategy is to protect +// all public functions in this file with mutex Lock() calls. As a result, to +// avoid deadlock, these public functions should not call other public +// functions, so some public functions have private equivalents. +// In the future, we might consider replacing the maps with sync.Map and +// eliminating these mutexes. +var fileCacheMutex sync.Mutex +var infoCacheMutex sync.Mutex + func initializeFileCache() { if fileCache == nil { fileCache = make(map[string][]byte, 0) @@ -43,19 +54,42 @@ func initializeFileCache() { func initializeInfoCache() { if infoCache == nil { - infoCache = make(map[string]interface{}, 0) + infoCache = make(map[string]*yaml.Node, 0) } } +// EnableFileCache turns on file caching. +func EnableFileCache() { + fileCacheMutex.Lock() + defer fileCacheMutex.Unlock() + fileCacheEnable = true +} + +// EnableInfoCache turns on parsed info caching. +func EnableInfoCache() { + infoCacheMutex.Lock() + defer infoCacheMutex.Unlock() + infoCacheEnable = true +} + +// DisableFileCache turns off file caching. func DisableFileCache() { + fileCacheMutex.Lock() + defer fileCacheMutex.Unlock() fileCacheEnable = false } +// DisableInfoCache turns off parsed info caching. func DisableInfoCache() { + infoCacheMutex.Lock() + defer infoCacheMutex.Unlock() infoCacheEnable = false } +// RemoveFromFileCache removes an entry from the file cache. func RemoveFromFileCache(fileurl string) { + fileCacheMutex.Lock() + defer fileCacheMutex.Unlock() if !fileCacheEnable { return } @@ -63,7 +97,10 @@ func RemoveFromFileCache(fileurl string) { delete(fileCache, fileurl) } +// RemoveFromInfoCache removes an entry from the info cache. func RemoveFromInfoCache(filename string) { + infoCacheMutex.Lock() + defer infoCacheMutex.Unlock() if !infoCacheEnable { return } @@ -71,19 +108,44 @@ func RemoveFromInfoCache(filename string) { delete(infoCache, filename) } -func GetInfoCache() map[string]interface{} { +// GetInfoCache returns the info cache map. +func GetInfoCache() map[string]*yaml.Node { + infoCacheMutex.Lock() + defer infoCacheMutex.Unlock() if infoCache == nil { initializeInfoCache() } return infoCache } +// ClearFileCache clears the file cache. +func ClearFileCache() { + fileCacheMutex.Lock() + defer fileCacheMutex.Unlock() + fileCache = make(map[string][]byte, 0) +} + +// ClearInfoCache clears the info cache. func ClearInfoCache() { - infoCache = make(map[string]interface{}) + infoCacheMutex.Lock() + defer infoCacheMutex.Unlock() + infoCache = make(map[string]*yaml.Node) +} + +// ClearCaches clears all caches. +func ClearCaches() { + ClearFileCache() + ClearInfoCache() } // FetchFile gets a specified file from the local filesystem or a remote location. func FetchFile(fileurl string) ([]byte, error) { + fileCacheMutex.Lock() + defer fileCacheMutex.Unlock() + return fetchFile(fileurl) +} + +func fetchFile(fileurl string) ([]byte, error) { var bytes []byte initializeFileCache() if fileCacheEnable { @@ -104,7 +166,7 @@ func FetchFile(fileurl string) ([]byte, error) { } defer response.Body.Close() if response.StatusCode != 200 { - return nil, errors.New(fmt.Sprintf("Error downloading %s: %s", fileurl, response.Status)) + return nil, fmt.Errorf("Error downloading %s: %s", fileurl, response.Status) } bytes, err = ioutil.ReadAll(response.Body) if fileCacheEnable && err == nil { @@ -115,11 +177,17 @@ func FetchFile(fileurl string) ([]byte, error) { // ReadBytesForFile reads the bytes of a file. func ReadBytesForFile(filename string) ([]byte, error) { + fileCacheMutex.Lock() + defer fileCacheMutex.Unlock() + return readBytesForFile(filename) +} + +func readBytesForFile(filename string) ([]byte, error) { // is the filename a url? fileurl, _ := url.Parse(filename) if fileurl.Scheme != "" { // yes, fetch it - bytes, err := FetchFile(filename) + bytes, err := fetchFile(filename) if err != nil { return nil, err } @@ -133,8 +201,14 @@ func ReadBytesForFile(filename string) ([]byte, error) { return bytes, nil } -// ReadInfoFromBytes unmarshals a file as a yaml.MapSlice. -func ReadInfoFromBytes(filename string, bytes []byte) (interface{}, error) { +// ReadInfoFromBytes unmarshals a file as a *yaml.Node. +func ReadInfoFromBytes(filename string, bytes []byte) (*yaml.Node, error) { + infoCacheMutex.Lock() + defer infoCacheMutex.Unlock() + return readInfoFromBytes(filename, bytes) +} + +func readInfoFromBytes(filename string, bytes []byte) (*yaml.Node, error) { initializeInfoCache() if infoCacheEnable { cachedInfo, ok := infoCache[filename] @@ -148,19 +222,23 @@ func ReadInfoFromBytes(filename string, bytes []byte) (interface{}, error) { log.Printf("Reading info for file %s", filename) } } - var info yaml.MapSlice + var info yaml.Node err := yaml.Unmarshal(bytes, &info) if err != nil { return nil, err } if infoCacheEnable && len(filename) > 0 { - infoCache[filename] = info + infoCache[filename] = &info } - return info, nil + return &info, nil } // ReadInfoForRef reads a file and return the fragment needed to resolve a $ref. -func ReadInfoForRef(basefile string, ref string) (interface{}, error) { +func ReadInfoForRef(basefile string, ref string) (*yaml.Node, error) { + fileCacheMutex.Lock() + defer fileCacheMutex.Unlock() + infoCacheMutex.Lock() + defer infoCacheMutex.Unlock() initializeInfoCache() if infoCacheEnable { info, ok := infoCache[ref] @@ -174,7 +252,6 @@ func ReadInfoForRef(basefile string, ref string) (interface{}, error) { log.Printf("Reading info for ref %s#%s", basefile, ref) } } - count = count + 1 basedir, _ := filepath.Split(basefile) parts := strings.Split(ref, "#") var filename string @@ -187,24 +264,30 @@ func ReadInfoForRef(basefile string, ref string) (interface{}, error) { } else { filename = basefile } - bytes, err := ReadBytesForFile(filename) + bytes, err := readBytesForFile(filename) if err != nil { return nil, err } - info, err := ReadInfoFromBytes(filename, bytes) + info, err := readInfoFromBytes(filename, bytes) + if info != nil && info.Kind == yaml.DocumentNode { + info = info.Content[0] + } if err != nil { log.Printf("File error: %v\n", err) } else { + if info == nil { + return nil, NewError(nil, fmt.Sprintf("could not resolve %s", ref)) + } if len(parts) > 1 { path := strings.Split(parts[1], "/") for i, key := range path { if i > 0 { - m, ok := info.(yaml.MapSlice) - if ok { + m := info + if true { found := false - for _, section := range m { - if section.Key == key { - info = section.Value + for i := 0; i < len(m.Content); i += 2 { + if m.Content[i].Value == key { + info = m.Content[i+1] found = true } } diff --git a/vendor/github.com/googleapis/gnostic/extensions/README.md b/vendor/github.com/googleapis/gnostic/extensions/README.md index ff1c2eb1..4b5d63e5 100644 --- a/vendor/github.com/googleapis/gnostic/extensions/README.md +++ b/vendor/github.com/googleapis/gnostic/extensions/README.md @@ -1,5 +1,13 @@ # Extensions -This directory contains support code for building Gnostic extensions and associated examples. +**Extension Support is experimental.** -Extensions are used to compile vendor or specification extensions into protocol buffer structures. +This directory contains support code for building Gnostic extensio handlers and +associated examples. + +Extension handlers can be used to compile vendor or specification extensions +into protocol buffer structures. + +Like plugins, extension handlers are built as separate executables. Extension +bodies are written to extension handlers as serialized +ExtensionHandlerRequests. diff --git a/vendor/github.com/googleapis/gnostic/extensions/extension.pb.go b/vendor/github.com/googleapis/gnostic/extensions/extension.pb.go index 432dc06e..4198fa17 100644 --- a/vendor/github.com/googleapis/gnostic/extensions/extension.pb.go +++ b/vendor/github.com/googleapis/gnostic/extensions/extension.pb.go @@ -1,148 +1,186 @@ +// Copyright 2017 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.12.3 // source: extensions/extension.proto -package openapiextension_v1 +package gnostic_extension_v1 import ( - fmt "fmt" proto "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 -// The version number of OpenAPI compiler. +// The version number of Gnostic. type Version struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Major int32 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"` Minor int32 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"` Patch int32 `protobuf:"varint,3,opt,name=patch,proto3" json:"patch,omitempty"` // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should // be empty for mainline stable releases. - Suffix string `protobuf:"bytes,4,opt,name=suffix,proto3" json:"suffix,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Suffix string `protobuf:"bytes,4,opt,name=suffix,proto3" json:"suffix,omitempty"` } -func (m *Version) Reset() { *m = Version{} } -func (m *Version) String() string { return proto.CompactTextString(m) } -func (*Version) ProtoMessage() {} -func (*Version) Descriptor() ([]byte, []int) { - return fileDescriptor_661e47e790f76671, []int{0} +func (x *Version) Reset() { + *x = Version{} + if protoimpl.UnsafeEnabled { + mi := &file_extensions_extension_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Version) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Version.Unmarshal(m, b) -} -func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Version.Marshal(b, m, deterministic) -} -func (m *Version) XXX_Merge(src proto.Message) { - xxx_messageInfo_Version.Merge(m, src) +func (x *Version) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Version) XXX_Size() int { - return xxx_messageInfo_Version.Size(m) -} -func (m *Version) XXX_DiscardUnknown() { - xxx_messageInfo_Version.DiscardUnknown(m) + +func (*Version) ProtoMessage() {} + +func (x *Version) ProtoReflect() protoreflect.Message { + mi := &file_extensions_extension_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Version proto.InternalMessageInfo +// Deprecated: Use Version.ProtoReflect.Descriptor instead. +func (*Version) Descriptor() ([]byte, []int) { + return file_extensions_extension_proto_rawDescGZIP(), []int{0} +} -func (m *Version) GetMajor() int32 { - if m != nil { - return m.Major +func (x *Version) GetMajor() int32 { + if x != nil { + return x.Major } return 0 } -func (m *Version) GetMinor() int32 { - if m != nil { - return m.Minor +func (x *Version) GetMinor() int32 { + if x != nil { + return x.Minor } return 0 } -func (m *Version) GetPatch() int32 { - if m != nil { - return m.Patch +func (x *Version) GetPatch() int32 { + if x != nil { + return x.Patch } return 0 } -func (m *Version) GetSuffix() string { - if m != nil { - return m.Suffix +func (x *Version) GetSuffix() string { + if x != nil { + return x.Suffix } return "" } // An encoded Request is written to the ExtensionHandler's stdin. type ExtensionHandlerRequest struct { - // The OpenAPI descriptions that were explicitly listed on the command line. - // The specifications will appear in the order they are specified to gnostic. + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The extension to process. Wrapper *Wrapper `protobuf:"bytes,1,opt,name=wrapper,proto3" json:"wrapper,omitempty"` - // The version number of openapi compiler. - CompilerVersion *Version `protobuf:"bytes,3,opt,name=compiler_version,json=compilerVersion,proto3" json:"compiler_version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // The version number of Gnostic. + CompilerVersion *Version `protobuf:"bytes,2,opt,name=compiler_version,json=compilerVersion,proto3" json:"compiler_version,omitempty"` } -func (m *ExtensionHandlerRequest) Reset() { *m = ExtensionHandlerRequest{} } -func (m *ExtensionHandlerRequest) String() string { return proto.CompactTextString(m) } -func (*ExtensionHandlerRequest) ProtoMessage() {} -func (*ExtensionHandlerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_661e47e790f76671, []int{1} +func (x *ExtensionHandlerRequest) Reset() { + *x = ExtensionHandlerRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_extensions_extension_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ExtensionHandlerRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ExtensionHandlerRequest.Unmarshal(m, b) -} -func (m *ExtensionHandlerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ExtensionHandlerRequest.Marshal(b, m, deterministic) -} -func (m *ExtensionHandlerRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExtensionHandlerRequest.Merge(m, src) -} -func (m *ExtensionHandlerRequest) XXX_Size() int { - return xxx_messageInfo_ExtensionHandlerRequest.Size(m) +func (x *ExtensionHandlerRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ExtensionHandlerRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ExtensionHandlerRequest.DiscardUnknown(m) + +func (*ExtensionHandlerRequest) ProtoMessage() {} + +func (x *ExtensionHandlerRequest) ProtoReflect() protoreflect.Message { + mi := &file_extensions_extension_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ExtensionHandlerRequest proto.InternalMessageInfo +// Deprecated: Use ExtensionHandlerRequest.ProtoReflect.Descriptor instead. +func (*ExtensionHandlerRequest) Descriptor() ([]byte, []int) { + return file_extensions_extension_proto_rawDescGZIP(), []int{1} +} -func (m *ExtensionHandlerRequest) GetWrapper() *Wrapper { - if m != nil { - return m.Wrapper +func (x *ExtensionHandlerRequest) GetWrapper() *Wrapper { + if x != nil { + return x.Wrapper } return nil } -func (m *ExtensionHandlerRequest) GetCompilerVersion() *Version { - if m != nil { - return m.CompilerVersion +func (x *ExtensionHandlerRequest) GetCompilerVersion() *Version { + if x != nil { + return x.CompilerVersion } return nil } // The extensions writes an encoded ExtensionHandlerResponse to stdout. type ExtensionHandlerResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // true if the extension is handled by the extension handler; false otherwise Handled bool `protobuf:"varint,1,opt,name=handled,proto3" json:"handled,omitempty"` - // Error message. If non-empty, the extension handling failed. + // Error message(s). If non-empty, the extension handling failed. // The extension handler process should exit with status code zero // even if it reports an error in this way. // @@ -151,150 +189,277 @@ type ExtensionHandlerResponse struct { // itself -- such as the input Document being unparseable -- should be // reported by writing a message to stderr and exiting with a non-zero // status code. - Error []string `protobuf:"bytes,2,rep,name=error,proto3" json:"error,omitempty"` + Errors []string `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` // text output - Value *any.Any `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Value *any.Any `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` } -func (m *ExtensionHandlerResponse) Reset() { *m = ExtensionHandlerResponse{} } -func (m *ExtensionHandlerResponse) String() string { return proto.CompactTextString(m) } -func (*ExtensionHandlerResponse) ProtoMessage() {} -func (*ExtensionHandlerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_661e47e790f76671, []int{2} +func (x *ExtensionHandlerResponse) Reset() { + *x = ExtensionHandlerResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_extensions_extension_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ExtensionHandlerResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ExtensionHandlerResponse.Unmarshal(m, b) -} -func (m *ExtensionHandlerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ExtensionHandlerResponse.Marshal(b, m, deterministic) -} -func (m *ExtensionHandlerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExtensionHandlerResponse.Merge(m, src) +func (x *ExtensionHandlerResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ExtensionHandlerResponse) XXX_Size() int { - return xxx_messageInfo_ExtensionHandlerResponse.Size(m) -} -func (m *ExtensionHandlerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ExtensionHandlerResponse.DiscardUnknown(m) + +func (*ExtensionHandlerResponse) ProtoMessage() {} + +func (x *ExtensionHandlerResponse) ProtoReflect() protoreflect.Message { + mi := &file_extensions_extension_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ExtensionHandlerResponse proto.InternalMessageInfo +// Deprecated: Use ExtensionHandlerResponse.ProtoReflect.Descriptor instead. +func (*ExtensionHandlerResponse) Descriptor() ([]byte, []int) { + return file_extensions_extension_proto_rawDescGZIP(), []int{2} +} -func (m *ExtensionHandlerResponse) GetHandled() bool { - if m != nil { - return m.Handled +func (x *ExtensionHandlerResponse) GetHandled() bool { + if x != nil { + return x.Handled } return false } -func (m *ExtensionHandlerResponse) GetError() []string { - if m != nil { - return m.Error +func (x *ExtensionHandlerResponse) GetErrors() []string { + if x != nil { + return x.Errors } return nil } -func (m *ExtensionHandlerResponse) GetValue() *any.Any { - if m != nil { - return m.Value +func (x *ExtensionHandlerResponse) GetValue() *any.Any { + if x != nil { + return x.Value } return nil } type Wrapper struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // version of the OpenAPI specification in which this extension was written. Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // Name of the extension + // Name of the extension. ExtensionName string `protobuf:"bytes,2,opt,name=extension_name,json=extensionName,proto3" json:"extension_name,omitempty"` - // Must be a valid yaml for the proto - Yaml string `protobuf:"bytes,3,opt,name=yaml,proto3" json:"yaml,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // YAML-formatted extension value. + Yaml string `protobuf:"bytes,3,opt,name=yaml,proto3" json:"yaml,omitempty"` } -func (m *Wrapper) Reset() { *m = Wrapper{} } -func (m *Wrapper) String() string { return proto.CompactTextString(m) } -func (*Wrapper) ProtoMessage() {} -func (*Wrapper) Descriptor() ([]byte, []int) { - return fileDescriptor_661e47e790f76671, []int{3} +func (x *Wrapper) Reset() { + *x = Wrapper{} + if protoimpl.UnsafeEnabled { + mi := &file_extensions_extension_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Wrapper) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Wrapper.Unmarshal(m, b) +func (x *Wrapper) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Wrapper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Wrapper.Marshal(b, m, deterministic) -} -func (m *Wrapper) XXX_Merge(src proto.Message) { - xxx_messageInfo_Wrapper.Merge(m, src) -} -func (m *Wrapper) XXX_Size() int { - return xxx_messageInfo_Wrapper.Size(m) -} -func (m *Wrapper) XXX_DiscardUnknown() { - xxx_messageInfo_Wrapper.DiscardUnknown(m) + +func (*Wrapper) ProtoMessage() {} + +func (x *Wrapper) ProtoReflect() protoreflect.Message { + mi := &file_extensions_extension_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Wrapper proto.InternalMessageInfo +// Deprecated: Use Wrapper.ProtoReflect.Descriptor instead. +func (*Wrapper) Descriptor() ([]byte, []int) { + return file_extensions_extension_proto_rawDescGZIP(), []int{3} +} -func (m *Wrapper) GetVersion() string { - if m != nil { - return m.Version +func (x *Wrapper) GetVersion() string { + if x != nil { + return x.Version } return "" } -func (m *Wrapper) GetExtensionName() string { - if m != nil { - return m.ExtensionName +func (x *Wrapper) GetExtensionName() string { + if x != nil { + return x.ExtensionName } return "" } -func (m *Wrapper) GetYaml() string { - if m != nil { - return m.Yaml +func (x *Wrapper) GetYaml() string { + if x != nil { + return x.Yaml } return "" } -func init() { - proto.RegisterType((*Version)(nil), "openapiextension.v1.Version") - proto.RegisterType((*ExtensionHandlerRequest)(nil), "openapiextension.v1.ExtensionHandlerRequest") - proto.RegisterType((*ExtensionHandlerResponse)(nil), "openapiextension.v1.ExtensionHandlerResponse") - proto.RegisterType((*Wrapper)(nil), "openapiextension.v1.Wrapper") -} - -func init() { proto.RegisterFile("extensions/extension.proto", fileDescriptor_661e47e790f76671) } - -var fileDescriptor_661e47e790f76671 = []byte{ - // 362 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x4d, 0x4b, 0xeb, 0x40, - 0x18, 0x85, 0x49, 0xbf, 0x72, 0x33, 0x97, 0xdb, 0x2b, 0x63, 0xd1, 0x58, 0x5c, 0x94, 0x80, 0x50, - 0x44, 0xa6, 0x54, 0xc1, 0x7d, 0x0b, 0x45, 0xdd, 0xd8, 0x32, 0x8b, 0xba, 0xb3, 0x4c, 0xd3, 0xb7, - 0x69, 0x24, 0x99, 0x19, 0x27, 0x1f, 0xb6, 0x7f, 0xc5, 0xa5, 0xbf, 0x54, 0x32, 0x93, 0xc4, 0x85, - 0xba, 0x9b, 0xf3, 0x70, 0xda, 0xf7, 0x9c, 0x13, 0xd4, 0x87, 0x7d, 0x0a, 0x3c, 0x09, 0x05, 0x4f, - 0x46, 0xf5, 0x93, 0x48, 0x25, 0x52, 0x81, 0x8f, 0x85, 0x04, 0xce, 0x64, 0xf8, 0xc5, 0xf3, 0x71, - 0xff, 0x2c, 0x10, 0x22, 0x88, 0x60, 0xa4, 0x2d, 0xeb, 0x6c, 0x3b, 0x62, 0xfc, 0x60, 0xfc, 0x9e, - 0x8f, 0xec, 0x25, 0xa8, 0xc2, 0x88, 0x7b, 0xa8, 0x1d, 0xb3, 0x17, 0xa1, 0x5c, 0x6b, 0x60, 0x0d, - 0xdb, 0xd4, 0x08, 0x4d, 0x43, 0x2e, 0x94, 0xdb, 0x28, 0x69, 0x21, 0x0a, 0x2a, 0x59, 0xea, 0xef, - 0xdc, 0xa6, 0xa1, 0x5a, 0xe0, 0x13, 0xd4, 0x49, 0xb2, 0xed, 0x36, 0xdc, 0xbb, 0xad, 0x81, 0x35, - 0x74, 0x68, 0xa9, 0xbc, 0x77, 0x0b, 0x9d, 0xce, 0xaa, 0x40, 0xf7, 0x8c, 0x6f, 0x22, 0x50, 0x14, - 0x5e, 0x33, 0x48, 0x52, 0x7c, 0x8b, 0xec, 0x37, 0xc5, 0xa4, 0x04, 0x73, 0xf7, 0xef, 0xf5, 0x39, - 0xf9, 0xa1, 0x02, 0x79, 0x32, 0x1e, 0x5a, 0x99, 0xf1, 0x1d, 0x3a, 0xf2, 0x45, 0x2c, 0xc3, 0x08, - 0xd4, 0x2a, 0x37, 0x0d, 0x74, 0x98, 0xdf, 0xfe, 0xa0, 0x6c, 0x49, 0xff, 0x57, 0xbf, 0x2a, 0x81, - 0x97, 0x23, 0xf7, 0x7b, 0xb6, 0x44, 0x0a, 0x9e, 0x00, 0x76, 0x91, 0xbd, 0xd3, 0x68, 0xa3, 0xc3, - 0xfd, 0xa1, 0x95, 0x2c, 0x06, 0x00, 0xa5, 0xf4, 0x2c, 0xcd, 0xa1, 0x43, 0x8d, 0xc0, 0x97, 0xa8, - 0x9d, 0xb3, 0x28, 0x83, 0x32, 0x49, 0x8f, 0x98, 0xe1, 0x49, 0x35, 0x3c, 0x99, 0xf0, 0x03, 0x35, - 0x16, 0xef, 0x19, 0xd9, 0x65, 0xa9, 0xe2, 0x4c, 0x55, 0xc1, 0xd2, 0xc3, 0x55, 0x12, 0x5f, 0xa0, - 0x6e, 0xdd, 0x62, 0xc5, 0x59, 0x0c, 0xfa, 0x33, 0x38, 0xf4, 0x5f, 0x4d, 0x1f, 0x59, 0x0c, 0x18, - 0xa3, 0xd6, 0x81, 0xc5, 0x91, 0x3e, 0xeb, 0x50, 0xfd, 0x9e, 0x5e, 0xa1, 0xae, 0x50, 0x01, 0x09, - 0xb8, 0x48, 0xd2, 0xd0, 0x27, 0xf9, 0x78, 0x8a, 0xe7, 0x12, 0xf8, 0x64, 0xf1, 0x50, 0xd7, 0x5d, - 0x8e, 0x17, 0xd6, 0x47, 0xa3, 0x39, 0x9f, 0xcc, 0xd6, 0x1d, 0x1d, 0xf1, 0xe6, 0x33, 0x00, 0x00, - 0xff, 0xff, 0xeb, 0xf3, 0xfa, 0x65, 0x5c, 0x02, 0x00, 0x00, +var File_extensions_extension_proto protoreflect.FileDescriptor + +var file_extensions_extension_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x67, 0x6e, + 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x63, 0x0a, + 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x6a, 0x6f, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x12, 0x14, + 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, + 0x69, 0x6e, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, + 0x66, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, + 0x69, 0x78, 0x22, 0x9c, 0x01, 0x0a, 0x17, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, + 0x0a, 0x07, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x07, + 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x22, 0x78, 0x0a, 0x18, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x61, + 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, + 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5e, 0x0a, 0x07, 0x57, + 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x42, 0x4b, 0x0a, 0x0e, 0x6f, + 0x72, 0x67, 0x2e, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x47, + 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, + 0x01, 0x5a, 0x1f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x67, 0x6e, + 0x6f, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x47, 0x4e, 0x58, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_extensions_extension_proto_rawDescOnce sync.Once + file_extensions_extension_proto_rawDescData = file_extensions_extension_proto_rawDesc +) + +func file_extensions_extension_proto_rawDescGZIP() []byte { + file_extensions_extension_proto_rawDescOnce.Do(func() { + file_extensions_extension_proto_rawDescData = protoimpl.X.CompressGZIP(file_extensions_extension_proto_rawDescData) + }) + return file_extensions_extension_proto_rawDescData +} + +var file_extensions_extension_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_extensions_extension_proto_goTypes = []interface{}{ + (*Version)(nil), // 0: gnostic.extension.v1.Version + (*ExtensionHandlerRequest)(nil), // 1: gnostic.extension.v1.ExtensionHandlerRequest + (*ExtensionHandlerResponse)(nil), // 2: gnostic.extension.v1.ExtensionHandlerResponse + (*Wrapper)(nil), // 3: gnostic.extension.v1.Wrapper + (*any.Any)(nil), // 4: google.protobuf.Any +} +var file_extensions_extension_proto_depIdxs = []int32{ + 3, // 0: gnostic.extension.v1.ExtensionHandlerRequest.wrapper:type_name -> gnostic.extension.v1.Wrapper + 0, // 1: gnostic.extension.v1.ExtensionHandlerRequest.compiler_version:type_name -> gnostic.extension.v1.Version + 4, // 2: gnostic.extension.v1.ExtensionHandlerResponse.value:type_name -> google.protobuf.Any + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_extensions_extension_proto_init() } +func file_extensions_extension_proto_init() { + if File_extensions_extension_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_extensions_extension_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Version); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_extensions_extension_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExtensionHandlerRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_extensions_extension_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExtensionHandlerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_extensions_extension_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Wrapper); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_extensions_extension_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_extensions_extension_proto_goTypes, + DependencyIndexes: file_extensions_extension_proto_depIdxs, + MessageInfos: file_extensions_extension_proto_msgTypes, + }.Build() + File_extensions_extension_proto = out.File + file_extensions_extension_proto_rawDesc = nil + file_extensions_extension_proto_goTypes = nil + file_extensions_extension_proto_depIdxs = nil } diff --git a/vendor/github.com/googleapis/gnostic/extensions/extension.proto b/vendor/github.com/googleapis/gnostic/extensions/extension.proto index 04856f91..8ac1faff 100644 --- a/vendor/github.com/googleapis/gnostic/extensions/extension.proto +++ b/vendor/github.com/googleapis/gnostic/extensions/extension.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. All Rights Reserved. +// Copyright 2017 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,8 +14,9 @@ syntax = "proto3"; +package gnostic.extension.v1; + import "google/protobuf/any.proto"; -package openapiextension.v1; // This option lets the proto compiler generate Java code inside the package // name (see below) instead of inside an outer class. It creates a simpler @@ -26,7 +27,7 @@ option java_multiple_files = true; // The Java outer classname should be the filename in UpperCamelCase. This // class is only used to hold proto descriptor, so developers don't need to // work with it directly. -option java_outer_classname = "OpenAPIExtensionV1"; +option java_outer_classname = "GnosticExtension"; // The Java package name must be proto package name with proper prefix. option java_package = "org.gnostic.v1"; @@ -37,9 +38,12 @@ option java_package = "org.gnostic.v1"; // hopefully unique enough to not conflict with things that may come along in // the future. 'GPB' is reserved for the protocol buffer implementation itself. // -option objc_class_prefix = "OAE"; // "OpenAPI Extension" +option objc_class_prefix = "GNX"; // "Gnostic Extension" + +// The Go package name. +option go_package = "extensions;gnostic_extension_v1"; -// The version number of OpenAPI compiler. +// The version number of Gnostic. message Version { int32 major = 1; int32 minor = 2; @@ -52,12 +56,11 @@ message Version { // An encoded Request is written to the ExtensionHandler's stdin. message ExtensionHandlerRequest { - // The OpenAPI descriptions that were explicitly listed on the command line. - // The specifications will appear in the order they are specified to gnostic. + // The extension to process. Wrapper wrapper = 1; - // The version number of openapi compiler. - Version compiler_version = 3; + // The version number of Gnostic. + Version compiler_version = 2; } // The extensions writes an encoded ExtensionHandlerResponse to stdout. @@ -66,7 +69,7 @@ message ExtensionHandlerResponse { // true if the extension is handled by the extension handler; false otherwise bool handled = 1; - // Error message. If non-empty, the extension handling failed. + // Error message(s). If non-empty, the extension handling failed. // The extension handler process should exit with status code zero // even if it reports an error in this way. // @@ -75,7 +78,7 @@ message ExtensionHandlerResponse { // itself -- such as the input Document being unparseable -- should be // reported by writing a message to stderr and exiting with a non-zero // status code. - repeated string error = 2; + repeated string errors = 2; // text output google.protobuf.Any value = 3; @@ -85,9 +88,9 @@ message Wrapper { // version of the OpenAPI specification in which this extension was written. string version = 1; - // Name of the extension + // Name of the extension. string extension_name = 2; - // Must be a valid yaml for the proto + // YAML-formatted extension value. string yaml = 3; } diff --git a/vendor/github.com/googleapis/gnostic/extensions/extensions.go b/vendor/github.com/googleapis/gnostic/extensions/extensions.go index 94a8e62a..ec8afd00 100644 --- a/vendor/github.com/googleapis/gnostic/extensions/extensions.go +++ b/vendor/github.com/googleapis/gnostic/extensions/extensions.go @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. All Rights Reserved. +// Copyright 2017 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,71 +12,53 @@ // See the License for the specific language governing permissions and // limitations under the License. -package openapiextension_v1 +package gnostic_extension_v1 import ( - "fmt" "io/ioutil" + "log" "os" "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" ) -type documentHandler func(version string, extensionName string, document string) type extensionHandler func(name string, yamlInput string) (bool, proto.Message, error) -func forInputYamlFromOpenapic(handler documentHandler) { +// Main implements the main program of an extension handler. +func Main(handler extensionHandler) { + // unpack the request data, err := ioutil.ReadAll(os.Stdin) if err != nil { - fmt.Println("File error:", err.Error()) + log.Println("File error:", err.Error()) os.Exit(1) } if len(data) == 0 { - fmt.Println("No input data.") + log.Println("No input data.") os.Exit(1) } request := &ExtensionHandlerRequest{} err = proto.Unmarshal(data, request) if err != nil { - fmt.Println("Input error:", err.Error()) + log.Println("Input error:", err.Error()) os.Exit(1) } - handler(request.Wrapper.Version, request.Wrapper.ExtensionName, request.Wrapper.Yaml) -} - -// ProcessExtension calles the handler for a specified extension. -func ProcessExtension(handleExtension extensionHandler) { - response := &ExtensionHandlerResponse{} - forInputYamlFromOpenapic( - func(version string, extensionName string, yamlInput string) { - var newObject proto.Message - var err error - - handled, newObject, err := handleExtension(extensionName, yamlInput) - if !handled { - responseBytes, _ := proto.Marshal(response) - os.Stdout.Write(responseBytes) - os.Exit(0) - } - - // If we reach here, then the extension is handled - response.Handled = true - if err != nil { - response.Error = append(response.Error, err.Error()) - responseBytes, _ := proto.Marshal(response) - os.Stdout.Write(responseBytes) - os.Exit(0) - } - response.Value, err = ptypes.MarshalAny(newObject) - if err != nil { - response.Error = append(response.Error, err.Error()) - responseBytes, _ := proto.Marshal(response) - os.Stdout.Write(responseBytes) - os.Exit(0) - } - }) - + // call the handler + handled, output, err := handler(request.Wrapper.ExtensionName, request.Wrapper.Yaml) + // respond with the output of the handler + response := &ExtensionHandlerResponse{ + Handled: false, // default assumption + Errors: make([]string, 0), + } + if err != nil { + response.Errors = append(response.Errors, err.Error()) + } else if handled { + response.Handled = true + response.Value, err = ptypes.MarshalAny(output) + if err != nil { + response.Errors = append(response.Errors, err.Error()) + } + } responseBytes, _ := proto.Marshal(response) os.Stdout.Write(responseBytes) } diff --git a/vendor/github.com/googleapis/gnostic/jsonschema/README.md b/vendor/github.com/googleapis/gnostic/jsonschema/README.md new file mode 100644 index 00000000..6793c517 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/jsonschema/README.md @@ -0,0 +1,4 @@ +# jsonschema + +This directory contains code for reading, writing, and manipulating JSON +schemas. diff --git a/vendor/github.com/googleapis/gnostic/jsonschema/base.go b/vendor/github.com/googleapis/gnostic/jsonschema/base.go new file mode 100644 index 00000000..0af8b148 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/jsonschema/base.go @@ -0,0 +1,84 @@ + +// THIS FILE IS AUTOMATICALLY GENERATED. + +package jsonschema + +import ( + "encoding/base64" +) + +func baseSchemaBytes() ([]byte, error){ + return base64.StdEncoding.DecodeString( +`ewogICAgImlkIjogImh0dHA6Ly9qc29uLXNjaGVtYS5vcmcvZHJhZnQtMDQvc2NoZW1hIyIsCiAgICAi +JHNjaGVtYSI6ICJodHRwOi8vanNvbi1zY2hlbWEub3JnL2RyYWZ0LTA0L3NjaGVtYSMiLAogICAgImRl +c2NyaXB0aW9uIjogIkNvcmUgc2NoZW1hIG1ldGEtc2NoZW1hIiwKICAgICJkZWZpbml0aW9ucyI6IHsK +ICAgICAgICAic2NoZW1hQXJyYXkiOiB7CiAgICAgICAgICAgICJ0eXBlIjogImFycmF5IiwKICAgICAg +ICAgICAgIm1pbkl0ZW1zIjogMSwKICAgICAgICAgICAgIml0ZW1zIjogeyAiJHJlZiI6ICIjIiB9CiAg +ICAgICAgfSwKICAgICAgICAicG9zaXRpdmVJbnRlZ2VyIjogewogICAgICAgICAgICAidHlwZSI6ICJp +bnRlZ2VyIiwKICAgICAgICAgICAgIm1pbmltdW0iOiAwCiAgICAgICAgfSwKICAgICAgICAicG9zaXRp +dmVJbnRlZ2VyRGVmYXVsdDAiOiB7CiAgICAgICAgICAgICJhbGxPZiI6IFsgeyAiJHJlZiI6ICIjL2Rl +ZmluaXRpb25zL3Bvc2l0aXZlSW50ZWdlciIgfSwgeyAiZGVmYXVsdCI6IDAgfSBdCiAgICAgICAgfSwK +ICAgICAgICAic2ltcGxlVHlwZXMiOiB7CiAgICAgICAgICAgICJlbnVtIjogWyAiYXJyYXkiLCAiYm9v +bGVhbiIsICJpbnRlZ2VyIiwgIm51bGwiLCAibnVtYmVyIiwgIm9iamVjdCIsICJzdHJpbmciIF0KICAg +ICAgICB9LAogICAgICAgICJzdHJpbmdBcnJheSI6IHsKICAgICAgICAgICAgInR5cGUiOiAiYXJyYXki +LAogICAgICAgICAgICAiaXRlbXMiOiB7ICJ0eXBlIjogInN0cmluZyIgfSwKICAgICAgICAgICAgIm1p +bkl0ZW1zIjogMSwKICAgICAgICAgICAgInVuaXF1ZUl0ZW1zIjogdHJ1ZQogICAgICAgIH0KICAgIH0s +CiAgICAidHlwZSI6ICJvYmplY3QiLAogICAgInByb3BlcnRpZXMiOiB7CiAgICAgICAgImlkIjogewog +ICAgICAgICAgICAidHlwZSI6ICJzdHJpbmciLAogICAgICAgICAgICAiZm9ybWF0IjogInVyaSIKICAg +ICAgICB9LAogICAgICAgICIkc2NoZW1hIjogewogICAgICAgICAgICAidHlwZSI6ICJzdHJpbmciLAog +ICAgICAgICAgICAiZm9ybWF0IjogInVyaSIKICAgICAgICB9LAogICAgICAgICJ0aXRsZSI6IHsKICAg +ICAgICAgICAgInR5cGUiOiAic3RyaW5nIgogICAgICAgIH0sCiAgICAgICAgImRlc2NyaXB0aW9uIjog +ewogICAgICAgICAgICAidHlwZSI6ICJzdHJpbmciCiAgICAgICAgfSwKICAgICAgICAiZGVmYXVsdCI6 +IHt9LAogICAgICAgICJtdWx0aXBsZU9mIjogewogICAgICAgICAgICAidHlwZSI6ICJudW1iZXIiLAog +ICAgICAgICAgICAibWluaW11bSI6IDAsCiAgICAgICAgICAgICJleGNsdXNpdmVNaW5pbXVtIjogdHJ1 +ZQogICAgICAgIH0sCiAgICAgICAgIm1heGltdW0iOiB7CiAgICAgICAgICAgICJ0eXBlIjogIm51bWJl +ciIKICAgICAgICB9LAogICAgICAgICJleGNsdXNpdmVNYXhpbXVtIjogewogICAgICAgICAgICAidHlw +ZSI6ICJib29sZWFuIiwKICAgICAgICAgICAgImRlZmF1bHQiOiBmYWxzZQogICAgICAgIH0sCiAgICAg +ICAgIm1pbmltdW0iOiB7CiAgICAgICAgICAgICJ0eXBlIjogIm51bWJlciIKICAgICAgICB9LAogICAg +ICAgICJleGNsdXNpdmVNaW5pbXVtIjogewogICAgICAgICAgICAidHlwZSI6ICJib29sZWFuIiwKICAg +ICAgICAgICAgImRlZmF1bHQiOiBmYWxzZQogICAgICAgIH0sCiAgICAgICAgIm1heExlbmd0aCI6IHsg +IiRyZWYiOiAiIy9kZWZpbml0aW9ucy9wb3NpdGl2ZUludGVnZXIiIH0sCiAgICAgICAgIm1pbkxlbmd0 +aCI6IHsgIiRyZWYiOiAiIy9kZWZpbml0aW9ucy9wb3NpdGl2ZUludGVnZXJEZWZhdWx0MCIgfSwKICAg +ICAgICAicGF0dGVybiI6IHsKICAgICAgICAgICAgInR5cGUiOiAic3RyaW5nIiwKICAgICAgICAgICAg +ImZvcm1hdCI6ICJyZWdleCIKICAgICAgICB9LAogICAgICAgICJhZGRpdGlvbmFsSXRlbXMiOiB7CiAg +ICAgICAgICAgICJhbnlPZiI6IFsKICAgICAgICAgICAgICAgIHsgInR5cGUiOiAiYm9vbGVhbiIgfSwK +ICAgICAgICAgICAgICAgIHsgIiRyZWYiOiAiIyIgfQogICAgICAgICAgICBdLAogICAgICAgICAgICAi +ZGVmYXVsdCI6IHt9CiAgICAgICAgfSwKICAgICAgICAiaXRlbXMiOiB7CiAgICAgICAgICAgICJhbnlP +ZiI6IFsKICAgICAgICAgICAgICAgIHsgIiRyZWYiOiAiIyIgfSwKICAgICAgICAgICAgICAgIHsgIiRy +ZWYiOiAiIy9kZWZpbml0aW9ucy9zY2hlbWFBcnJheSIgfQogICAgICAgICAgICBdLAogICAgICAgICAg +ICAiZGVmYXVsdCI6IHt9CiAgICAgICAgfSwKICAgICAgICAibWF4SXRlbXMiOiB7ICIkcmVmIjogIiMv +ZGVmaW5pdGlvbnMvcG9zaXRpdmVJbnRlZ2VyIiB9LAogICAgICAgICJtaW5JdGVtcyI6IHsgIiRyZWYi +OiAiIy9kZWZpbml0aW9ucy9wb3NpdGl2ZUludGVnZXJEZWZhdWx0MCIgfSwKICAgICAgICAidW5pcXVl +SXRlbXMiOiB7CiAgICAgICAgICAgICJ0eXBlIjogImJvb2xlYW4iLAogICAgICAgICAgICAiZGVmYXVs +dCI6IGZhbHNlCiAgICAgICAgfSwKICAgICAgICAibWF4UHJvcGVydGllcyI6IHsgIiRyZWYiOiAiIy9k +ZWZpbml0aW9ucy9wb3NpdGl2ZUludGVnZXIiIH0sCiAgICAgICAgIm1pblByb3BlcnRpZXMiOiB7ICIk +cmVmIjogIiMvZGVmaW5pdGlvbnMvcG9zaXRpdmVJbnRlZ2VyRGVmYXVsdDAiIH0sCiAgICAgICAgInJl +cXVpcmVkIjogeyAiJHJlZiI6ICIjL2RlZmluaXRpb25zL3N0cmluZ0FycmF5IiB9LAogICAgICAgICJh +ZGRpdGlvbmFsUHJvcGVydGllcyI6IHsKICAgICAgICAgICAgImFueU9mIjogWwogICAgICAgICAgICAg +ICAgeyAidHlwZSI6ICJib29sZWFuIiB9LAogICAgICAgICAgICAgICAgeyAiJHJlZiI6ICIjIiB9CiAg +ICAgICAgICAgIF0sCiAgICAgICAgICAgICJkZWZhdWx0Ijoge30KICAgICAgICB9LAogICAgICAgICJk +ZWZpbml0aW9ucyI6IHsKICAgICAgICAgICAgInR5cGUiOiAib2JqZWN0IiwKICAgICAgICAgICAgImFk +ZGl0aW9uYWxQcm9wZXJ0aWVzIjogeyAiJHJlZiI6ICIjIiB9LAogICAgICAgICAgICAiZGVmYXVsdCI6 +IHt9CiAgICAgICAgfSwKICAgICAgICAicHJvcGVydGllcyI6IHsKICAgICAgICAgICAgInR5cGUiOiAi +b2JqZWN0IiwKICAgICAgICAgICAgImFkZGl0aW9uYWxQcm9wZXJ0aWVzIjogeyAiJHJlZiI6ICIjIiB9 +LAogICAgICAgICAgICAiZGVmYXVsdCI6IHt9CiAgICAgICAgfSwKICAgICAgICAicGF0dGVyblByb3Bl +cnRpZXMiOiB7CiAgICAgICAgICAgICJ0eXBlIjogIm9iamVjdCIsCiAgICAgICAgICAgICJhZGRpdGlv +bmFsUHJvcGVydGllcyI6IHsgIiRyZWYiOiAiIyIgfSwKICAgICAgICAgICAgImRlZmF1bHQiOiB7fQog +ICAgICAgIH0sCiAgICAgICAgImRlcGVuZGVuY2llcyI6IHsKICAgICAgICAgICAgInR5cGUiOiAib2Jq +ZWN0IiwKICAgICAgICAgICAgImFkZGl0aW9uYWxQcm9wZXJ0aWVzIjogewogICAgICAgICAgICAgICAg +ImFueU9mIjogWwogICAgICAgICAgICAgICAgICAgIHsgIiRyZWYiOiAiIyIgfSwKICAgICAgICAgICAg +ICAgICAgICB7ICIkcmVmIjogIiMvZGVmaW5pdGlvbnMvc3RyaW5nQXJyYXkiIH0KICAgICAgICAgICAg +ICAgIF0KICAgICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgImVudW0iOiB7CiAgICAgICAgICAg +ICJ0eXBlIjogImFycmF5IiwKICAgICAgICAgICAgIm1pbkl0ZW1zIjogMSwKICAgICAgICAgICAgInVu +aXF1ZUl0ZW1zIjogdHJ1ZQogICAgICAgIH0sCiAgICAgICAgInR5cGUiOiB7CiAgICAgICAgICAgICJh +bnlPZiI6IFsKICAgICAgICAgICAgICAgIHsgIiRyZWYiOiAiIy9kZWZpbml0aW9ucy9zaW1wbGVUeXBl +cyIgfSwKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAidHlwZSI6ICJhcnJheSIs +CiAgICAgICAgICAgICAgICAgICAgIml0ZW1zIjogeyAiJHJlZiI6ICIjL2RlZmluaXRpb25zL3NpbXBs +ZVR5cGVzIiB9LAogICAgICAgICAgICAgICAgICAgICJtaW5JdGVtcyI6IDEsCiAgICAgICAgICAgICAg +ICAgICAgInVuaXF1ZUl0ZW1zIjogdHJ1ZQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICBdCiAg +ICAgICAgfSwKICAgICAgICAiYWxsT2YiOiB7ICIkcmVmIjogIiMvZGVmaW5pdGlvbnMvc2NoZW1hQXJy +YXkiIH0sCiAgICAgICAgImFueU9mIjogeyAiJHJlZiI6ICIjL2RlZmluaXRpb25zL3NjaGVtYUFycmF5 +IiB9LAogICAgICAgICJvbmVPZiI6IHsgIiRyZWYiOiAiIy9kZWZpbml0aW9ucy9zY2hlbWFBcnJheSIg +fSwKICAgICAgICAibm90IjogeyAiJHJlZiI6ICIjIiB9CiAgICB9LAogICAgImRlcGVuZGVuY2llcyI6 +IHsKICAgICAgICAiZXhjbHVzaXZlTWF4aW11bSI6IFsgIm1heGltdW0iIF0sCiAgICAgICAgImV4Y2x1 +c2l2ZU1pbmltdW0iOiBbICJtaW5pbXVtIiBdCiAgICB9LAogICAgImRlZmF1bHQiOiB7fQp9Cg==`)} \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/jsonschema/display.go b/vendor/github.com/googleapis/gnostic/jsonschema/display.go new file mode 100644 index 00000000..028a760a --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/jsonschema/display.go @@ -0,0 +1,229 @@ +// Copyright 2017 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package jsonschema + +import ( + "fmt" + "strings" +) + +// +// DISPLAY +// The following methods display Schemas. +// + +// Description returns a string representation of a string or string array. +func (s *StringOrStringArray) Description() string { + if s.String != nil { + return *s.String + } + if s.StringArray != nil { + return strings.Join(*s.StringArray, ", ") + } + return "" +} + +// Returns a string representation of a Schema. +func (schema *Schema) String() string { + return schema.describeSchema("") +} + +// Helper: Returns a string representation of a Schema indented by a specified string. +func (schema *Schema) describeSchema(indent string) string { + result := "" + if schema.Schema != nil { + result += indent + "$schema: " + *(schema.Schema) + "\n" + } + if schema.ID != nil { + result += indent + "id: " + *(schema.ID) + "\n" + } + if schema.MultipleOf != nil { + result += indent + fmt.Sprintf("multipleOf: %+v\n", *(schema.MultipleOf)) + } + if schema.Maximum != nil { + result += indent + fmt.Sprintf("maximum: %+v\n", *(schema.Maximum)) + } + if schema.ExclusiveMaximum != nil { + result += indent + fmt.Sprintf("exclusiveMaximum: %+v\n", *(schema.ExclusiveMaximum)) + } + if schema.Minimum != nil { + result += indent + fmt.Sprintf("minimum: %+v\n", *(schema.Minimum)) + } + if schema.ExclusiveMinimum != nil { + result += indent + fmt.Sprintf("exclusiveMinimum: %+v\n", *(schema.ExclusiveMinimum)) + } + if schema.MaxLength != nil { + result += indent + fmt.Sprintf("maxLength: %+v\n", *(schema.MaxLength)) + } + if schema.MinLength != nil { + result += indent + fmt.Sprintf("minLength: %+v\n", *(schema.MinLength)) + } + if schema.Pattern != nil { + result += indent + fmt.Sprintf("pattern: %+v\n", *(schema.Pattern)) + } + if schema.AdditionalItems != nil { + s := schema.AdditionalItems.Schema + if s != nil { + result += indent + "additionalItems:\n" + result += s.describeSchema(indent + " ") + } else { + b := *(schema.AdditionalItems.Boolean) + result += indent + fmt.Sprintf("additionalItems: %+v\n", b) + } + } + if schema.Items != nil { + result += indent + "items:\n" + items := schema.Items + if items.SchemaArray != nil { + for i, s := range *(items.SchemaArray) { + result += indent + " " + fmt.Sprintf("%d", i) + ":\n" + result += s.describeSchema(indent + " " + " ") + } + } else if items.Schema != nil { + result += items.Schema.describeSchema(indent + " " + " ") + } + } + if schema.MaxItems != nil { + result += indent + fmt.Sprintf("maxItems: %+v\n", *(schema.MaxItems)) + } + if schema.MinItems != nil { + result += indent + fmt.Sprintf("minItems: %+v\n", *(schema.MinItems)) + } + if schema.UniqueItems != nil { + result += indent + fmt.Sprintf("uniqueItems: %+v\n", *(schema.UniqueItems)) + } + if schema.MaxProperties != nil { + result += indent + fmt.Sprintf("maxProperties: %+v\n", *(schema.MaxProperties)) + } + if schema.MinProperties != nil { + result += indent + fmt.Sprintf("minProperties: %+v\n", *(schema.MinProperties)) + } + if schema.Required != nil { + result += indent + fmt.Sprintf("required: %+v\n", *(schema.Required)) + } + if schema.AdditionalProperties != nil { + s := schema.AdditionalProperties.Schema + if s != nil { + result += indent + "additionalProperties:\n" + result += s.describeSchema(indent + " ") + } else { + b := *(schema.AdditionalProperties.Boolean) + result += indent + fmt.Sprintf("additionalProperties: %+v\n", b) + } + } + if schema.Properties != nil { + result += indent + "properties:\n" + for _, pair := range *(schema.Properties) { + name := pair.Name + s := pair.Value + result += indent + " " + name + ":\n" + result += s.describeSchema(indent + " " + " ") + } + } + if schema.PatternProperties != nil { + result += indent + "patternProperties:\n" + for _, pair := range *(schema.PatternProperties) { + name := pair.Name + s := pair.Value + result += indent + " " + name + ":\n" + result += s.describeSchema(indent + " " + " ") + } + } + if schema.Dependencies != nil { + result += indent + "dependencies:\n" + for _, pair := range *(schema.Dependencies) { + name := pair.Name + schemaOrStringArray := pair.Value + s := schemaOrStringArray.Schema + if s != nil { + result += indent + " " + name + ":\n" + result += s.describeSchema(indent + " " + " ") + } else { + a := schemaOrStringArray.StringArray + if a != nil { + result += indent + " " + name + ":\n" + for _, s2 := range *a { + result += indent + " " + " " + s2 + "\n" + } + } + } + + } + } + if schema.Enumeration != nil { + result += indent + "enumeration:\n" + for _, value := range *(schema.Enumeration) { + if value.String != nil { + result += indent + " " + fmt.Sprintf("%+v\n", *value.String) + } else { + result += indent + " " + fmt.Sprintf("%+v\n", *value.Bool) + } + } + } + if schema.Type != nil { + result += indent + fmt.Sprintf("type: %+v\n", schema.Type.Description()) + } + if schema.AllOf != nil { + result += indent + "allOf:\n" + for _, s := range *(schema.AllOf) { + result += s.describeSchema(indent + " ") + result += indent + "-\n" + } + } + if schema.AnyOf != nil { + result += indent + "anyOf:\n" + for _, s := range *(schema.AnyOf) { + result += s.describeSchema(indent + " ") + result += indent + "-\n" + } + } + if schema.OneOf != nil { + result += indent + "oneOf:\n" + for _, s := range *(schema.OneOf) { + result += s.describeSchema(indent + " ") + result += indent + "-\n" + } + } + if schema.Not != nil { + result += indent + "not:\n" + result += schema.Not.describeSchema(indent + " ") + } + if schema.Definitions != nil { + result += indent + "definitions:\n" + for _, pair := range *(schema.Definitions) { + name := pair.Name + s := pair.Value + result += indent + " " + name + ":\n" + result += s.describeSchema(indent + " " + " ") + } + } + if schema.Title != nil { + result += indent + "title: " + *(schema.Title) + "\n" + } + if schema.Description != nil { + result += indent + "description: " + *(schema.Description) + "\n" + } + if schema.Default != nil { + result += indent + "default:\n" + result += indent + fmt.Sprintf(" %+v\n", *(schema.Default)) + } + if schema.Format != nil { + result += indent + "format: " + *(schema.Format) + "\n" + } + if schema.Ref != nil { + result += indent + "$ref: " + *(schema.Ref) + "\n" + } + return result +} diff --git a/vendor/github.com/googleapis/gnostic/jsonschema/models.go b/vendor/github.com/googleapis/gnostic/jsonschema/models.go new file mode 100644 index 00000000..4781bdc5 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/jsonschema/models.go @@ -0,0 +1,228 @@ +// Copyright 2017 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package jsonschema supports the reading, writing, and manipulation +// of JSON Schemas. +package jsonschema + +import "gopkg.in/yaml.v3" + +// The Schema struct models a JSON Schema and, because schemas are +// defined hierarchically, contains many references to itself. +// All fields are pointers and are nil if the associated values +// are not specified. +type Schema struct { + Schema *string // $schema + ID *string // id keyword used for $ref resolution scope + Ref *string // $ref, i.e. JSON Pointers + + // http://json-schema.org/latest/json-schema-validation.html + // 5.1. Validation keywords for numeric instances (number and integer) + MultipleOf *SchemaNumber + Maximum *SchemaNumber + ExclusiveMaximum *bool + Minimum *SchemaNumber + ExclusiveMinimum *bool + + // 5.2. Validation keywords for strings + MaxLength *int64 + MinLength *int64 + Pattern *string + + // 5.3. Validation keywords for arrays + AdditionalItems *SchemaOrBoolean + Items *SchemaOrSchemaArray + MaxItems *int64 + MinItems *int64 + UniqueItems *bool + + // 5.4. Validation keywords for objects + MaxProperties *int64 + MinProperties *int64 + Required *[]string + AdditionalProperties *SchemaOrBoolean + Properties *[]*NamedSchema + PatternProperties *[]*NamedSchema + Dependencies *[]*NamedSchemaOrStringArray + + // 5.5. Validation keywords for any instance type + Enumeration *[]SchemaEnumValue + Type *StringOrStringArray + AllOf *[]*Schema + AnyOf *[]*Schema + OneOf *[]*Schema + Not *Schema + Definitions *[]*NamedSchema + + // 6. Metadata keywords + Title *string + Description *string + Default *yaml.Node + + // 7. Semantic validation with "format" + Format *string +} + +// These helper structs represent "combination" types that generally can +// have values of one type or another. All are used to represent parts +// of Schemas. + +// SchemaNumber represents a value that can be either an Integer or a Float. +type SchemaNumber struct { + Integer *int64 + Float *float64 +} + +// NewSchemaNumberWithInteger creates and returns a new object +func NewSchemaNumberWithInteger(i int64) *SchemaNumber { + result := &SchemaNumber{} + result.Integer = &i + return result +} + +// NewSchemaNumberWithFloat creates and returns a new object +func NewSchemaNumberWithFloat(f float64) *SchemaNumber { + result := &SchemaNumber{} + result.Float = &f + return result +} + +// SchemaOrBoolean represents a value that can be either a Schema or a Boolean. +type SchemaOrBoolean struct { + Schema *Schema + Boolean *bool +} + +// NewSchemaOrBooleanWithSchema creates and returns a new object +func NewSchemaOrBooleanWithSchema(s *Schema) *SchemaOrBoolean { + result := &SchemaOrBoolean{} + result.Schema = s + return result +} + +// NewSchemaOrBooleanWithBoolean creates and returns a new object +func NewSchemaOrBooleanWithBoolean(b bool) *SchemaOrBoolean { + result := &SchemaOrBoolean{} + result.Boolean = &b + return result +} + +// StringOrStringArray represents a value that can be either +// a String or an Array of Strings. +type StringOrStringArray struct { + String *string + StringArray *[]string +} + +// NewStringOrStringArrayWithString creates and returns a new object +func NewStringOrStringArrayWithString(s string) *StringOrStringArray { + result := &StringOrStringArray{} + result.String = &s + return result +} + +// NewStringOrStringArrayWithStringArray creates and returns a new object +func NewStringOrStringArrayWithStringArray(a []string) *StringOrStringArray { + result := &StringOrStringArray{} + result.StringArray = &a + return result +} + +// SchemaOrStringArray represents a value that can be either +// a Schema or an Array of Strings. +type SchemaOrStringArray struct { + Schema *Schema + StringArray *[]string +} + +// SchemaOrSchemaArray represents a value that can be either +// a Schema or an Array of Schemas. +type SchemaOrSchemaArray struct { + Schema *Schema + SchemaArray *[]*Schema +} + +// NewSchemaOrSchemaArrayWithSchema creates and returns a new object +func NewSchemaOrSchemaArrayWithSchema(s *Schema) *SchemaOrSchemaArray { + result := &SchemaOrSchemaArray{} + result.Schema = s + return result +} + +// NewSchemaOrSchemaArrayWithSchemaArray creates and returns a new object +func NewSchemaOrSchemaArrayWithSchemaArray(a []*Schema) *SchemaOrSchemaArray { + result := &SchemaOrSchemaArray{} + result.SchemaArray = &a + return result +} + +// SchemaEnumValue represents a value that can be part of an +// enumeration in a Schema. +type SchemaEnumValue struct { + String *string + Bool *bool +} + +// NamedSchema is a name-value pair that is used to emulate maps +// with ordered keys. +type NamedSchema struct { + Name string + Value *Schema +} + +// NewNamedSchema creates and returns a new object +func NewNamedSchema(name string, value *Schema) *NamedSchema { + return &NamedSchema{Name: name, Value: value} +} + +// NamedSchemaOrStringArray is a name-value pair that is used +// to emulate maps with ordered keys. +type NamedSchemaOrStringArray struct { + Name string + Value *SchemaOrStringArray +} + +// Access named subschemas by name + +func namedSchemaArrayElementWithName(array *[]*NamedSchema, name string) *Schema { + if array == nil { + return nil + } + for _, pair := range *array { + if pair.Name == name { + return pair.Value + } + } + return nil +} + +// PropertyWithName returns the selected element. +func (s *Schema) PropertyWithName(name string) *Schema { + return namedSchemaArrayElementWithName(s.Properties, name) +} + +// PatternPropertyWithName returns the selected element. +func (s *Schema) PatternPropertyWithName(name string) *Schema { + return namedSchemaArrayElementWithName(s.PatternProperties, name) +} + +// DefinitionWithName returns the selected element. +func (s *Schema) DefinitionWithName(name string) *Schema { + return namedSchemaArrayElementWithName(s.Definitions, name) +} + +// AddProperty adds a named property. +func (s *Schema) AddProperty(name string, property *Schema) { + *s.Properties = append(*s.Properties, NewNamedSchema(name, property)) +} diff --git a/vendor/github.com/googleapis/gnostic/jsonschema/operations.go b/vendor/github.com/googleapis/gnostic/jsonschema/operations.go new file mode 100644 index 00000000..ba8dd4a9 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/jsonschema/operations.go @@ -0,0 +1,394 @@ +// Copyright 2017 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package jsonschema + +import ( + "fmt" + "log" + "strings" +) + +// +// OPERATIONS +// The following methods perform operations on Schemas. +// + +// IsEmpty returns true if no members of the Schema are specified. +func (schema *Schema) IsEmpty() bool { + return (schema.Schema == nil) && + (schema.ID == nil) && + (schema.MultipleOf == nil) && + (schema.Maximum == nil) && + (schema.ExclusiveMaximum == nil) && + (schema.Minimum == nil) && + (schema.ExclusiveMinimum == nil) && + (schema.MaxLength == nil) && + (schema.MinLength == nil) && + (schema.Pattern == nil) && + (schema.AdditionalItems == nil) && + (schema.Items == nil) && + (schema.MaxItems == nil) && + (schema.MinItems == nil) && + (schema.UniqueItems == nil) && + (schema.MaxProperties == nil) && + (schema.MinProperties == nil) && + (schema.Required == nil) && + (schema.AdditionalProperties == nil) && + (schema.Properties == nil) && + (schema.PatternProperties == nil) && + (schema.Dependencies == nil) && + (schema.Enumeration == nil) && + (schema.Type == nil) && + (schema.AllOf == nil) && + (schema.AnyOf == nil) && + (schema.OneOf == nil) && + (schema.Not == nil) && + (schema.Definitions == nil) && + (schema.Title == nil) && + (schema.Description == nil) && + (schema.Default == nil) && + (schema.Format == nil) && + (schema.Ref == nil) +} + +// IsEqual returns true if two schemas are equal. +func (schema *Schema) IsEqual(schema2 *Schema) bool { + return schema.String() == schema2.String() +} + +// SchemaOperation represents a function that can be applied to a Schema. +type SchemaOperation func(schema *Schema, context string) + +// Applies a specified function to a Schema and all of the Schemas that it contains. +func (schema *Schema) applyToSchemas(operation SchemaOperation, context string) { + + if schema.AdditionalItems != nil { + s := schema.AdditionalItems.Schema + if s != nil { + s.applyToSchemas(operation, "AdditionalItems") + } + } + + if schema.Items != nil { + if schema.Items.SchemaArray != nil { + for _, s := range *(schema.Items.SchemaArray) { + s.applyToSchemas(operation, "Items.SchemaArray") + } + } else if schema.Items.Schema != nil { + schema.Items.Schema.applyToSchemas(operation, "Items.Schema") + } + } + + if schema.AdditionalProperties != nil { + s := schema.AdditionalProperties.Schema + if s != nil { + s.applyToSchemas(operation, "AdditionalProperties") + } + } + + if schema.Properties != nil { + for _, pair := range *(schema.Properties) { + s := pair.Value + s.applyToSchemas(operation, "Properties") + } + } + if schema.PatternProperties != nil { + for _, pair := range *(schema.PatternProperties) { + s := pair.Value + s.applyToSchemas(operation, "PatternProperties") + } + } + + if schema.Dependencies != nil { + for _, pair := range *(schema.Dependencies) { + schemaOrStringArray := pair.Value + s := schemaOrStringArray.Schema + if s != nil { + s.applyToSchemas(operation, "Dependencies") + } + } + } + + if schema.AllOf != nil { + for _, s := range *(schema.AllOf) { + s.applyToSchemas(operation, "AllOf") + } + } + if schema.AnyOf != nil { + for _, s := range *(schema.AnyOf) { + s.applyToSchemas(operation, "AnyOf") + } + } + if schema.OneOf != nil { + for _, s := range *(schema.OneOf) { + s.applyToSchemas(operation, "OneOf") + } + } + if schema.Not != nil { + schema.Not.applyToSchemas(operation, "Not") + } + + if schema.Definitions != nil { + for _, pair := range *(schema.Definitions) { + s := pair.Value + s.applyToSchemas(operation, "Definitions") + } + } + + operation(schema, context) +} + +// CopyProperties copies all non-nil properties from the source Schema to the schema Schema. +func (schema *Schema) CopyProperties(source *Schema) { + if source.Schema != nil { + schema.Schema = source.Schema + } + if source.ID != nil { + schema.ID = source.ID + } + if source.MultipleOf != nil { + schema.MultipleOf = source.MultipleOf + } + if source.Maximum != nil { + schema.Maximum = source.Maximum + } + if source.ExclusiveMaximum != nil { + schema.ExclusiveMaximum = source.ExclusiveMaximum + } + if source.Minimum != nil { + schema.Minimum = source.Minimum + } + if source.ExclusiveMinimum != nil { + schema.ExclusiveMinimum = source.ExclusiveMinimum + } + if source.MaxLength != nil { + schema.MaxLength = source.MaxLength + } + if source.MinLength != nil { + schema.MinLength = source.MinLength + } + if source.Pattern != nil { + schema.Pattern = source.Pattern + } + if source.AdditionalItems != nil { + schema.AdditionalItems = source.AdditionalItems + } + if source.Items != nil { + schema.Items = source.Items + } + if source.MaxItems != nil { + schema.MaxItems = source.MaxItems + } + if source.MinItems != nil { + schema.MinItems = source.MinItems + } + if source.UniqueItems != nil { + schema.UniqueItems = source.UniqueItems + } + if source.MaxProperties != nil { + schema.MaxProperties = source.MaxProperties + } + if source.MinProperties != nil { + schema.MinProperties = source.MinProperties + } + if source.Required != nil { + schema.Required = source.Required + } + if source.AdditionalProperties != nil { + schema.AdditionalProperties = source.AdditionalProperties + } + if source.Properties != nil { + schema.Properties = source.Properties + } + if source.PatternProperties != nil { + schema.PatternProperties = source.PatternProperties + } + if source.Dependencies != nil { + schema.Dependencies = source.Dependencies + } + if source.Enumeration != nil { + schema.Enumeration = source.Enumeration + } + if source.Type != nil { + schema.Type = source.Type + } + if source.AllOf != nil { + schema.AllOf = source.AllOf + } + if source.AnyOf != nil { + schema.AnyOf = source.AnyOf + } + if source.OneOf != nil { + schema.OneOf = source.OneOf + } + if source.Not != nil { + schema.Not = source.Not + } + if source.Definitions != nil { + schema.Definitions = source.Definitions + } + if source.Title != nil { + schema.Title = source.Title + } + if source.Description != nil { + schema.Description = source.Description + } + if source.Default != nil { + schema.Default = source.Default + } + if source.Format != nil { + schema.Format = source.Format + } + if source.Ref != nil { + schema.Ref = source.Ref + } +} + +// TypeIs returns true if the Type of a Schema includes the specified type +func (schema *Schema) TypeIs(typeName string) bool { + if schema.Type != nil { + // the schema Type is either a string or an array of strings + if schema.Type.String != nil { + return (*(schema.Type.String) == typeName) + } else if schema.Type.StringArray != nil { + for _, n := range *(schema.Type.StringArray) { + if n == typeName { + return true + } + } + } + } + return false +} + +// ResolveRefs resolves "$ref" elements in a Schema and its children. +// But if a reference refers to an object type, is inside a oneOf, or contains a oneOf, +// the reference is kept and we expect downstream tools to separately model these +// referenced schemas. +func (schema *Schema) ResolveRefs() { + rootSchema := schema + count := 1 + for count > 0 { + count = 0 + schema.applyToSchemas( + func(schema *Schema, context string) { + if schema.Ref != nil { + resolvedRef, err := rootSchema.resolveJSONPointer(*(schema.Ref)) + if err != nil { + log.Printf("%+v", err) + } else if resolvedRef.TypeIs("object") { + // don't substitute for objects, we'll model the referenced schema with a class + } else if context == "OneOf" { + // don't substitute for references inside oneOf declarations + } else if resolvedRef.OneOf != nil { + // don't substitute for references that contain oneOf declarations + } else if resolvedRef.AdditionalProperties != nil { + // don't substitute for references that look like objects + } else { + schema.Ref = nil + schema.CopyProperties(resolvedRef) + count++ + } + } + }, "") + } +} + +// resolveJSONPointer resolves JSON pointers. +// This current implementation is very crude and custom for OpenAPI 2.0 schemas. +// It panics for any pointer that it is unable to resolve. +func (schema *Schema) resolveJSONPointer(ref string) (result *Schema, err error) { + parts := strings.Split(ref, "#") + if len(parts) == 2 { + documentName := parts[0] + "#" + if documentName == "#" && schema.ID != nil { + documentName = *(schema.ID) + } + path := parts[1] + document := schemas[documentName] + pathParts := strings.Split(path, "/") + + // we currently do a very limited (hard-coded) resolution of certain paths and log errors for missed cases + if len(pathParts) == 1 { + return document, nil + } else if len(pathParts) == 3 { + switch pathParts[1] { + case "definitions": + dictionary := document.Definitions + for _, pair := range *dictionary { + if pair.Name == pathParts[2] { + result = pair.Value + } + } + case "properties": + dictionary := document.Properties + for _, pair := range *dictionary { + if pair.Name == pathParts[2] { + result = pair.Value + } + } + default: + break + } + } + } + if result == nil { + return nil, fmt.Errorf("unresolved pointer: %+v", ref) + } + return result, nil +} + +// ResolveAllOfs replaces "allOf" elements by merging their properties into the parent Schema. +func (schema *Schema) ResolveAllOfs() { + schema.applyToSchemas( + func(schema *Schema, context string) { + if schema.AllOf != nil { + for _, allOf := range *(schema.AllOf) { + schema.CopyProperties(allOf) + } + schema.AllOf = nil + } + }, "resolveAllOfs") +} + +// ResolveAnyOfs replaces all "anyOf" elements with "oneOf". +func (schema *Schema) ResolveAnyOfs() { + schema.applyToSchemas( + func(schema *Schema, context string) { + if schema.AnyOf != nil { + schema.OneOf = schema.AnyOf + schema.AnyOf = nil + } + }, "resolveAnyOfs") +} + +// return a pointer to a copy of a passed-in string +func stringptr(input string) (output *string) { + return &input +} + +// CopyOfficialSchemaProperty copies a named property from the official JSON Schema definition +func (schema *Schema) CopyOfficialSchemaProperty(name string) { + *schema.Properties = append(*schema.Properties, + NewNamedSchema(name, + &Schema{Ref: stringptr("http://json-schema.org/draft-04/schema#/properties/" + name)})) +} + +// CopyOfficialSchemaProperties copies named properties from the official JSON Schema definition +func (schema *Schema) CopyOfficialSchemaProperties(names []string) { + for _, name := range names { + schema.CopyOfficialSchemaProperty(name) + } +} diff --git a/vendor/github.com/googleapis/gnostic/jsonschema/reader.go b/vendor/github.com/googleapis/gnostic/jsonschema/reader.go new file mode 100644 index 00000000..b8583d46 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/jsonschema/reader.go @@ -0,0 +1,442 @@ +// Copyright 2017 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:generate go run generate-base.go + +package jsonschema + +import ( + "fmt" + "io/ioutil" + "strconv" + + "gopkg.in/yaml.v3" +) + +// This is a global map of all known Schemas. +// It is initialized when the first Schema is created and inserted. +var schemas map[string]*Schema + +// NewBaseSchema builds a schema object from an embedded json representation. +func NewBaseSchema() (schema *Schema, err error) { + b, err := baseSchemaBytes() + if err != nil { + return nil, err + } + var node yaml.Node + err = yaml.Unmarshal(b, &node) + if err != nil { + return nil, err + } + return NewSchemaFromObject(&node), nil +} + +// NewSchemaFromFile reads a schema from a file. +// Currently this assumes that schemas are stored in the source distribution of this project. +func NewSchemaFromFile(filename string) (schema *Schema, err error) { + file, err := ioutil.ReadFile(filename) + if err != nil { + return nil, err + } + var node yaml.Node + err = yaml.Unmarshal(file, &node) + if err != nil { + return nil, err + } + return NewSchemaFromObject(&node), nil +} + +// NewSchemaFromObject constructs a schema from a parsed JSON object. +// Due to the complexity of the schema representation, this is a +// custom reader and not the standard Go JSON reader (encoding/json). +func NewSchemaFromObject(jsonData *yaml.Node) *Schema { + switch jsonData.Kind { + case yaml.DocumentNode: + return NewSchemaFromObject(jsonData.Content[0]) + case yaml.MappingNode: + schema := &Schema{} + + for i := 0; i < len(jsonData.Content); i += 2 { + k := jsonData.Content[i].Value + v := jsonData.Content[i+1] + + switch k { + case "$schema": + schema.Schema = schema.stringValue(v) + case "id": + schema.ID = schema.stringValue(v) + + case "multipleOf": + schema.MultipleOf = schema.numberValue(v) + case "maximum": + schema.Maximum = schema.numberValue(v) + case "exclusiveMaximum": + schema.ExclusiveMaximum = schema.boolValue(v) + case "minimum": + schema.Minimum = schema.numberValue(v) + case "exclusiveMinimum": + schema.ExclusiveMinimum = schema.boolValue(v) + + case "maxLength": + schema.MaxLength = schema.intValue(v) + case "minLength": + schema.MinLength = schema.intValue(v) + case "pattern": + schema.Pattern = schema.stringValue(v) + + case "additionalItems": + schema.AdditionalItems = schema.schemaOrBooleanValue(v) + case "items": + schema.Items = schema.schemaOrSchemaArrayValue(v) + case "maxItems": + schema.MaxItems = schema.intValue(v) + case "minItems": + schema.MinItems = schema.intValue(v) + case "uniqueItems": + schema.UniqueItems = schema.boolValue(v) + + case "maxProperties": + schema.MaxProperties = schema.intValue(v) + case "minProperties": + schema.MinProperties = schema.intValue(v) + case "required": + schema.Required = schema.arrayOfStringsValue(v) + case "additionalProperties": + schema.AdditionalProperties = schema.schemaOrBooleanValue(v) + case "properties": + schema.Properties = schema.mapOfSchemasValue(v) + case "patternProperties": + schema.PatternProperties = schema.mapOfSchemasValue(v) + case "dependencies": + schema.Dependencies = schema.mapOfSchemasOrStringArraysValue(v) + + case "enum": + schema.Enumeration = schema.arrayOfEnumValuesValue(v) + + case "type": + schema.Type = schema.stringOrStringArrayValue(v) + case "allOf": + schema.AllOf = schema.arrayOfSchemasValue(v) + case "anyOf": + schema.AnyOf = schema.arrayOfSchemasValue(v) + case "oneOf": + schema.OneOf = schema.arrayOfSchemasValue(v) + case "not": + schema.Not = NewSchemaFromObject(v) + case "definitions": + schema.Definitions = schema.mapOfSchemasValue(v) + + case "title": + schema.Title = schema.stringValue(v) + case "description": + schema.Description = schema.stringValue(v) + + case "default": + schema.Default = v + + case "format": + schema.Format = schema.stringValue(v) + case "$ref": + schema.Ref = schema.stringValue(v) + default: + fmt.Printf("UNSUPPORTED (%s)\n", k) + } + } + + // insert schema in global map + if schema.ID != nil { + if schemas == nil { + schemas = make(map[string]*Schema, 0) + } + schemas[*(schema.ID)] = schema + } + return schema + + default: + fmt.Printf("schemaValue: unexpected node %+v\n", jsonData) + return nil + } + + return nil +} + +// +// BUILDERS +// The following methods build elements of Schemas from interface{} values. +// Each returns nil if it is unable to build the desired element. +// + +// Gets the string value of an interface{} value if possible. +func (schema *Schema) stringValue(v *yaml.Node) *string { + switch v.Kind { + case yaml.ScalarNode: + return &v.Value + default: + fmt.Printf("stringValue: unexpected node %+v\n", v) + } + return nil +} + +// Gets the numeric value of an interface{} value if possible. +func (schema *Schema) numberValue(v *yaml.Node) *SchemaNumber { + number := &SchemaNumber{} + switch v.Kind { + case yaml.ScalarNode: + switch v.Tag { + case "!!float": + v2, _ := strconv.ParseFloat(v.Value, 64) + number.Float = &v2 + return number + case "!!int": + v2, _ := strconv.ParseInt(v.Value, 10, 64) + number.Integer = &v2 + return number + default: + fmt.Printf("stringValue: unexpected node %+v\n", v) + } + default: + fmt.Printf("stringValue: unexpected node %+v\n", v) + } + return nil +} + +// Gets the integer value of an interface{} value if possible. +func (schema *Schema) intValue(v *yaml.Node) *int64 { + switch v.Kind { + case yaml.ScalarNode: + switch v.Tag { + case "!!float": + v2, _ := strconv.ParseFloat(v.Value, 64) + v3 := int64(v2) + return &v3 + case "!!int": + v2, _ := strconv.ParseInt(v.Value, 10, 64) + return &v2 + default: + fmt.Printf("intValue: unexpected node %+v\n", v) + } + default: + fmt.Printf("intValue: unexpected node %+v\n", v) + } + return nil +} + +// Gets the bool value of an interface{} value if possible. +func (schema *Schema) boolValue(v *yaml.Node) *bool { + switch v.Kind { + case yaml.ScalarNode: + switch v.Tag { + case "!!bool": + v2, _ := strconv.ParseBool(v.Value) + return &v2 + default: + fmt.Printf("boolValue: unexpected node %+v\n", v) + } + default: + fmt.Printf("boolValue: unexpected node %+v\n", v) + } + return nil +} + +// Gets a map of Schemas from an interface{} value if possible. +func (schema *Schema) mapOfSchemasValue(v *yaml.Node) *[]*NamedSchema { + switch v.Kind { + case yaml.MappingNode: + m := make([]*NamedSchema, 0) + for i := 0; i < len(v.Content); i += 2 { + k2 := v.Content[i].Value + v2 := v.Content[i+1] + pair := &NamedSchema{Name: k2, Value: NewSchemaFromObject(v2)} + m = append(m, pair) + } + return &m + default: + fmt.Printf("mapOfSchemasValue: unexpected node %+v\n", v) + } + return nil +} + +// Gets an array of Schemas from an interface{} value if possible. +func (schema *Schema) arrayOfSchemasValue(v *yaml.Node) *[]*Schema { + switch v.Kind { + case yaml.SequenceNode: + m := make([]*Schema, 0) + for _, v2 := range v.Content { + switch v2.Kind { + case yaml.MappingNode: + s := NewSchemaFromObject(v2) + m = append(m, s) + default: + fmt.Printf("arrayOfSchemasValue: unexpected node %+v\n", v2) + } + } + return &m + case yaml.MappingNode: + m := make([]*Schema, 0) + s := NewSchemaFromObject(v) + m = append(m, s) + return &m + default: + fmt.Printf("arrayOfSchemasValue: unexpected node %+v\n", v) + } + return nil +} + +// Gets a Schema or an array of Schemas from an interface{} value if possible. +func (schema *Schema) schemaOrSchemaArrayValue(v *yaml.Node) *SchemaOrSchemaArray { + switch v.Kind { + case yaml.SequenceNode: + m := make([]*Schema, 0) + for _, v2 := range v.Content { + switch v2.Kind { + case yaml.MappingNode: + s := NewSchemaFromObject(v2) + m = append(m, s) + default: + fmt.Printf("schemaOrSchemaArrayValue: unexpected node %+v\n", v2) + } + } + return &SchemaOrSchemaArray{SchemaArray: &m} + case yaml.MappingNode: + s := NewSchemaFromObject(v) + return &SchemaOrSchemaArray{Schema: s} + default: + fmt.Printf("schemaOrSchemaArrayValue: unexpected node %+v\n", v) + } + return nil +} + +// Gets an array of strings from an interface{} value if possible. +func (schema *Schema) arrayOfStringsValue(v *yaml.Node) *[]string { + switch v.Kind { + case yaml.ScalarNode: + a := []string{v.Value} + return &a + case yaml.SequenceNode: + a := make([]string, 0) + for _, v2 := range v.Content { + switch v2.Kind { + case yaml.ScalarNode: + a = append(a, v2.Value) + default: + fmt.Printf("arrayOfStringsValue: unexpected node %+v\n", v2) + } + } + return &a + default: + fmt.Printf("arrayOfStringsValue: unexpected node %+v\n", v) + } + return nil +} + +// Gets a string or an array of strings from an interface{} value if possible. +func (schema *Schema) stringOrStringArrayValue(v *yaml.Node) *StringOrStringArray { + switch v.Kind { + case yaml.ScalarNode: + s := &StringOrStringArray{} + s.String = &v.Value + return s + case yaml.SequenceNode: + a := make([]string, 0) + for _, v2 := range v.Content { + switch v2.Kind { + case yaml.ScalarNode: + a = append(a, v2.Value) + default: + fmt.Printf("arrayOfStringsValue: unexpected node %+v\n", v2) + } + } + s := &StringOrStringArray{} + s.StringArray = &a + return s + default: + fmt.Printf("arrayOfStringsValue: unexpected node %+v\n", v) + } + return nil +} + +// Gets an array of enum values from an interface{} value if possible. +func (schema *Schema) arrayOfEnumValuesValue(v *yaml.Node) *[]SchemaEnumValue { + a := make([]SchemaEnumValue, 0) + switch v.Kind { + case yaml.SequenceNode: + for _, v2 := range v.Content { + switch v2.Kind { + case yaml.ScalarNode: + switch v2.Tag { + case "!!str": + a = append(a, SchemaEnumValue{String: &v2.Value}) + case "!!bool": + v3, _ := strconv.ParseBool(v2.Value) + a = append(a, SchemaEnumValue{Bool: &v3}) + default: + fmt.Printf("arrayOfEnumValuesValue: unexpected type %s\n", v2.Tag) + } + default: + fmt.Printf("arrayOfEnumValuesValue: unexpected node %+v\n", v2) + } + } + default: + fmt.Printf("arrayOfEnumValuesValue: unexpected node %+v\n", v) + } + return &a +} + +// Gets a map of schemas or string arrays from an interface{} value if possible. +func (schema *Schema) mapOfSchemasOrStringArraysValue(v *yaml.Node) *[]*NamedSchemaOrStringArray { + m := make([]*NamedSchemaOrStringArray, 0) + switch v.Kind { + case yaml.MappingNode: + for i := 0; i < len(v.Content); i += 2 { + k2 := v.Content[i].Value + v2 := v.Content[i+1] + switch v2.Kind { + case yaml.SequenceNode: + a := make([]string, 0) + for _, v3 := range v2.Content { + switch v3.Kind { + case yaml.ScalarNode: + a = append(a, v3.Value) + default: + fmt.Printf("mapOfSchemasOrStringArraysValue: unexpected node %+v\n", v3) + } + } + s := &SchemaOrStringArray{} + s.StringArray = &a + pair := &NamedSchemaOrStringArray{Name: k2, Value: s} + m = append(m, pair) + default: + fmt.Printf("mapOfSchemasOrStringArraysValue: unexpected node %+v\n", v2) + } + } + default: + fmt.Printf("mapOfSchemasOrStringArraysValue: unexpected node %+v\n", v) + } + return &m +} + +// Gets a schema or a boolean value from an interface{} value if possible. +func (schema *Schema) schemaOrBooleanValue(v *yaml.Node) *SchemaOrBoolean { + schemaOrBoolean := &SchemaOrBoolean{} + switch v.Kind { + case yaml.ScalarNode: + v2, _ := strconv.ParseBool(v.Value) + schemaOrBoolean.Boolean = &v2 + case yaml.MappingNode: + schemaOrBoolean.Schema = NewSchemaFromObject(v) + default: + fmt.Printf("schemaOrBooleanValue: unexpected node %+v\n", v) + } + return schemaOrBoolean +} diff --git a/vendor/github.com/googleapis/gnostic/jsonschema/schema.json b/vendor/github.com/googleapis/gnostic/jsonschema/schema.json new file mode 100644 index 00000000..85eb502a --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/jsonschema/schema.json @@ -0,0 +1,150 @@ +{ + "id": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$ref": "#" } + }, + "positiveInteger": { + "type": "integer", + "minimum": 0 + }, + "positiveIntegerDefault0": { + "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ] + }, + "simpleTypes": { + "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "minItems": 1, + "uniqueItems": true + } + }, + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uri" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": {}, + "multipleOf": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "boolean", + "default": false + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "boolean", + "default": false + }, + "maxLength": { "$ref": "#/definitions/positiveInteger" }, + "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "additionalItems": { + "anyOf": [ + { "type": "boolean" }, + { "$ref": "#" } + ], + "default": {} + }, + "items": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/schemaArray" } + ], + "default": {} + }, + "maxItems": { "$ref": "#/definitions/positiveInteger" }, + "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { "$ref": "#/definitions/positiveInteger" }, + "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "required": { "$ref": "#/definitions/stringArray" }, + "additionalProperties": { + "anyOf": [ + { "type": "boolean" }, + { "$ref": "#" } + ], + "default": {} + }, + "definitions": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/stringArray" } + ] + } + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { "$ref": "#/definitions/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/definitions/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "allOf": { "$ref": "#/definitions/schemaArray" }, + "anyOf": { "$ref": "#/definitions/schemaArray" }, + "oneOf": { "$ref": "#/definitions/schemaArray" }, + "not": { "$ref": "#" } + }, + "dependencies": { + "exclusiveMaximum": [ "maximum" ], + "exclusiveMinimum": [ "minimum" ] + }, + "default": {} +} diff --git a/vendor/github.com/googleapis/gnostic/jsonschema/writer.go b/vendor/github.com/googleapis/gnostic/jsonschema/writer.go new file mode 100644 index 00000000..340dc5f9 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/jsonschema/writer.go @@ -0,0 +1,369 @@ +// Copyright 2017 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package jsonschema + +import ( + "fmt" + + "gopkg.in/yaml.v3" +) + +const indentation = " " + +func renderMappingNode(node *yaml.Node, indent string) (result string) { + result = "{\n" + innerIndent := indent + indentation + for i := 0; i < len(node.Content); i += 2 { + // first print the key + key := node.Content[i].Value + result += fmt.Sprintf("%s\"%+v\": ", innerIndent, key) + // then the value + value := node.Content[i+1] + switch value.Kind { + case yaml.ScalarNode: + result += "\"" + value.Value + "\"" + case yaml.MappingNode: + result += renderMappingNode(value, innerIndent) + case yaml.SequenceNode: + result += renderSequenceNode(value, innerIndent) + default: + result += fmt.Sprintf("???MapItem(Key:%+v, Value:%T)", value, value) + } + if i < len(node.Content)-2 { + result += "," + } + result += "\n" + } + + result += indent + "}" + return result +} + +func renderSequenceNode(node *yaml.Node, indent string) (result string) { + result = "[\n" + innerIndent := indent + indentation + for i := 0; i < len(node.Content); i++ { + item := node.Content[i] + switch item.Kind { + case yaml.ScalarNode: + result += innerIndent + "\"" + item.Value + "\"" + case yaml.MappingNode: + result += innerIndent + renderMappingNode(item, innerIndent) + "" + default: + result += innerIndent + fmt.Sprintf("???ArrayItem(%+v)", item) + } + if i < len(node.Content)-1 { + result += "," + } + result += "\n" + } + result += indent + "]" + return result +} + +func renderStringArray(array []string, indent string) (result string) { + result = "[\n" + innerIndent := indent + indentation + for i, item := range array { + result += innerIndent + "\"" + item + "\"" + if i < len(array)-1 { + result += "," + } + result += "\n" + } + result += indent + "]" + return result +} + +// Render renders a yaml.Node as JSON +func Render(node *yaml.Node) string { + if node.Kind == yaml.DocumentNode { + if len(node.Content) == 1 { + return Render(node.Content[0]) + } + } else if node.Kind == yaml.MappingNode { + return renderMappingNode(node, "") + "\n" + } else if node.Kind == yaml.SequenceNode { + return renderSequenceNode(node, "") + "\n" + } + return "" +} + +func (object *SchemaNumber) nodeValue() *yaml.Node { + if object.Integer != nil { + return nodeForInt64(*object.Integer) + } else if object.Float != nil { + return nodeForFloat64(*object.Float) + } else { + return nil + } +} + +func (object *SchemaOrBoolean) nodeValue() *yaml.Node { + if object.Schema != nil { + return object.Schema.nodeValue() + } else if object.Boolean != nil { + return nodeForBoolean(*object.Boolean) + } else { + return nil + } +} + +func nodeForStringArray(array []string) *yaml.Node { + content := make([]*yaml.Node, 0) + for _, item := range array { + content = append(content, nodeForString(item)) + } + return nodeForSequence(content) +} + +func nodeForSchemaArray(array []*Schema) *yaml.Node { + content := make([]*yaml.Node, 0) + for _, item := range array { + content = append(content, item.nodeValue()) + } + return nodeForSequence(content) +} + +func (object *StringOrStringArray) nodeValue() *yaml.Node { + if object.String != nil { + return nodeForString(*object.String) + } else if object.StringArray != nil { + return nodeForStringArray(*(object.StringArray)) + } else { + return nil + } +} + +func (object *SchemaOrStringArray) nodeValue() *yaml.Node { + if object.Schema != nil { + return object.Schema.nodeValue() + } else if object.StringArray != nil { + return nodeForStringArray(*(object.StringArray)) + } else { + return nil + } +} + +func (object *SchemaOrSchemaArray) nodeValue() *yaml.Node { + if object.Schema != nil { + return object.Schema.nodeValue() + } else if object.SchemaArray != nil { + return nodeForSchemaArray(*(object.SchemaArray)) + } else { + return nil + } +} + +func (object *SchemaEnumValue) nodeValue() *yaml.Node { + if object.String != nil { + return nodeForString(*object.String) + } else if object.Bool != nil { + return nodeForBoolean(*object.Bool) + } else { + return nil + } +} + +func nodeForNamedSchemaArray(array *[]*NamedSchema) *yaml.Node { + content := make([]*yaml.Node, 0) + for _, pair := range *(array) { + content = appendPair(content, pair.Name, pair.Value.nodeValue()) + } + return nodeForMapping(content) +} + +func nodeForNamedSchemaOrStringArray(array *[]*NamedSchemaOrStringArray) *yaml.Node { + content := make([]*yaml.Node, 0) + for _, pair := range *(array) { + content = appendPair(content, pair.Name, pair.Value.nodeValue()) + } + return nodeForMapping(content) +} + +func nodeForSchemaEnumArray(array *[]SchemaEnumValue) *yaml.Node { + content := make([]*yaml.Node, 0) + for _, item := range *array { + content = append(content, item.nodeValue()) + } + return nodeForSequence(content) +} + +func nodeForMapping(content []*yaml.Node) *yaml.Node { + return &yaml.Node{ + Kind: yaml.MappingNode, + Content: content, + } +} + +func nodeForSequence(content []*yaml.Node) *yaml.Node { + return &yaml.Node{ + Kind: yaml.SequenceNode, + Content: content, + } +} + +func nodeForString(value string) *yaml.Node { + return &yaml.Node{ + Kind: yaml.ScalarNode, + Tag: "!!str", + Value: value, + } +} + +func nodeForBoolean(value bool) *yaml.Node { + return &yaml.Node{ + Kind: yaml.ScalarNode, + Tag: "!!bool", + Value: fmt.Sprintf("%t", value), + } +} + +func nodeForInt64(value int64) *yaml.Node { + return &yaml.Node{ + Kind: yaml.ScalarNode, + Tag: "!!int", + Value: fmt.Sprintf("%d", value), + } +} + +func nodeForFloat64(value float64) *yaml.Node { + return &yaml.Node{ + Kind: yaml.ScalarNode, + Tag: "!!float", + Value: fmt.Sprintf("%f", value), + } +} + +func appendPair(nodes []*yaml.Node, name string, value *yaml.Node) []*yaml.Node { + nodes = append(nodes, nodeForString(name)) + nodes = append(nodes, value) + return nodes +} + +func (schema *Schema) nodeValue() *yaml.Node { + n := &yaml.Node{Kind: yaml.MappingNode} + content := make([]*yaml.Node, 0) + if schema.Title != nil { + content = appendPair(content, "title", nodeForString(*schema.Title)) + } + if schema.ID != nil { + content = appendPair(content, "id", nodeForString(*schema.ID)) + } + if schema.Schema != nil { + content = appendPair(content, "$schema", nodeForString(*schema.Schema)) + } + if schema.Type != nil { + content = appendPair(content, "type", schema.Type.nodeValue()) + } + if schema.Items != nil { + content = appendPair(content, "items", schema.Items.nodeValue()) + } + if schema.Description != nil { + content = appendPair(content, "description", nodeForString(*schema.Description)) + } + if schema.Required != nil { + content = appendPair(content, "required", nodeForStringArray(*schema.Required)) + } + if schema.AdditionalProperties != nil { + content = appendPair(content, "additionalProperties", schema.AdditionalProperties.nodeValue()) + } + if schema.PatternProperties != nil { + content = appendPair(content, "patternProperties", nodeForNamedSchemaArray(schema.PatternProperties)) + } + if schema.Properties != nil { + content = appendPair(content, "properties", nodeForNamedSchemaArray(schema.Properties)) + } + if schema.Dependencies != nil { + content = appendPair(content, "dependencies", nodeForNamedSchemaOrStringArray(schema.Dependencies)) + } + if schema.Ref != nil { + content = appendPair(content, "$ref", nodeForString(*schema.Ref)) + } + if schema.MultipleOf != nil { + content = appendPair(content, "multipleOf", schema.MultipleOf.nodeValue()) + } + if schema.Maximum != nil { + content = appendPair(content, "maximum", schema.Maximum.nodeValue()) + } + if schema.ExclusiveMaximum != nil { + content = appendPair(content, "exclusiveMaximum", nodeForBoolean(*schema.ExclusiveMaximum)) + } + if schema.Minimum != nil { + content = appendPair(content, "minimum", schema.Minimum.nodeValue()) + } + if schema.ExclusiveMinimum != nil { + content = appendPair(content, "exclusiveMinimum", nodeForBoolean(*schema.ExclusiveMinimum)) + } + if schema.MaxLength != nil { + content = appendPair(content, "maxLength", nodeForInt64(*schema.MaxLength)) + } + if schema.MinLength != nil { + content = appendPair(content, "minLength", nodeForInt64(*schema.MinLength)) + } + if schema.Pattern != nil { + content = appendPair(content, "pattern", nodeForString(*schema.Pattern)) + } + if schema.AdditionalItems != nil { + content = appendPair(content, "additionalItems", schema.AdditionalItems.nodeValue()) + } + if schema.MaxItems != nil { + content = appendPair(content, "maxItems", nodeForInt64(*schema.MaxItems)) + } + if schema.MinItems != nil { + content = appendPair(content, "minItems", nodeForInt64(*schema.MinItems)) + } + if schema.UniqueItems != nil { + content = appendPair(content, "uniqueItems", nodeForBoolean(*schema.UniqueItems)) + } + if schema.MaxProperties != nil { + content = appendPair(content, "maxProperties", nodeForInt64(*schema.MaxProperties)) + } + if schema.MinProperties != nil { + content = appendPair(content, "minProperties", nodeForInt64(*schema.MinProperties)) + } + if schema.Enumeration != nil { + content = appendPair(content, "enum", nodeForSchemaEnumArray(schema.Enumeration)) + } + if schema.AllOf != nil { + content = appendPair(content, "allOf", nodeForSchemaArray(*schema.AllOf)) + } + if schema.AnyOf != nil { + content = appendPair(content, "anyOf", nodeForSchemaArray(*schema.AnyOf)) + } + if schema.OneOf != nil { + content = appendPair(content, "oneOf", nodeForSchemaArray(*schema.OneOf)) + } + if schema.Not != nil { + content = appendPair(content, "not", schema.Not.nodeValue()) + } + if schema.Definitions != nil { + content = appendPair(content, "definitions", nodeForNamedSchemaArray(schema.Definitions)) + } + if schema.Default != nil { + // m = append(m, yaml.MapItem{Key: "default", Value: *schema.Default}) + } + if schema.Format != nil { + content = appendPair(content, "format", nodeForString(*schema.Format)) + } + n.Content = content + return n +} + +// JSONString returns a json representation of a schema. +func (schema *Schema) JSONString() string { + node := schema.nodeValue() + return Render(node) +} diff --git a/vendor/github.com/imdario/mergo/README.md b/vendor/github.com/imdario/mergo/README.md index 02fc81e0..075b4d78 100644 --- a/vendor/github.com/imdario/mergo/README.md +++ b/vendor/github.com/imdario/mergo/README.md @@ -2,6 +2,8 @@ A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements. +Mergo merges same-type structs and maps by setting default values in zero-value fields. Mergo won't merge unexported (private) fields. It will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection). + Also a lovely [comune](http://en.wikipedia.org/wiki/Mergo) (municipality) in the Province of Ancona in the Italian region of Marche. ## Status @@ -9,36 +11,37 @@ Also a lovely [comune](http://en.wikipedia.org/wiki/Mergo) (municipality) in the It is ready for production use. [It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, etc](https://github.com/imdario/mergo#mergo-in-the-wild). [![GoDoc][3]][4] -[![GoCard][5]][6] +[![GitHub release][5]][6] +[![GoCard][7]][8] [![Build Status][1]][2] -[![Coverage Status][7]][8] -[![Sourcegraph][9]][10] +[![Coverage Status][9]][10] +[![Sourcegraph][11]][12] [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fimdario%2Fmergo.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fimdario%2Fmergo?ref=badge_shield) [1]: https://travis-ci.org/imdario/mergo.png [2]: https://travis-ci.org/imdario/mergo [3]: https://godoc.org/github.com/imdario/mergo?status.svg [4]: https://godoc.org/github.com/imdario/mergo -[5]: https://goreportcard.com/badge/imdario/mergo -[6]: https://goreportcard.com/report/github.com/imdario/mergo -[7]: https://coveralls.io/repos/github/imdario/mergo/badge.svg?branch=master -[8]: https://coveralls.io/github/imdario/mergo?branch=master -[9]: https://sourcegraph.com/github.com/imdario/mergo/-/badge.svg -[10]: https://sourcegraph.com/github.com/imdario/mergo?badge - -### Latest release - -[Release v0.3.7](https://github.com/imdario/mergo/releases/tag/v0.3.7). +[5]: https://img.shields.io/github/release/imdario/mergo.svg +[6]: https://github.com/imdario/mergo/releases +[7]: https://goreportcard.com/badge/imdario/mergo +[8]: https://goreportcard.com/report/github.com/imdario/mergo +[9]: https://coveralls.io/repos/github/imdario/mergo/badge.svg?branch=master +[10]: https://coveralls.io/github/imdario/mergo?branch=master +[11]: https://sourcegraph.com/github.com/imdario/mergo/-/badge.svg +[12]: https://sourcegraph.com/github.com/imdario/mergo?badge ### Important note -Please keep in mind that in [0.3.2](//github.com/imdario/mergo/releases/tag/0.3.2) Mergo changed `Merge()`and `Map()` signatures to support [transformers](#transformers). An optional/variadic argument has been added, so it won't break existing code. +Please keep in mind that a problematic PR broke [0.3.9](//github.com/imdario/mergo/releases/tag/0.3.9). I reverted it in [0.3.10](//github.com/imdario/mergo/releases/tag/0.3.10), and I consider it stable but not bug-free. Also, this version adds suppot for go modules. -If you were using Mergo **before** April 6th 2015, please check your project works as intended after updating your local copy with ```go get -u github.com/imdario/mergo```. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause (I hope it won't!) in existing projects after the change (release 0.2.0). +Keep in mind that in [0.3.2](//github.com/imdario/mergo/releases/tag/0.3.2), Mergo changed `Merge()`and `Map()` signatures to support [transformers](#transformers). I added an optional/variadic argument so that it won't break the existing code. + +If you were using Mergo before April 6th, 2015, please check your project works as intended after updating your local copy with ```go get -u github.com/imdario/mergo```. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause in existing projects after the change (release 0.2.0). ### Donations -If Mergo is useful to you, consider buying me a coffee, a beer or making a monthly donation so I can keep building great free software. :heart_eyes: +If Mergo is useful to you, consider buying me a coffee, a beer, or making a monthly donation to allow me to keep building great free software. :heart_eyes: Buy Me a Coffee at ko-fi.com [![Beerpay](https://beerpay.io/imdario/mergo/badge.svg)](https://beerpay.io/imdario/mergo) @@ -87,8 +90,9 @@ If Mergo is useful to you, consider buying me a coffee, a beer or making a month - [mantasmatelis/whooplist-server](https://github.com/mantasmatelis/whooplist-server) - [jnuthong/item_search](https://github.com/jnuthong/item_search) - [bukalapak/snowboard](https://github.com/bukalapak/snowboard) +- [janoszen/containerssh](https://github.com/janoszen/containerssh) -## Installation +## Install go get github.com/imdario/mergo @@ -99,7 +103,7 @@ If Mergo is useful to you, consider buying me a coffee, a beer or making a month ## Usage -You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as [they are not considered zero values](https://golang.org/ref/spec#The_zero_value) either. Also maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection). +You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as [they are zero values](https://golang.org/ref/spec#The_zero_value) too. Also, maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection). ```go if err := mergo.Merge(&dst, src); err != nil { @@ -125,9 +129,7 @@ if err := mergo.Map(&dst, srcMap); err != nil { Warning: if you map a struct to map, it won't do it recursively. Don't expect Mergo to map struct members of your struct as `map[string]interface{}`. They will be just assigned as values. -More information and examples in [godoc documentation](http://godoc.org/github.com/imdario/mergo). - -### Nice example +Here is a nice example: ```go package main @@ -175,10 +177,10 @@ import ( "time" ) -type timeTransfomer struct { +type timeTransformer struct { } -func (t timeTransfomer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error { +func (t timeTransformer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error { if typ == reflect.TypeOf(time.Time{}) { return func(dst, src reflect.Value) error { if dst.CanSet() { @@ -202,7 +204,7 @@ type Snapshot struct { func main() { src := Snapshot{time.Now()} dest := Snapshot{} - mergo.Merge(&dest, src, mergo.WithTransformers(timeTransfomer{})) + mergo.Merge(&dest, src, mergo.WithTransformers(timeTransformer{})) fmt.Println(dest) // Will print // { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 } diff --git a/vendor/github.com/imdario/mergo/doc.go b/vendor/github.com/imdario/mergo/doc.go index 6e9aa7ba..fcd985f9 100644 --- a/vendor/github.com/imdario/mergo/doc.go +++ b/vendor/github.com/imdario/mergo/doc.go @@ -4,41 +4,140 @@ // license that can be found in the LICENSE file. /* -Package mergo merges same-type structs and maps by setting default values in zero-value fields. +A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements. -Mergo won't merge unexported (private) fields but will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection). +Mergo merges same-type structs and maps by setting default values in zero-value fields. Mergo won't merge unexported (private) fields. It will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection). + +Status + +It is ready for production use. It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, etc. + +Important note + +Please keep in mind that a problematic PR broke 0.3.9. We reverted it in 0.3.10. We consider 0.3.10 as stable but not bug-free. . Also, this version adds suppot for go modules. + +Keep in mind that in 0.3.2, Mergo changed Merge() and Map() signatures to support transformers. We added an optional/variadic argument so that it won't break the existing code. + +If you were using Mergo before April 6th, 2015, please check your project works as intended after updating your local copy with go get -u github.com/imdario/mergo. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause in existing projects after the change (release 0.2.0). + +Install + +Do your usual installation procedure: + + go get github.com/imdario/mergo + + // use in your .go code + import ( + "github.com/imdario/mergo" + ) Usage -From my own work-in-progress project: +You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as they are zero values too. Also, maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection). + + if err := mergo.Merge(&dst, src); err != nil { + // ... + } + +Also, you can merge overwriting values using the transformer WithOverride. + + if err := mergo.Merge(&dst, src, mergo.WithOverride); err != nil { + // ... + } + +Additionally, you can map a map[string]interface{} to a struct (and otherwise, from struct to map), following the same restrictions as in Merge(). Keys are capitalized to find each corresponding exported field. + + if err := mergo.Map(&dst, srcMap); err != nil { + // ... + } + +Warning: if you map a struct to map, it won't do it recursively. Don't expect Mergo to map struct members of your struct as map[string]interface{}. They will be just assigned as values. + +Here is a nice example: + + package main + + import ( + "fmt" + "github.com/imdario/mergo" + ) - type networkConfig struct { - Protocol string - Address string - ServerType string `json: "server_type"` - Port uint16 + type Foo struct { + A string + B int64 } - type FssnConfig struct { - Network networkConfig + func main() { + src := Foo{ + A: "one", + B: 2, + } + dest := Foo{ + A: "two", + } + mergo.Merge(&dest, src) + fmt.Println(dest) + // Will print + // {two 2} } - var fssnDefault = FssnConfig { - networkConfig { - "tcp", - "127.0.0.1", - "http", - 31560, - }, +Transformers + +Transformers allow to merge specific types differently than in the default behavior. In other words, now you can customize how some types are merged. For example, time.Time is a struct; it doesn't have zero value but IsZero can return true because it has fields with zero value. How can we merge a non-zero time.Time? + + package main + + import ( + "fmt" + "github.com/imdario/mergo" + "reflect" + "time" + ) + + type timeTransformer struct { } - // Inside a function [...] + func (t timeTransformer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error { + if typ == reflect.TypeOf(time.Time{}) { + return func(dst, src reflect.Value) error { + if dst.CanSet() { + isZero := dst.MethodByName("IsZero") + result := isZero.Call([]reflect.Value{}) + if result[0].Bool() { + dst.Set(src) + } + } + return nil + } + } + return nil + } + + type Snapshot struct { + Time time.Time + // ... + } - if err := mergo.Merge(&config, fssnDefault); err != nil { - log.Fatal(err) + func main() { + src := Snapshot{time.Now()} + dest := Snapshot{} + mergo.Merge(&dest, src, mergo.WithTransformers(timeTransformer{})) + fmt.Println(dest) + // Will print + // { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 } } - // More code [...] +Contact me + +If I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): https://twitter.com/im_dario + +About + +Written by Dario Castañé: https://da.rio.hn + +License + +BSD 3-Clause license, as Go language. */ package mergo diff --git a/vendor/github.com/imdario/mergo/go.mod b/vendor/github.com/imdario/mergo/go.mod new file mode 100644 index 00000000..3d689d93 --- /dev/null +++ b/vendor/github.com/imdario/mergo/go.mod @@ -0,0 +1,5 @@ +module github.com/imdario/mergo + +go 1.13 + +require gopkg.in/yaml.v2 v2.3.0 diff --git a/vendor/github.com/imdario/mergo/go.sum b/vendor/github.com/imdario/mergo/go.sum new file mode 100644 index 00000000..168980da --- /dev/null +++ b/vendor/github.com/imdario/mergo/go.sum @@ -0,0 +1,4 @@ +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/imdario/mergo/map.go b/vendor/github.com/imdario/mergo/map.go index d83258b4..a13a7ee4 100644 --- a/vendor/github.com/imdario/mergo/map.go +++ b/vendor/github.com/imdario/mergo/map.go @@ -99,11 +99,11 @@ func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int, conf continue } if srcKind == dstKind { - if _, err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { + if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { return } } else if dstKind == reflect.Interface && dstElement.Kind() == reflect.Interface { - if _, err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { + if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { return } } else if srcKind == reflect.Map { @@ -141,6 +141,9 @@ func MapWithOverwrite(dst, src interface{}, opts ...func(*Config)) error { } func _map(dst, src interface{}, opts ...func(*Config)) error { + if dst != nil && reflect.ValueOf(dst).Kind() != reflect.Ptr { + return ErrNonPointerAgument + } var ( vDst, vSrc reflect.Value err error @@ -157,8 +160,7 @@ func _map(dst, src interface{}, opts ...func(*Config)) error { // To be friction-less, we redirect equal-type arguments // to deepMerge. Only because arguments can be anything. if vSrc.Kind() == vDst.Kind() { - _, err := deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config) - return err + return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config) } switch vSrc.Kind() { case reflect.Struct: diff --git a/vendor/github.com/imdario/mergo/merge.go b/vendor/github.com/imdario/mergo/merge.go index 3332c9c2..11a8c156 100644 --- a/vendor/github.com/imdario/mergo/merge.go +++ b/vendor/github.com/imdario/mergo/merge.go @@ -11,26 +11,26 @@ package mergo import ( "fmt" "reflect" - "unsafe" ) -func hasExportedField(dst reflect.Value) (exported bool) { +func hasMergeableFields(dst reflect.Value) (exported bool) { for i, n := 0, dst.NumField(); i < n; i++ { field := dst.Type().Field(i) - if isExportedComponent(&field) { - return true + if field.Anonymous && dst.Field(i).Kind() == reflect.Struct { + exported = exported || hasMergeableFields(dst.Field(i)) + } else if isExportedComponent(&field) { + exported = exported || len(field.PkgPath) == 0 } } return } func isExportedComponent(field *reflect.StructField) bool { - name := field.Name pkgPath := field.PkgPath if len(pkgPath) > 0 { return false } - c := name[0] + c := field.Name[0] if 'a' <= c && c <= 'z' || c == '_' { return false } @@ -44,6 +44,8 @@ type Config struct { Transformers Transformers overwriteWithEmptyValue bool overwriteSliceWithEmptyValue bool + sliceDeepCopy bool + debug bool } type Transformers interface { @@ -53,17 +55,16 @@ type Transformers interface { // Traverses recursively both values, assigning src's fields values to dst. // The map argument tracks comparisons that have already been seen, which allows // short circuiting on recursive types. -func deepMerge(dstIn, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (dst reflect.Value, err error) { - dst = dstIn +func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (err error) { overwrite := config.Overwrite typeCheck := config.TypeCheck overwriteWithEmptySrc := config.overwriteWithEmptyValue overwriteSliceWithEmptySrc := config.overwriteSliceWithEmptyValue + sliceDeepCopy := config.sliceDeepCopy if !src.IsValid() { return } - if dst.CanAddr() { addr := dst.UnsafeAddr() h := 17 * addr @@ -71,7 +72,7 @@ func deepMerge(dstIn, src reflect.Value, visited map[uintptr]*visit, depth int, typ := dst.Type() for p := seen; p != nil; p = p.next { if p.ptr == addr && p.typ == typ { - return dst, nil + return nil } } // Remember, remember... @@ -85,126 +86,154 @@ func deepMerge(dstIn, src reflect.Value, visited map[uintptr]*visit, depth int, } } - if dst.IsValid() && src.IsValid() && src.Type() != dst.Type() { - err = fmt.Errorf("cannot append two different types (%s, %s)", src.Kind(), dst.Kind()) - return - } - switch dst.Kind() { case reflect.Struct: - if hasExportedField(dst) { - dstCp := reflect.New(dst.Type()).Elem() + if hasMergeableFields(dst) { for i, n := 0, dst.NumField(); i < n; i++ { - dstField := dst.Field(i) - structField := dst.Type().Field(i) - // copy un-exported struct fields - if !isExportedComponent(&structField) { - rf := dstCp.Field(i) - rf = reflect.NewAt(rf.Type(), unsafe.Pointer(rf.UnsafeAddr())).Elem() //nolint:gosec - dstRF := dst.Field(i) - if !dst.Field(i).CanAddr() { - continue - } - - dstRF = reflect.NewAt(dstRF.Type(), unsafe.Pointer(dstRF.UnsafeAddr())).Elem() //nolint:gosec - rf.Set(dstRF) - continue - } - dstField, err = deepMerge(dstField, src.Field(i), visited, depth+1, config) - if err != nil { + if err = deepMerge(dst.Field(i), src.Field(i), visited, depth+1, config); err != nil { return } - dstCp.Field(i).Set(dstField) } - - if dst.CanSet() { - dst.Set(dstCp) - } else { - dst = dstCp - } - return } else { if (isReflectNil(dst) || overwrite) && (!isEmptyValue(src) || overwriteWithEmptySrc) { - dst = src + dst.Set(src) } } - case reflect.Map: if dst.IsNil() && !src.IsNil() { - if dst.CanSet() { - dst.Set(reflect.MakeMap(dst.Type())) - } else { - dst = src - return + dst.Set(reflect.MakeMap(dst.Type())) + } + + if src.Kind() != reflect.Map { + if overwrite { + dst.Set(src) } + return } + for _, key := range src.MapKeys() { srcElement := src.MapIndex(key) - dstElement := dst.MapIndex(key) if !srcElement.IsValid() { continue } - if dst.MapIndex(key).IsValid() { - k := dstElement.Interface() - dstElement = reflect.ValueOf(k) - } - if isReflectNil(srcElement) { - if overwrite || isReflectNil(dstElement) { - dst.SetMapIndex(key, srcElement) + dstElement := dst.MapIndex(key) + switch srcElement.Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Interface, reflect.Slice: + if srcElement.IsNil() { + if overwrite { + dst.SetMapIndex(key, srcElement) + } + continue + } + fallthrough + default: + if !srcElement.CanInterface() { + continue + } + switch reflect.TypeOf(srcElement.Interface()).Kind() { + case reflect.Struct: + fallthrough + case reflect.Ptr: + fallthrough + case reflect.Map: + srcMapElm := srcElement + dstMapElm := dstElement + if srcMapElm.CanInterface() { + srcMapElm = reflect.ValueOf(srcMapElm.Interface()) + if dstMapElm.IsValid() { + dstMapElm = reflect.ValueOf(dstMapElm.Interface()) + } + } + if err = deepMerge(dstMapElm, srcMapElm, visited, depth+1, config); err != nil { + return + } + case reflect.Slice: + srcSlice := reflect.ValueOf(srcElement.Interface()) + + var dstSlice reflect.Value + if !dstElement.IsValid() || dstElement.IsNil() { + dstSlice = reflect.MakeSlice(srcSlice.Type(), 0, srcSlice.Len()) + } else { + dstSlice = reflect.ValueOf(dstElement.Interface()) + } + + if (!isEmptyValue(src) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice && !sliceDeepCopy { + if typeCheck && srcSlice.Type() != dstSlice.Type() { + return fmt.Errorf("cannot override two slices with different type (%s, %s)", srcSlice.Type(), dstSlice.Type()) + } + dstSlice = srcSlice + } else if config.AppendSlice { + if srcSlice.Type() != dstSlice.Type() { + return fmt.Errorf("cannot append two slices with different type (%s, %s)", srcSlice.Type(), dstSlice.Type()) + } + dstSlice = reflect.AppendSlice(dstSlice, srcSlice) + } else if sliceDeepCopy { + i := 0 + for ; i < srcSlice.Len() && i < dstSlice.Len(); i++ { + srcElement := srcSlice.Index(i) + dstElement := dstSlice.Index(i) + + if srcElement.CanInterface() { + srcElement = reflect.ValueOf(srcElement.Interface()) + } + if dstElement.CanInterface() { + dstElement = reflect.ValueOf(dstElement.Interface()) + } + + if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { + return + } + } + + } + dst.SetMapIndex(key, dstSlice) } - continue } - if !srcElement.CanInterface() { + if dstElement.IsValid() && !isEmptyValue(dstElement) && (reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Map || reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Slice) { continue } - if srcElement.CanInterface() { - srcElement = reflect.ValueOf(srcElement.Interface()) - if dstElement.IsValid() { - dstElement = reflect.ValueOf(dstElement.Interface()) + if srcElement.IsValid() && ((srcElement.Kind() != reflect.Ptr && overwrite) || !dstElement.IsValid() || isEmptyValue(dstElement)) { + if dst.IsNil() { + dst.Set(reflect.MakeMap(dst.Type())) } + dst.SetMapIndex(key, srcElement) } - dstElement, err = deepMerge(dstElement, srcElement, visited, depth+1, config) - if err != nil { - return - } - dst.SetMapIndex(key, dstElement) - } case reflect.Slice: - newSlice := dst - if (!isEmptyValue(src) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice { - if typeCheck && src.Type() != dst.Type() { - return dst, fmt.Errorf("cannot override two slices with different type (%s, %s)", src.Type(), dst.Type()) - } - newSlice = src - } else if config.AppendSlice { - if typeCheck && src.Type() != dst.Type() { - err = fmt.Errorf("cannot append two slice with different type (%s, %s)", src.Type(), dst.Type()) - return - } - newSlice = reflect.AppendSlice(dst, src) - } - if dst.CanSet() { - dst.Set(newSlice) - } else { - dst = newSlice - } - case reflect.Ptr, reflect.Interface: - if isReflectNil(src) { + if !dst.CanSet() { break } + if (!isEmptyValue(src) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice && !sliceDeepCopy { + dst.Set(src) + } else if config.AppendSlice { + if src.Type() != dst.Type() { + return fmt.Errorf("cannot append two slice with different type (%s, %s)", src.Type(), dst.Type()) + } + dst.Set(reflect.AppendSlice(dst, src)) + } else if sliceDeepCopy { + for i := 0; i < src.Len() && i < dst.Len(); i++ { + srcElement := src.Index(i) + dstElement := dst.Index(i) + if srcElement.CanInterface() { + srcElement = reflect.ValueOf(srcElement.Interface()) + } + if dstElement.CanInterface() { + dstElement = reflect.ValueOf(dstElement.Interface()) + } - if dst.Kind() != reflect.Ptr && src.Type().AssignableTo(dst.Type()) { - if dst.IsNil() || overwrite { - if overwrite || isEmptyValue(dst) { - if dst.CanSet() { - dst.Set(src) - } else { - dst = src - } + if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { + return } } + } + case reflect.Ptr: + fallthrough + case reflect.Interface: + if isReflectNil(src) { + if overwriteWithEmptySrc && dst.CanSet() && src.Type().AssignableTo(dst.Type()) { + dst.Set(src) + } break } @@ -214,33 +243,40 @@ func deepMerge(dstIn, src reflect.Value, visited map[uintptr]*visit, depth int, dst.Set(src) } } else if src.Kind() == reflect.Ptr { - if dst, err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil { + if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil { return } - dst = dst.Addr() } else if dst.Elem().Type() == src.Type() { - if dst, err = deepMerge(dst.Elem(), src, visited, depth+1, config); err != nil { + if err = deepMerge(dst.Elem(), src, visited, depth+1, config); err != nil { return } } else { - return dst, ErrDifferentArgumentsTypes + return ErrDifferentArgumentsTypes } break } + if dst.IsNil() || overwrite { - if (overwrite || isEmptyValue(dst)) && (overwriteWithEmptySrc || !isEmptyValue(src)) { - if dst.CanSet() { - dst.Set(src) - } else { - dst = src - } + if dst.CanSet() && (overwrite || isEmptyValue(dst)) { + dst.Set(src) } - } else if _, err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil { - return + break + } + + if dst.Elem().Kind() == src.Elem().Kind() { + if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil { + return + } + break } default: - overwriteFull := (!isEmptyValue(src) || overwriteWithEmptySrc) && (overwrite || isEmptyValue(dst)) - if overwriteFull { + mustSet := (isEmptyValue(dst) || overwrite) && (!isEmptyValue(src) || overwriteWithEmptySrc) + v := fmt.Sprintf("%v", src) + if v == "TestIssue106" { + fmt.Println(mustSet) + fmt.Println(dst.CanSet()) + } + if mustSet { if dst.CanSet() { dst.Set(src) } else { @@ -281,6 +317,7 @@ func WithOverride(config *Config) { // WithOverwriteWithEmptyValue will make merge override non empty dst attributes with empty src attributes values. func WithOverwriteWithEmptyValue(config *Config) { + config.Overwrite = true config.overwriteWithEmptyValue = true } @@ -299,7 +336,16 @@ func WithTypeCheck(config *Config) { config.TypeCheck = true } +// WithSliceDeepCopy will merge slice element one by one with Overwrite flag. +func WithSliceDeepCopy(config *Config) { + config.sliceDeepCopy = true + config.Overwrite = true +} + func merge(dst, src interface{}, opts ...func(*Config)) error { + if dst != nil && reflect.ValueOf(dst).Kind() != reflect.Ptr { + return ErrNonPointerAgument + } var ( vDst, vSrc reflect.Value err error @@ -314,14 +360,10 @@ func merge(dst, src interface{}, opts ...func(*Config)) error { if vDst, vSrc, err = resolveValues(dst, src); err != nil { return err } - if !vDst.CanSet() { - return fmt.Errorf("cannot set dst, needs reference") - } if vDst.Type() != vSrc.Type() { return ErrDifferentArgumentsTypes } - _, err = deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config) - return err + return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config) } // IsReflectNil is the reflect value provided nil diff --git a/vendor/github.com/imdario/mergo/mergo.go b/vendor/github.com/imdario/mergo/mergo.go index a82fea2f..3cc926c7 100644 --- a/vendor/github.com/imdario/mergo/mergo.go +++ b/vendor/github.com/imdario/mergo/mergo.go @@ -20,6 +20,7 @@ var ( ErrNotSupported = errors.New("only structs and maps are supported") ErrExpectedMapAsDestination = errors.New("dst was expected to be a map") ErrExpectedStructAsDestination = errors.New("dst was expected to be a struct") + ErrNonPointerAgument = errors.New("dst must be a pointer") ) // During deepMerge, must keep track of checks that are @@ -75,23 +76,3 @@ func resolveValues(dst, src interface{}) (vDst, vSrc reflect.Value, err error) { } return } - -// Traverses recursively both values, assigning src's fields values to dst. -// The map argument tracks comparisons that have already been seen, which allows -// short circuiting on recursive types. -func deeper(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err error) { - if dst.CanAddr() { - addr := dst.UnsafeAddr() - h := 17 * addr - seen := visited[h] - typ := dst.Type() - for p := seen; p != nil; p = p.next { - if p.ptr == addr && p.typ == typ { - return nil - } - } - // Remember, remember... - visited[h] = &visit{addr, typ, seen} - } - return // TODO refactor -} diff --git a/vendor/github.com/karrick/godirwalk/bench.sh b/vendor/github.com/karrick/godirwalk/bench.sh new file mode 100644 index 00000000..b2ba374c --- /dev/null +++ b/vendor/github.com/karrick/godirwalk/bench.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# for version in v1.9.1 v1.10.0 v1.10.3 v1.10.12 v1.11.2 v1.11.3 v1.12.0 v1.13.1 v1.14.0 v1.14.1 ; do +for version in v1.10.12 v1.14.1 v1.15.2 ; do + echo "### $version" > $version.txt + git checkout -- go.mod && git checkout $version && go test -run=NONE -bench=Benchmark2 >> $version.txt || exit 1 +done diff --git a/vendor/github.com/karrick/godirwalk/readdir_unix.go b/vendor/github.com/karrick/godirwalk/readdir_unix.go index 8c9404c6..a993038b 100644 --- a/vendor/github.com/karrick/godirwalk/readdir_unix.go +++ b/vendor/github.com/karrick/godirwalk/readdir_unix.go @@ -31,11 +31,15 @@ func readDirents(osDirname string, scratchBuffer []byte) ([]*Dirent, error) { scratchBuffer = newScratchBuffer() } + var sde syscall.Dirent for { if len(workBuffer) == 0 { n, err := syscall.ReadDirent(fd, scratchBuffer) // n, err := unix.ReadDirent(fd, scratchBuffer) if err != nil { + if err == syscall.EINTR /* || err == unix.EINTR */ { + continue + } _ = dh.Close() return nil, err } @@ -48,14 +52,14 @@ func readDirents(osDirname string, scratchBuffer []byte) ([]*Dirent, error) { workBuffer = scratchBuffer[:n] // trim work buffer to number of bytes read } - sde := (*syscall.Dirent)(unsafe.Pointer(&workBuffer[0])) // point entry to first syscall.Dirent in buffer - workBuffer = workBuffer[reclen(sde):] // advance buffer for next iteration through loop + copy((*[unsafe.Sizeof(syscall.Dirent{})]byte)(unsafe.Pointer(&sde))[:], workBuffer) + workBuffer = workBuffer[reclen(&sde):] // advance buffer for next iteration through loop - if inoFromDirent(sde) == 0 { + if inoFromDirent(&sde) == 0 { continue // inode set to 0 indicates an entry that was marked as deleted } - nameSlice := nameFromDirent(sde) + nameSlice := nameFromDirent(&sde) nameLength := len(nameSlice) if nameLength == 0 || (nameSlice[0] == '.' && (nameLength == 1 || (nameLength == 2 && nameSlice[1] == '.'))) { @@ -63,7 +67,7 @@ func readDirents(osDirname string, scratchBuffer []byte) ([]*Dirent, error) { } childName := string(nameSlice) - mt, err := modeTypeFromDirent(sde, osDirname, childName) + mt, err := modeTypeFromDirent(&sde, osDirname, childName) if err != nil { _ = dh.Close() return nil, err @@ -92,6 +96,9 @@ func readDirnames(osDirname string, scratchBuffer []byte) ([]string, error) { n, err := syscall.ReadDirent(fd, scratchBuffer) // n, err := unix.ReadDirent(fd, scratchBuffer) if err != nil { + if err == syscall.EINTR /* || err == unix.EINTR */ { + continue + } _ = dh.Close() return nil, err } @@ -104,9 +111,9 @@ func readDirnames(osDirname string, scratchBuffer []byte) ([]string, error) { workBuffer = scratchBuffer[:n] // trim work buffer to number of bytes read } - // Handle first entry in the work buffer. sde = (*syscall.Dirent)(unsafe.Pointer(&workBuffer[0])) // point entry to first syscall.Dirent in buffer - workBuffer = workBuffer[reclen(sde):] // advance buffer for next iteration through loop + // Handle first entry in the work buffer. + workBuffer = workBuffer[reclen(sde):] // advance buffer for next iteration through loop if inoFromDirent(sde) == 0 { continue // inode set to 0 indicates an entry that was marked as deleted diff --git a/vendor/github.com/karrick/godirwalk/scandir_unix.go b/vendor/github.com/karrick/godirwalk/scandir_unix.go index 46a06a64..33250b61 100644 --- a/vendor/github.com/karrick/godirwalk/scandir_unix.go +++ b/vendor/github.com/karrick/godirwalk/scandir_unix.go @@ -18,7 +18,7 @@ type Scanner struct { statErr error // statErr is any error return while attempting to stat an entry dh *os.File // used to close directory after done reading de *Dirent // most recently decoded directory entry - sde *syscall.Dirent + sde syscall.Dirent fd int // file descriptor used to read entries from directory } @@ -77,7 +77,7 @@ func NewScannerWithScratchBuffer(osDirname string, scratchBuffer []byte) (*Scann func (s *Scanner) Dirent() (*Dirent, error) { if s.de == nil { s.de = &Dirent{name: s.childName, path: s.osDirname} - s.de.modeType, s.statErr = modeTypeFromDirent(s.sde, s.osDirname, s.childName) + s.de.modeType, s.statErr = modeTypeFromDirent(&s.sde, s.osDirname, s.childName) } return s.de, s.statErr } @@ -96,7 +96,8 @@ func (s *Scanner) done(err error) { s.osDirname, s.childName = "", "" s.scratchBuffer, s.workBuffer = nil, nil - s.dh, s.de, s.sde, s.statErr = nil, nil, nil, nil + s.dh, s.de, s.statErr = nil, nil, nil + s.sde = syscall.Dirent{} s.fd = 0 } @@ -131,6 +132,9 @@ func (s *Scanner) Scan() bool { n, err := syscall.ReadDirent(s.fd, s.scratchBuffer) // n, err := unix.ReadDirent(s.fd, s.scratchBuffer) if err != nil { + if err == syscall.EINTR /* || err == unix.EINTR */ { + continue + } s.done(err) return false } @@ -141,14 +145,15 @@ func (s *Scanner) Scan() bool { s.workBuffer = s.scratchBuffer[:n] // trim work buffer to number of bytes read } - s.sde = (*syscall.Dirent)(unsafe.Pointer(&s.workBuffer[0])) // point entry to first syscall.Dirent in buffer - s.workBuffer = s.workBuffer[reclen(s.sde):] // advance buffer for next iteration through loop + // point entry to first syscall.Dirent in buffer + copy((*[unsafe.Sizeof(syscall.Dirent{})]byte)(unsafe.Pointer(&s.sde))[:], s.workBuffer) + s.workBuffer = s.workBuffer[reclen(&s.sde):] // advance buffer for next iteration through loop - if inoFromDirent(s.sde) == 0 { + if inoFromDirent(&s.sde) == 0 { continue // inode set to 0 indicates an entry that was marked as deleted } - nameSlice := nameFromDirent(s.sde) + nameSlice := nameFromDirent(&s.sde) nameLength := len(nameSlice) if nameLength == 0 || (nameSlice[0] == '.' && (nameLength == 1 || (nameLength == 2 && nameSlice[1] == '.'))) { diff --git a/vendor/github.com/onsi/ginkgo/CHANGELOG.md b/vendor/github.com/onsi/ginkgo/CHANGELOG.md index bdf18327..6092fcb6 100644 --- a/vendor/github.com/onsi/ginkgo/CHANGELOG.md +++ b/vendor/github.com/onsi/ginkgo/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.14.1 + +### Fixes +- Discard exported method declaration when running ginkgo bootstrap (#558) [f4b0240] + ## 1.14.0 ### Features diff --git a/vendor/github.com/onsi/ginkgo/README.md b/vendor/github.com/onsi/ginkgo/README.md index fab11458..475e0499 100644 --- a/vendor/github.com/onsi/ginkgo/README.md +++ b/vendor/github.com/onsi/ginkgo/README.md @@ -80,10 +80,11 @@ Agouti allows you run WebDriver integration tests. Learn more about Agouti [her You'll need the Go command-line tools. Follow the [installation instructions](https://golang.org/doc/install) if you don't have it installed. ### Global installation -To install the Ginkgo command line interface into the `$PATH` (actually to `$GOBIN`): +To install the Ginkgo command line interface: ```bash go get -u github.com/onsi/ginkgo/ginkgo ``` +Note that this will install it to `$GOBIN`, which will need to be in the `$PATH` (or equivalent). Run `go help install` for more information. ### Go module ["tools package"](https://github.com/golang/go/issues/25922): Create (or update) a file called `tools/tools.go` with the following contents: @@ -93,7 +94,7 @@ Create (or update) a file called `tools/tools.go` with the following contents: package tools import ( - _ "github.com/onsi/ginkgo" + _ "github.com/onsi/ginkgo/ginkgo" ) // This file imports packages that are used when running go generate, or used diff --git a/vendor/github.com/onsi/ginkgo/config/config.go b/vendor/github.com/onsi/ginkgo/config/config.go index 2ae48b80..feef2bcd 100644 --- a/vendor/github.com/onsi/ginkgo/config/config.go +++ b/vendor/github.com/onsi/ginkgo/config/config.go @@ -20,7 +20,7 @@ import ( "fmt" ) -const VERSION = "1.14.0" +const VERSION = "1.14.1" type GinkgoConfigType struct { RandomSeed int64 diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot.go b/vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot.go index 3f7237c6..c87b7216 100644 --- a/vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot.go +++ b/vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot.go @@ -186,7 +186,9 @@ func getExportedDeclarationsForFile(path string) ([]string, error) { declarations = append(declarations, s.Names[0].Name) } case *ast.FuncDecl: - declarations = append(declarations, x.Name.Name) + if x.Recv == nil { + declarations = append(declarations, x.Name.Name) + } } } diff --git a/vendor/github.com/onsi/gomega/.travis.yml b/vendor/github.com/onsi/gomega/.travis.yml index 072fdd2d..348e3014 100644 --- a/vendor/github.com/onsi/gomega/.travis.yml +++ b/vendor/github.com/onsi/gomega/.travis.yml @@ -1,8 +1,11 @@ language: go +arch: + - amd64 + - ppc64le go: - - 1.13.x - 1.14.x + - 1.15.x - gotip env: diff --git a/vendor/github.com/onsi/gomega/CHANGELOG.md b/vendor/github.com/onsi/gomega/CHANGELOG.md index 3aafdbcf..16095fa3 100644 --- a/vendor/github.com/onsi/gomega/CHANGELOG.md +++ b/vendor/github.com/onsi/gomega/CHANGELOG.md @@ -1,3 +1,27 @@ +## 1.10.5 + +### Fixes +- fix: collections matchers should display type of expectation (#408) [6b4eb5a] +- fix(ContainElements): consistently flatten expected values [073b880] +- fix(ConsistOf): consistently flatten expected values [7266efe] + +## 1.10.4 + +### Fixes +- update golang net library to more recent version without vulnerability (#406) [817a8b9] +- Correct spelling: alloted -> allotted (#403) [0bae715] +- fix a panic in MessageWithDiff with long message (#402) [ea06b9b] + +## 1.10.3 + +### Fixes +- updates golang/x/net to fix vulnerability detected by snyk (#394) [c479356] + +## 1.10.2 + +### Fixes +- Add ExpectWithOffset, EventuallyWithOffset and ConsistentlyWithOffset to WithT (#391) [990941a] + ## 1.10.1 ### Fixes diff --git a/vendor/github.com/onsi/gomega/format/format.go b/vendor/github.com/onsi/gomega/format/format.go index fae25adc..e59d7d75 100644 --- a/vendor/github.com/onsi/gomega/format/format.go +++ b/vendor/github.com/onsi/gomega/format/format.go @@ -105,7 +105,13 @@ func MessageWithDiff(actual, message, expected string) string { tabLength := 4 spaceFromMessageToActual := tabLength + len(": ") - len(message) - padding := strings.Repeat(" ", spaceFromMessageToActual+spacesBeforeFormattedMismatch) + "|" + + paddingCount := spaceFromMessageToActual + spacesBeforeFormattedMismatch + if paddingCount < 0 { + return Message(formattedActual, message, formattedExpected) + } + + padding := strings.Repeat(" ", paddingCount) + "|" return Message(formattedActual, message+padding, formattedExpected) } diff --git a/vendor/github.com/onsi/gomega/go.mod b/vendor/github.com/onsi/gomega/go.mod index 77893514..6f853a57 100644 --- a/vendor/github.com/onsi/gomega/go.mod +++ b/vendor/github.com/onsi/gomega/go.mod @@ -1,9 +1,10 @@ module github.com/onsi/gomega +go 1.14 + require ( github.com/golang/protobuf v1.4.2 github.com/onsi/ginkgo v1.12.1 - golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 - golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 + golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb gopkg.in/yaml.v2 v2.3.0 ) diff --git a/vendor/github.com/onsi/gomega/go.sum b/vendor/github.com/onsi/gomega/go.sum index 610b09be..54eeacd2 100644 --- a/vendor/github.com/onsi/gomega/go.sum +++ b/vendor/github.com/onsi/gomega/go.sum @@ -23,22 +23,28 @@ github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 h1:AeiKBIuRw3UomYXSbLy0Mc2dDLfdtbT/IVn4keq83P0= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb h1:eBmm0M9fYhWpKZLjQUUKka/LtIxf46G4fxeEz5KJr9U= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e h1:N7DeIrjYszNmSW409R3frPPwglRwMkXSBzwVbkOjLLA= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/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.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/vendor/github.com/onsi/gomega/gomega_dsl.go b/vendor/github.com/onsi/gomega/gomega_dsl.go index 8ff9611d..1bc5288b 100644 --- a/vendor/github.com/onsi/gomega/gomega_dsl.go +++ b/vendor/github.com/onsi/gomega/gomega_dsl.go @@ -24,7 +24,7 @@ import ( "github.com/onsi/gomega/types" ) -const GOMEGA_VERSION = "1.10.1" +const GOMEGA_VERSION = "1.10.5" const nilFailHandlerPanic = `You are trying to make an assertion, but Gomega's fail handler is nil. If you're using Ginkgo then you probably forgot to put your assertion in an It(). @@ -376,13 +376,13 @@ func NewGomegaWithT(t types.GomegaTestingT) *GomegaWithT { return NewWithT(t) } -// Expect is used to make assertions. See documentation for Expect. -func (g *WithT) Expect(actual interface{}, extra ...interface{}) Assertion { - return assertion.New(actual, testingtsupport.BuildTestingTGomegaFailWrapper(g.t), 0, extra...) +// ExpectWithOffset is used to make assertions. See documentation for ExpectWithOffset. +func (g *WithT) ExpectWithOffset(offset int, actual interface{}, extra ...interface{}) Assertion { + return assertion.New(actual, testingtsupport.BuildTestingTGomegaFailWrapper(g.t), offset, extra...) } -// Eventually is used to make asynchronous assertions. See documentation for Eventually. -func (g *WithT) Eventually(actual interface{}, intervals ...interface{}) AsyncAssertion { +// EventuallyWithOffset is used to make asynchronous assertions. See documentation for EventuallyWithOffset. +func (g *WithT) EventuallyWithOffset(offset int, actual interface{}, intervals ...interface{}) AsyncAssertion { timeoutInterval := defaultEventuallyTimeout pollingInterval := defaultEventuallyPollingInterval if len(intervals) > 0 { @@ -391,11 +391,11 @@ func (g *WithT) Eventually(actual interface{}, intervals ...interface{}) AsyncAs if len(intervals) > 1 { pollingInterval = toDuration(intervals[1]) } - return asyncassertion.New(asyncassertion.AsyncAssertionTypeEventually, actual, testingtsupport.BuildTestingTGomegaFailWrapper(g.t), timeoutInterval, pollingInterval, 0) + return asyncassertion.New(asyncassertion.AsyncAssertionTypeEventually, actual, testingtsupport.BuildTestingTGomegaFailWrapper(g.t), timeoutInterval, pollingInterval, offset) } -// Consistently is used to make asynchronous assertions. See documentation for Consistently. -func (g *WithT) Consistently(actual interface{}, intervals ...interface{}) AsyncAssertion { +// ConsistentlyWithOffset is used to make asynchronous assertions. See documentation for ConsistentlyWithOffset. +func (g *WithT) ConsistentlyWithOffset(offset int, actual interface{}, intervals ...interface{}) AsyncAssertion { timeoutInterval := defaultConsistentlyDuration pollingInterval := defaultConsistentlyPollingInterval if len(intervals) > 0 { @@ -404,7 +404,22 @@ func (g *WithT) Consistently(actual interface{}, intervals ...interface{}) Async if len(intervals) > 1 { pollingInterval = toDuration(intervals[1]) } - return asyncassertion.New(asyncassertion.AsyncAssertionTypeConsistently, actual, testingtsupport.BuildTestingTGomegaFailWrapper(g.t), timeoutInterval, pollingInterval, 0) + return asyncassertion.New(asyncassertion.AsyncAssertionTypeConsistently, actual, testingtsupport.BuildTestingTGomegaFailWrapper(g.t), timeoutInterval, pollingInterval, offset) +} + +// Expect is used to make assertions. See documentation for Expect. +func (g *WithT) Expect(actual interface{}, extra ...interface{}) Assertion { + return g.ExpectWithOffset(0, actual, extra...) +} + +// Eventually is used to make asynchronous assertions. See documentation for Eventually. +func (g *WithT) Eventually(actual interface{}, intervals ...interface{}) AsyncAssertion { + return g.EventuallyWithOffset(0, actual, intervals...) +} + +// Consistently is used to make asynchronous assertions. See documentation for Consistently. +func (g *WithT) Consistently(actual interface{}, intervals ...interface{}) AsyncAssertion { + return g.ConsistentlyWithOffset(0, actual, intervals...) } func toDuration(input interface{}) time.Duration { diff --git a/vendor/github.com/onsi/gomega/matchers/consist_of.go b/vendor/github.com/onsi/gomega/matchers/consist_of.go index e453b22d..e8ef0dee 100644 --- a/vendor/github.com/onsi/gomega/matchers/consist_of.go +++ b/vendor/github.com/onsi/gomega/matchers/consist_of.go @@ -57,17 +57,21 @@ func equalMatchersToElements(matchers []interface{}) (elements []interface{}) { return } -func matchers(expectedElems []interface{}) (matchers []interface{}) { - elems := expectedElems - if len(expectedElems) == 1 && isArrayOrSlice(expectedElems[0]) { - elems = []interface{}{} - value := reflect.ValueOf(expectedElems[0]) - for i := 0; i < value.Len(); i++ { - elems = append(elems, value.Index(i).Interface()) - } +func flatten(elems []interface{}) []interface{} { + if len(elems) != 1 || !isArrayOrSlice(elems[0]) { + return elems } - for _, e := range elems { + value := reflect.ValueOf(elems[0]) + flattened := make([]interface{}, value.Len()) + for i := 0; i < value.Len(); i++ { + flattened[i] = value.Index(i).Interface() + } + return flattened +} + +func matchers(expectedElems []interface{}) (matchers []interface{}) { + for _, e := range flatten(expectedElems) { matcher, isMatcher := e.(omegaMatcher) if !isMatcher { matcher = &EqualMatcher{Expected: e} @@ -77,6 +81,29 @@ func matchers(expectedElems []interface{}) (matchers []interface{}) { return } +func presentable(elems []interface{}) interface{} { + elems = flatten(elems) + + if len(elems) == 0 { + return []interface{}{} + } + + sv := reflect.ValueOf(elems) + tt := sv.Index(0).Elem().Type() + for i := 1; i < sv.Len(); i++ { + if sv.Index(i).Elem().Type() != tt { + return elems + } + } + + ss := reflect.MakeSlice(reflect.SliceOf(tt), sv.Len(), sv.Len()) + for i := 0; i < sv.Len(); i++ { + ss.Index(i).Set(sv.Index(i).Elem()) + } + + return ss.Interface() +} + func valuesOf(actual interface{}) []interface{} { value := reflect.ValueOf(actual) values := []interface{}{} @@ -95,11 +122,11 @@ func valuesOf(actual interface{}) []interface{} { } func (matcher *ConsistOfMatcher) FailureMessage(actual interface{}) (message string) { - message = format.Message(actual, "to consist of", matcher.Elements) + message = format.Message(actual, "to consist of", presentable(matcher.Elements)) message = appendMissingElements(message, matcher.missingElements) if len(matcher.extraElements) > 0 { message = fmt.Sprintf("%s\nthe extra elements were\n%s", message, - format.Object(matcher.extraElements, 1)) + format.Object(presentable(matcher.extraElements), 1)) } return } @@ -109,9 +136,9 @@ func appendMissingElements(message string, missingElements []interface{}) string return message } return fmt.Sprintf("%s\nthe missing elements were\n%s", message, - format.Object(missingElements, 1)) + format.Object(presentable(missingElements), 1)) } func (matcher *ConsistOfMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to consist of", matcher.Elements) + return format.Message(actual, "not to consist of", presentable(matcher.Elements)) } diff --git a/vendor/github.com/onsi/gomega/matchers/contain_elements_matcher.go b/vendor/github.com/onsi/gomega/matchers/contain_elements_matcher.go index 19a9e78f..946cd8be 100644 --- a/vendor/github.com/onsi/gomega/matchers/contain_elements_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/contain_elements_matcher.go @@ -35,10 +35,10 @@ func (matcher *ContainElementsMatcher) Match(actual interface{}) (success bool, } func (matcher *ContainElementsMatcher) FailureMessage(actual interface{}) (message string) { - message = format.Message(actual, "to contain elements", matcher.Elements) + message = format.Message(actual, "to contain elements", presentable(matcher.Elements)) return appendMissingElements(message, matcher.missingElements) } func (matcher *ContainElementsMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to contain elements", matcher.Elements) + return format.Message(actual, "not to contain elements", presentable(matcher.Elements)) } diff --git a/vendor/github.com/onsi/gomega/matchers/match_error_matcher.go b/vendor/github.com/onsi/gomega/matchers/match_error_matcher.go index 4e09239f..c8993a86 100644 --- a/vendor/github.com/onsi/gomega/matchers/match_error_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/match_error_matcher.go @@ -1,11 +1,11 @@ package matchers import ( + "errors" "fmt" "reflect" "github.com/onsi/gomega/format" - "golang.org/x/xerrors" ) type MatchErrorMatcher struct { @@ -25,7 +25,7 @@ func (matcher *MatchErrorMatcher) Match(actual interface{}) (success bool, err e expected := matcher.Expected if isError(expected) { - return reflect.DeepEqual(actualErr, expected) || xerrors.Is(actualErr, expected.(error)), nil + return reflect.DeepEqual(actualErr, expected) || errors.Is(actualErr, expected.(error)), nil } if isString(expected) { diff --git a/vendor/github.com/prometheus/client_golang/prometheus/counter.go b/vendor/github.com/prometheus/client_golang/prometheus/counter.go index 3f8fd790..0e1b48c0 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/counter.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/counter.go @@ -163,7 +163,7 @@ func (c *counter) updateExemplar(v float64, l Labels) { // (e.g. number of HTTP requests, partitioned by response code and // method). Create instances with NewCounterVec. type CounterVec struct { - *MetricVec + *metricVec } // NewCounterVec creates a new CounterVec based on the provided CounterOpts and @@ -176,11 +176,11 @@ func NewCounterVec(opts CounterOpts, labelNames []string) *CounterVec { opts.ConstLabels, ) return &CounterVec{ - MetricVec: NewMetricVec(desc, func(lvs ...string) Metric { + metricVec: newMetricVec(desc, func(lvs ...string) Metric { if len(lvs) != len(desc.variableLabels) { panic(makeInconsistentCardinalityError(desc.fqName, desc.variableLabels, lvs)) } - result := &counter{desc: desc, labelPairs: MakeLabelPairs(desc, lvs), now: time.Now} + result := &counter{desc: desc, labelPairs: makeLabelPairs(desc, lvs), now: time.Now} result.init(result) // Init self-collection. return result }), @@ -188,7 +188,7 @@ func NewCounterVec(opts CounterOpts, labelNames []string) *CounterVec { } // GetMetricWithLabelValues returns the Counter for the given slice of label -// values (same order as the variable labels in Desc). If that combination of +// values (same order as the VariableLabels in Desc). If that combination of // label values is accessed for the first time, a new Counter is created. // // It is possible to call this method without using the returned Counter to only @@ -202,7 +202,7 @@ func NewCounterVec(opts CounterOpts, labelNames []string) *CounterVec { // Counter with the same label values is created later. // // An error is returned if the number of label values is not the same as the -// number of variable labels in Desc (minus any curried labels). +// number of VariableLabels in Desc (minus any curried labels). // // Note that for more than one label value, this method is prone to mistakes // caused by an incorrect order of arguments. Consider GetMetricWith(Labels) as @@ -211,7 +211,7 @@ func NewCounterVec(opts CounterOpts, labelNames []string) *CounterVec { // with a performance overhead (for creating and processing the Labels map). // See also the GaugeVec example. func (v *CounterVec) GetMetricWithLabelValues(lvs ...string) (Counter, error) { - metric, err := v.MetricVec.GetMetricWithLabelValues(lvs...) + metric, err := v.metricVec.getMetricWithLabelValues(lvs...) if metric != nil { return metric.(Counter), err } @@ -219,19 +219,19 @@ func (v *CounterVec) GetMetricWithLabelValues(lvs ...string) (Counter, error) { } // GetMetricWith returns the Counter for the given Labels map (the label names -// must match those of the variable labels in Desc). If that label map is +// must match those of the VariableLabels in Desc). If that label map is // accessed for the first time, a new Counter is created. Implications of // creating a Counter without using it and keeping the Counter for later use are // the same as for GetMetricWithLabelValues. // // An error is returned if the number and names of the Labels are inconsistent -// with those of the variable labels in Desc (minus any curried labels). +// with those of the VariableLabels in Desc (minus any curried labels). // // This method is used for the same purpose as // GetMetricWithLabelValues(...string). See there for pros and cons of the two // methods. func (v *CounterVec) GetMetricWith(labels Labels) (Counter, error) { - metric, err := v.MetricVec.GetMetricWith(labels) + metric, err := v.metricVec.getMetricWith(labels) if metric != nil { return metric.(Counter), err } @@ -275,7 +275,7 @@ func (v *CounterVec) With(labels Labels) Counter { // registered with a given registry (usually the uncurried version). The Reset // method deletes all metrics, even if called on a curried vector. func (v *CounterVec) CurryWith(labels Labels) (*CounterVec, error) { - vec, err := v.MetricVec.CurryWith(labels) + vec, err := v.curryWith(labels) if vec != nil { return &CounterVec{vec}, err } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/desc.go b/vendor/github.com/prometheus/client_golang/prometheus/desc.go index 957d93a2..2f19f5e1 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/desc.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/desc.go @@ -51,7 +51,7 @@ type Desc struct { // constLabelPairs contains precalculated DTO label pairs based on // the constant labels. constLabelPairs []*dto.LabelPair - // variableLabels contains names of labels for which the metric + // VariableLabels contains names of labels for which the metric // maintains variable values. variableLabels []string // id is a hash of the values of the ConstLabels and fqName. This diff --git a/vendor/github.com/prometheus/client_golang/prometheus/gauge.go b/vendor/github.com/prometheus/client_golang/prometheus/gauge.go index bd0733d6..d67573f7 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/gauge.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/gauge.go @@ -132,7 +132,7 @@ func (g *gauge) Write(out *dto.Metric) error { // (e.g. number of operations queued, partitioned by user and operation // type). Create instances with NewGaugeVec. type GaugeVec struct { - *MetricVec + *metricVec } // NewGaugeVec creates a new GaugeVec based on the provided GaugeOpts and @@ -145,11 +145,11 @@ func NewGaugeVec(opts GaugeOpts, labelNames []string) *GaugeVec { opts.ConstLabels, ) return &GaugeVec{ - MetricVec: NewMetricVec(desc, func(lvs ...string) Metric { + metricVec: newMetricVec(desc, func(lvs ...string) Metric { if len(lvs) != len(desc.variableLabels) { panic(makeInconsistentCardinalityError(desc.fqName, desc.variableLabels, lvs)) } - result := &gauge{desc: desc, labelPairs: MakeLabelPairs(desc, lvs)} + result := &gauge{desc: desc, labelPairs: makeLabelPairs(desc, lvs)} result.init(result) // Init self-collection. return result }), @@ -157,7 +157,7 @@ func NewGaugeVec(opts GaugeOpts, labelNames []string) *GaugeVec { } // GetMetricWithLabelValues returns the Gauge for the given slice of label -// values (same order as the variable labels in Desc). If that combination of +// values (same order as the VariableLabels in Desc). If that combination of // label values is accessed for the first time, a new Gauge is created. // // It is possible to call this method without using the returned Gauge to only @@ -172,7 +172,7 @@ func NewGaugeVec(opts GaugeOpts, labelNames []string) *GaugeVec { // example. // // An error is returned if the number of label values is not the same as the -// number of variable labels in Desc (minus any curried labels). +// number of VariableLabels in Desc (minus any curried labels). // // Note that for more than one label value, this method is prone to mistakes // caused by an incorrect order of arguments. Consider GetMetricWith(Labels) as @@ -180,7 +180,7 @@ func NewGaugeVec(opts GaugeOpts, labelNames []string) *GaugeVec { // latter has a much more readable (albeit more verbose) syntax, but it comes // with a performance overhead (for creating and processing the Labels map). func (v *GaugeVec) GetMetricWithLabelValues(lvs ...string) (Gauge, error) { - metric, err := v.MetricVec.GetMetricWithLabelValues(lvs...) + metric, err := v.metricVec.getMetricWithLabelValues(lvs...) if metric != nil { return metric.(Gauge), err } @@ -188,19 +188,19 @@ func (v *GaugeVec) GetMetricWithLabelValues(lvs ...string) (Gauge, error) { } // GetMetricWith returns the Gauge for the given Labels map (the label names -// must match those of the variable labels in Desc). If that label map is +// must match those of the VariableLabels in Desc). If that label map is // accessed for the first time, a new Gauge is created. Implications of // creating a Gauge without using it and keeping the Gauge for later use are // the same as for GetMetricWithLabelValues. // // An error is returned if the number and names of the Labels are inconsistent -// with those of the variable labels in Desc (minus any curried labels). +// with those of the VariableLabels in Desc (minus any curried labels). // // This method is used for the same purpose as // GetMetricWithLabelValues(...string). See there for pros and cons of the two // methods. func (v *GaugeVec) GetMetricWith(labels Labels) (Gauge, error) { - metric, err := v.MetricVec.GetMetricWith(labels) + metric, err := v.metricVec.getMetricWith(labels) if metric != nil { return metric.(Gauge), err } @@ -244,7 +244,7 @@ func (v *GaugeVec) With(labels Labels) Gauge { // registered with a given registry (usually the uncurried version). The Reset // method deletes all metrics, even if called on a curried vector. func (v *GaugeVec) CurryWith(labels Labels) (*GaugeVec, error) { - vec, err := v.MetricVec.CurryWith(labels) + vec, err := v.curryWith(labels) if vec != nil { return &GaugeVec{vec}, err } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go b/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go index 6f67d104..ea05cf42 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go @@ -58,10 +58,9 @@ type goCollector struct { // collector will use the memstats from a previous collection if // runtime.ReadMemStats takes more than 1s. However, if there are no previously // collected memstats, or their collection is more than 5m ago, the collection -// will block until runtime.ReadMemStats succeeds. -// -// NOTE: The problem is solved in Go 1.15, see -// https://github.com/golang/go/issues/19812 for the related Go issue. +// will block until runtime.ReadMemStats succeeds. (The problem might be solved +// in Go1.13, see https://github.com/golang/go/issues/19812 for the related Go +// issue.) func NewGoCollector() Collector { return &goCollector{ goroutinesDesc: NewDesc( diff --git a/vendor/github.com/prometheus/client_golang/prometheus/histogram.go b/vendor/github.com/prometheus/client_golang/prometheus/histogram.go index f71e286b..d4ea301a 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/histogram.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/histogram.go @@ -192,7 +192,7 @@ func newHistogram(desc *Desc, opts HistogramOpts, labelValues ...string) Histogr h := &histogram{ desc: desc, upperBounds: opts.Buckets, - labelPairs: MakeLabelPairs(desc, labelValues), + labelPairs: makeLabelPairs(desc, labelValues), counts: [2]*histogramCounts{{}, {}}, now: time.Now, } @@ -409,7 +409,7 @@ func (h *histogram) updateExemplar(v float64, bucket int, l Labels) { // (e.g. HTTP request latencies, partitioned by status code and method). Create // instances with NewHistogramVec. type HistogramVec struct { - *MetricVec + *metricVec } // NewHistogramVec creates a new HistogramVec based on the provided HistogramOpts and @@ -422,14 +422,14 @@ func NewHistogramVec(opts HistogramOpts, labelNames []string) *HistogramVec { opts.ConstLabels, ) return &HistogramVec{ - MetricVec: NewMetricVec(desc, func(lvs ...string) Metric { + metricVec: newMetricVec(desc, func(lvs ...string) Metric { return newHistogram(desc, opts, lvs...) }), } } // GetMetricWithLabelValues returns the Histogram for the given slice of label -// values (same order as the variable labels in Desc). If that combination of +// values (same order as the VariableLabels in Desc). If that combination of // label values is accessed for the first time, a new Histogram is created. // // It is possible to call this method without using the returned Histogram to only @@ -444,7 +444,7 @@ func NewHistogramVec(opts HistogramOpts, labelNames []string) *HistogramVec { // example. // // An error is returned if the number of label values is not the same as the -// number of variable labels in Desc (minus any curried labels). +// number of VariableLabels in Desc (minus any curried labels). // // Note that for more than one label value, this method is prone to mistakes // caused by an incorrect order of arguments. Consider GetMetricWith(Labels) as @@ -453,7 +453,7 @@ func NewHistogramVec(opts HistogramOpts, labelNames []string) *HistogramVec { // with a performance overhead (for creating and processing the Labels map). // See also the GaugeVec example. func (v *HistogramVec) GetMetricWithLabelValues(lvs ...string) (Observer, error) { - metric, err := v.MetricVec.GetMetricWithLabelValues(lvs...) + metric, err := v.metricVec.getMetricWithLabelValues(lvs...) if metric != nil { return metric.(Observer), err } @@ -461,19 +461,19 @@ func (v *HistogramVec) GetMetricWithLabelValues(lvs ...string) (Observer, error) } // GetMetricWith returns the Histogram for the given Labels map (the label names -// must match those of the variable labels in Desc). If that label map is +// must match those of the VariableLabels in Desc). If that label map is // accessed for the first time, a new Histogram is created. Implications of // creating a Histogram without using it and keeping the Histogram for later use // are the same as for GetMetricWithLabelValues. // // An error is returned if the number and names of the Labels are inconsistent -// with those of the variable labels in Desc (minus any curried labels). +// with those of the VariableLabels in Desc (minus any curried labels). // // This method is used for the same purpose as // GetMetricWithLabelValues(...string). See there for pros and cons of the two // methods. func (v *HistogramVec) GetMetricWith(labels Labels) (Observer, error) { - metric, err := v.MetricVec.GetMetricWith(labels) + metric, err := v.metricVec.getMetricWith(labels) if metric != nil { return metric.(Observer), err } @@ -517,7 +517,7 @@ func (v *HistogramVec) With(labels Labels) Observer { // registered with a given registry (usually the uncurried version). The Reset // method deletes all metrics, even if called on a curried vector. func (v *HistogramVec) CurryWith(labels Labels) (ObserverVec, error) { - vec, err := v.MetricVec.CurryWith(labels) + vec, err := v.curryWith(labels) if vec != nil { return &HistogramVec{vec}, err } @@ -602,7 +602,7 @@ func NewConstHistogram( count: count, sum: sum, buckets: buckets, - labelPairs: MakeLabelPairs(desc, labelValues), + labelPairs: makeLabelPairs(desc, labelValues), }, nil } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/metric.go b/vendor/github.com/prometheus/client_golang/prometheus/metric.go index a2b80b1c..35bd8bde 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/metric.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/metric.go @@ -89,7 +89,7 @@ type Opts struct { // better covered by target labels set by the scraping Prometheus // server, or by one specific metric (e.g. a build_info or a // machine_role metric). See also - // https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels-not-static-scraped-labels + // https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels,-not-static-scraped-labels ConstLabels Labels } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/summary.go b/vendor/github.com/prometheus/client_golang/prometheus/summary.go index cf700714..f3c1440d 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/summary.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/summary.go @@ -110,7 +110,7 @@ type SummaryOpts struct { // better covered by target labels set by the scraping Prometheus // server, or by one specific metric (e.g. a build_info or a // machine_role metric). See also - // https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels-not-static-scraped-labels + // https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels,-not-static-scraped-labels ConstLabels Labels // Objectives defines the quantile rank estimates with their respective @@ -208,7 +208,7 @@ func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary { // Use the lock-free implementation of a Summary without objectives. s := &noObjectivesSummary{ desc: desc, - labelPairs: MakeLabelPairs(desc, labelValues), + labelPairs: makeLabelPairs(desc, labelValues), counts: [2]*summaryCounts{{}, {}}, } s.init(s) // Init self-collection. @@ -221,7 +221,7 @@ func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary { objectives: opts.Objectives, sortedObjectives: make([]float64, 0, len(opts.Objectives)), - labelPairs: MakeLabelPairs(desc, labelValues), + labelPairs: makeLabelPairs(desc, labelValues), hotBuf: make([]float64, 0, opts.BufCap), coldBuf: make([]float64, 0, opts.BufCap), @@ -513,7 +513,7 @@ func (s quantSort) Less(i, j int) bool { // (e.g. HTTP request latencies, partitioned by status code and method). Create // instances with NewSummaryVec. type SummaryVec struct { - *MetricVec + *metricVec } // NewSummaryVec creates a new SummaryVec based on the provided SummaryOpts and @@ -535,14 +535,14 @@ func NewSummaryVec(opts SummaryOpts, labelNames []string) *SummaryVec { opts.ConstLabels, ) return &SummaryVec{ - MetricVec: NewMetricVec(desc, func(lvs ...string) Metric { + metricVec: newMetricVec(desc, func(lvs ...string) Metric { return newSummary(desc, opts, lvs...) }), } } // GetMetricWithLabelValues returns the Summary for the given slice of label -// values (same order as the variable labels in Desc). If that combination of +// values (same order as the VariableLabels in Desc). If that combination of // label values is accessed for the first time, a new Summary is created. // // It is possible to call this method without using the returned Summary to only @@ -557,7 +557,7 @@ func NewSummaryVec(opts SummaryOpts, labelNames []string) *SummaryVec { // example. // // An error is returned if the number of label values is not the same as the -// number of variable labels in Desc (minus any curried labels). +// number of VariableLabels in Desc (minus any curried labels). // // Note that for more than one label value, this method is prone to mistakes // caused by an incorrect order of arguments. Consider GetMetricWith(Labels) as @@ -566,7 +566,7 @@ func NewSummaryVec(opts SummaryOpts, labelNames []string) *SummaryVec { // with a performance overhead (for creating and processing the Labels map). // See also the GaugeVec example. func (v *SummaryVec) GetMetricWithLabelValues(lvs ...string) (Observer, error) { - metric, err := v.MetricVec.GetMetricWithLabelValues(lvs...) + metric, err := v.metricVec.getMetricWithLabelValues(lvs...) if metric != nil { return metric.(Observer), err } @@ -574,19 +574,19 @@ func (v *SummaryVec) GetMetricWithLabelValues(lvs ...string) (Observer, error) { } // GetMetricWith returns the Summary for the given Labels map (the label names -// must match those of the variable labels in Desc). If that label map is +// must match those of the VariableLabels in Desc). If that label map is // accessed for the first time, a new Summary is created. Implications of // creating a Summary without using it and keeping the Summary for later use are // the same as for GetMetricWithLabelValues. // // An error is returned if the number and names of the Labels are inconsistent -// with those of the variable labels in Desc (minus any curried labels). +// with those of the VariableLabels in Desc (minus any curried labels). // // This method is used for the same purpose as // GetMetricWithLabelValues(...string). See there for pros and cons of the two // methods. func (v *SummaryVec) GetMetricWith(labels Labels) (Observer, error) { - metric, err := v.MetricVec.GetMetricWith(labels) + metric, err := v.metricVec.getMetricWith(labels) if metric != nil { return metric.(Observer), err } @@ -630,7 +630,7 @@ func (v *SummaryVec) With(labels Labels) Observer { // registered with a given registry (usually the uncurried version). The Reset // method deletes all metrics, even if called on a curried vector. func (v *SummaryVec) CurryWith(labels Labels) (ObserverVec, error) { - vec, err := v.MetricVec.CurryWith(labels) + vec, err := v.curryWith(labels) if vec != nil { return &SummaryVec{vec}, err } @@ -716,7 +716,7 @@ func NewConstSummary( count: count, sum: sum, quantiles: quantiles, - labelPairs: MakeLabelPairs(desc, labelValues), + labelPairs: makeLabelPairs(desc, labelValues), }, nil } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/value.go b/vendor/github.com/prometheus/client_golang/prometheus/value.go index 8304de47..6206928c 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/value.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/value.go @@ -63,7 +63,7 @@ func newValueFunc(desc *Desc, valueType ValueType, function func() float64) *val desc: desc, valType: valueType, function: function, - labelPairs: MakeLabelPairs(desc, nil), + labelPairs: makeLabelPairs(desc, nil), } result.init(result) return result @@ -95,7 +95,7 @@ func NewConstMetric(desc *Desc, valueType ValueType, value float64, labelValues desc: desc, valType: valueType, val: value, - labelPairs: MakeLabelPairs(desc, labelValues), + labelPairs: makeLabelPairs(desc, labelValues), }, nil } @@ -145,14 +145,7 @@ func populateMetric( return nil } -// MakeLabelPairs is a helper function to create protobuf LabelPairs from the -// variable and constant labels in the provided Desc. The values for the -// variable labels are defined by the labelValues slice, which must be in the -// same order as the corresponding variable labels in the Desc. -// -// This function is only needed for custom Metric implementations. See MetricVec -// example. -func MakeLabelPairs(desc *Desc, labelValues []string) []*dto.LabelPair { +func makeLabelPairs(desc *Desc, labelValues []string) []*dto.LabelPair { totalLen := len(desc.variableLabels) + len(desc.constLabelPairs) if totalLen == 0 { // Super fast path. diff --git a/vendor/github.com/prometheus/client_golang/prometheus/vec.go b/vendor/github.com/prometheus/client_golang/prometheus/vec.go index 6ba49d85..d53848dc 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/vec.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/vec.go @@ -20,20 +20,12 @@ import ( "github.com/prometheus/common/model" ) -// MetricVec is a Collector to bundle metrics of the same name that differ in -// their label values. MetricVec is not used directly but as a building block -// for implementations of vectors of a given metric type, like GaugeVec, -// CounterVec, SummaryVec, and HistogramVec. It is exported so that it can be -// used for custom Metric implementations. -// -// To create a FooVec for custom Metric Foo, embed a pointer to MetricVec in -// FooVec and initialize it with NewMetricVec. Implement wrappers for -// GetMetricWithLabelValues and GetMetricWith that return (Foo, error) rather -// than (Metric, error). Similarly, create a wrapper for CurryWith that returns -// (*FooVec, error) rather than (*MetricVec, error). It is recommended to also -// add the convenience methods WithLabelValues, With, and MustCurryWith, which -// panic instead of returning errors. See also the MetricVec example. -type MetricVec struct { +// metricVec is a Collector to bundle metrics of the same name that differ in +// their label values. metricVec is not used directly (and therefore +// unexported). It is used as a building block for implementations of vectors of +// a given metric type, like GaugeVec, CounterVec, SummaryVec, and HistogramVec. +// It also handles label currying. +type metricVec struct { *metricMap curry []curriedLabelValue @@ -43,9 +35,9 @@ type MetricVec struct { hashAddByte func(h uint64, b byte) uint64 } -// NewMetricVec returns an initialized metricVec. -func NewMetricVec(desc *Desc, newMetric func(lvs ...string) Metric) *MetricVec { - return &MetricVec{ +// newMetricVec returns an initialized metricVec. +func newMetricVec(desc *Desc, newMetric func(lvs ...string) Metric) *metricVec { + return &metricVec{ metricMap: &metricMap{ metrics: map[uint64][]metricWithLabelValues{}, desc: desc, @@ -71,7 +63,7 @@ func NewMetricVec(desc *Desc, newMetric func(lvs ...string) Metric) *MetricVec { // latter has a much more readable (albeit more verbose) syntax, but it comes // with a performance overhead (for creating and processing the Labels map). // See also the CounterVec example. -func (m *MetricVec) DeleteLabelValues(lvs ...string) bool { +func (m *metricVec) DeleteLabelValues(lvs ...string) bool { h, err := m.hashLabelValues(lvs) if err != nil { return false @@ -90,7 +82,7 @@ func (m *MetricVec) DeleteLabelValues(lvs ...string) bool { // // This method is used for the same purpose as DeleteLabelValues(...string). See // there for pros and cons of the two methods. -func (m *MetricVec) Delete(labels Labels) bool { +func (m *metricVec) Delete(labels Labels) bool { h, err := m.hashLabels(labels) if err != nil { return false @@ -103,32 +95,15 @@ func (m *MetricVec) Delete(labels Labels) bool { // show up in GoDoc. // Describe implements Collector. -func (m *MetricVec) Describe(ch chan<- *Desc) { m.metricMap.Describe(ch) } +func (m *metricVec) Describe(ch chan<- *Desc) { m.metricMap.Describe(ch) } // Collect implements Collector. -func (m *MetricVec) Collect(ch chan<- Metric) { m.metricMap.Collect(ch) } +func (m *metricVec) Collect(ch chan<- Metric) { m.metricMap.Collect(ch) } // Reset deletes all metrics in this vector. -func (m *MetricVec) Reset() { m.metricMap.Reset() } - -// CurryWith returns a vector curried with the provided labels, i.e. the -// returned vector has those labels pre-set for all labeled operations performed -// on it. The cardinality of the curried vector is reduced accordingly. The -// order of the remaining labels stays the same (just with the curried labels -// taken out of the sequence – which is relevant for the -// (GetMetric)WithLabelValues methods). It is possible to curry a curried -// vector, but only with labels not yet used for currying before. -// -// The metrics contained in the MetricVec are shared between the curried and -// uncurried vectors. They are just accessed differently. Curried and uncurried -// vectors behave identically in terms of collection. Only one must be -// registered with a given registry (usually the uncurried version). The Reset -// method deletes all metrics, even if called on a curried vector. -// -// Note that CurryWith is usually not called directly but through a wrapper -// around MetricVec, implementing a vector for a specific Metric -// implementation, for example GaugeVec. -func (m *MetricVec) CurryWith(labels Labels) (*MetricVec, error) { +func (m *metricVec) Reset() { m.metricMap.Reset() } + +func (m *metricVec) curryWith(labels Labels) (*metricVec, error) { var ( newCurry []curriedLabelValue oldCurry = m.curry @@ -153,7 +128,7 @@ func (m *MetricVec) CurryWith(labels Labels) (*MetricVec, error) { return nil, fmt.Errorf("%d unknown label(s) found during currying", l) } - return &MetricVec{ + return &metricVec{ metricMap: m.metricMap, curry: newCurry, hashAdd: m.hashAdd, @@ -161,34 +136,7 @@ func (m *MetricVec) CurryWith(labels Labels) (*MetricVec, error) { }, nil } -// GetMetricWithLabelValues returns the Metric for the given slice of label -// values (same order as the variable labels in Desc). If that combination of -// label values is accessed for the first time, a new Metric is created (by -// calling the newMetric function provided during construction of the -// MetricVec). -// -// It is possible to call this method without using the returned Metry to only -// create the new Metric but leave it in its intitial state. -// -// Keeping the Metric for later use is possible (and should be considered if -// performance is critical), but keep in mind that Reset, DeleteLabelValues and -// Delete can be used to delete the Metric from the MetricVec. In that case, the -// Metric will still exist, but it will not be exported anymore, even if a -// Metric with the same label values is created later. -// -// An error is returned if the number of label values is not the same as the -// number of variable labels in Desc (minus any curried labels). -// -// Note that for more than one label value, this method is prone to mistakes -// caused by an incorrect order of arguments. Consider GetMetricWith(Labels) as -// an alternative to avoid that type of mistake. For higher label numbers, the -// latter has a much more readable (albeit more verbose) syntax, but it comes -// with a performance overhead (for creating and processing the Labels map). -// -// Note that GetMetricWithLabelValues is usually not called directly but through -// a wrapper around MetricVec, implementing a vector for a specific Metric -// implementation, for example GaugeVec. -func (m *MetricVec) GetMetricWithLabelValues(lvs ...string) (Metric, error) { +func (m *metricVec) getMetricWithLabelValues(lvs ...string) (Metric, error) { h, err := m.hashLabelValues(lvs) if err != nil { return nil, err @@ -197,23 +145,7 @@ func (m *MetricVec) GetMetricWithLabelValues(lvs ...string) (Metric, error) { return m.metricMap.getOrCreateMetricWithLabelValues(h, lvs, m.curry), nil } -// GetMetricWith returns the Metric for the given Labels map (the label names -// must match those of the variable labels in Desc). If that label map is -// accessed for the first time, a new Metric is created. Implications of -// creating a Metric without using it and keeping the Metric for later use -// are the same as for GetMetricWithLabelValues. -// -// An error is returned if the number and names of the Labels are inconsistent -// with those of the variable labels in Desc (minus any curried labels). -// -// This method is used for the same purpose as -// GetMetricWithLabelValues(...string). See there for pros and cons of the two -// methods. -// -// Note that GetMetricWith is usually not called directly but through a wrapper -// around MetricVec, implementing a vector for a specific Metric implementation, -// for example GaugeVec. -func (m *MetricVec) GetMetricWith(labels Labels) (Metric, error) { +func (m *metricVec) getMetricWith(labels Labels) (Metric, error) { h, err := m.hashLabels(labels) if err != nil { return nil, err @@ -222,7 +154,7 @@ func (m *MetricVec) GetMetricWith(labels Labels) (Metric, error) { return m.metricMap.getOrCreateMetricWithLabels(h, labels, m.curry), nil } -func (m *MetricVec) hashLabelValues(vals []string) (uint64, error) { +func (m *metricVec) hashLabelValues(vals []string) (uint64, error) { if err := validateLabelValues(vals, len(m.desc.variableLabels)-len(m.curry)); err != nil { return 0, err } @@ -245,7 +177,7 @@ func (m *MetricVec) hashLabelValues(vals []string) (uint64, error) { return h, nil } -func (m *MetricVec) hashLabels(labels Labels) (uint64, error) { +func (m *metricVec) hashLabels(labels Labels) (uint64, error) { if err := validateValuesInLabels(labels, len(m.desc.variableLabels)-len(m.curry)); err != nil { return 0, err } @@ -344,9 +276,7 @@ func (m *metricMap) deleteByHashWithLabelValues( } if len(metrics) > 1 { - old := metrics m.metrics[h] = append(metrics[:i], metrics[i+1:]...) - old[len(old)-1] = metricWithLabelValues{} } else { delete(m.metrics, h) } @@ -372,9 +302,7 @@ func (m *metricMap) deleteByHashWithLabels( } if len(metrics) > 1 { - old := metrics m.metrics[h] = append(metrics[:i], metrics[i+1:]...) - old[len(old)-1] = metricWithLabelValues{} } else { delete(m.metrics, h) } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/wrap.go b/vendor/github.com/prometheus/client_golang/prometheus/wrap.go index c1b12f08..438aa5e9 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/wrap.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/wrap.go @@ -32,9 +32,7 @@ import ( // in a no-op Registerer. // // WrapRegistererWith provides a way to add fixed labels to a subset of -// Collectors. It should not be used to add fixed labels to all metrics -// exposed. See also -// https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels-not-static-scraped-labels +// Collectors. It should not be used to add fixed labels to all metrics exposed. // // Conflicts between Collectors registered through the original Registerer with // Collectors registered through the wrapping Registerer will still be diff --git a/vendor/github.com/prometheus/common/expfmt/decode.go b/vendor/github.com/prometheus/common/expfmt/decode.go index 7657f841..c092723e 100644 --- a/vendor/github.com/prometheus/common/expfmt/decode.go +++ b/vendor/github.com/prometheus/common/expfmt/decode.go @@ -164,7 +164,7 @@ func (sd *SampleDecoder) Decode(s *model.Vector) error { } // ExtractSamples builds a slice of samples from the provided metric -// families. If an error occurs during sample extraction, it continues to +// families. If an error occurrs during sample extraction, it continues to // extract from the remaining metric families. The returned error is the last // error that has occurred. func ExtractSamples(o *DecodeOptions, fams ...*dto.MetricFamily) (model.Vector, error) { diff --git a/vendor/github.com/prometheus/common/model/fnv.go b/vendor/github.com/prometheus/common/model/fnv.go index 367afecd..038fc1c9 100644 --- a/vendor/github.com/prometheus/common/model/fnv.go +++ b/vendor/github.com/prometheus/common/model/fnv.go @@ -20,7 +20,7 @@ const ( prime64 = 1099511628211 ) -// hashNew initializes a new fnv64a hash value. +// hashNew initializies a new fnv64a hash value. func hashNew() uint64 { return offset64 } diff --git a/vendor/github.com/prometheus/common/model/time.go b/vendor/github.com/prometheus/common/model/time.go index c40e6403..490a0240 100644 --- a/vendor/github.com/prometheus/common/model/time.go +++ b/vendor/github.com/prometheus/common/model/time.go @@ -181,77 +181,77 @@ func (d *Duration) Type() string { return "duration" } -var durationRE = regexp.MustCompile("^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$") +var durationRE = regexp.MustCompile("^([0-9]+)(y|w|d|h|m|s|ms)$") // ParseDuration parses a string into a time.Duration, assuming that a year // always has 365d, a week always has 7d, and a day always has 24h. func ParseDuration(durationStr string) (Duration, error) { - switch durationStr { - case "0": - // Allow 0 without a unit. + // Allow 0 without a unit. + if durationStr == "0" { return 0, nil - case "": - return 0, fmt.Errorf("empty duration string") } matches := durationRE.FindStringSubmatch(durationStr) - if matches == nil { + if len(matches) != 3 { return 0, fmt.Errorf("not a valid duration string: %q", durationStr) } - var dur time.Duration - - // Parse the match at pos `pos` in the regex and use `mult` to turn that - // into ms, then add that value to the total parsed duration. - m := func(pos int, mult time.Duration) { - if matches[pos] == "" { - return - } - n, _ := strconv.Atoi(matches[pos]) - d := time.Duration(n) * time.Millisecond - dur += d * mult + var ( + n, _ = strconv.Atoi(matches[1]) + dur = time.Duration(n) * time.Millisecond + ) + switch unit := matches[2]; unit { + case "y": + dur *= 1000 * 60 * 60 * 24 * 365 + case "w": + dur *= 1000 * 60 * 60 * 24 * 7 + case "d": + dur *= 1000 * 60 * 60 * 24 + case "h": + dur *= 1000 * 60 * 60 + case "m": + dur *= 1000 * 60 + case "s": + dur *= 1000 + case "ms": + // Value already correct + default: + return 0, fmt.Errorf("invalid time unit in duration string: %q", unit) } - - m(2, 1000*60*60*24*365) // y - m(4, 1000*60*60*24*7) // w - m(6, 1000*60*60*24) // d - m(8, 1000*60*60) // h - m(10, 1000*60) // m - m(12, 1000) // s - m(14, 1) // ms - return Duration(dur), nil } func (d Duration) String() string { var ( - ms = int64(time.Duration(d) / time.Millisecond) - r = "" + ms = int64(time.Duration(d) / time.Millisecond) + unit = "ms" ) if ms == 0 { return "0s" } - - f := func(unit string, mult int64, exact bool) { - if exact && ms%mult != 0 { - return - } - if v := ms / mult; v > 0 { - r += fmt.Sprintf("%d%s", v, unit) - ms -= v * mult - } + factors := map[string]int64{ + "y": 1000 * 60 * 60 * 24 * 365, + "w": 1000 * 60 * 60 * 24 * 7, + "d": 1000 * 60 * 60 * 24, + "h": 1000 * 60 * 60, + "m": 1000 * 60, + "s": 1000, + "ms": 1, } - // Only format years and weeks if the remainder is zero, as it is often - // easier to read 90d than 12w6d. - f("y", 1000*60*60*24*365, true) - f("w", 1000*60*60*24*7, true) - - f("d", 1000*60*60*24, false) - f("h", 1000*60*60, false) - f("m", 1000*60, false) - f("s", 1000, false) - f("ms", 1, false) - - return r + switch int64(0) { + case ms % factors["y"]: + unit = "y" + case ms % factors["w"]: + unit = "w" + case ms % factors["d"]: + unit = "d" + case ms % factors["h"]: + unit = "h" + case ms % factors["m"]: + unit = "m" + case ms % factors["s"]: + unit = "s" + } + return fmt.Sprintf("%v%v", ms/factors[unit], unit) } // MarshalYAML implements the yaml.Marshaler interface. diff --git a/vendor/github.com/spf13/cobra/.gitignore b/vendor/github.com/spf13/cobra/.gitignore index b2b848e7..c7b459e4 100644 --- a/vendor/github.com/spf13/cobra/.gitignore +++ b/vendor/github.com/spf13/cobra/.gitignore @@ -32,8 +32,8 @@ Session.vim tags *.exe -cobra cobra.test +bin .idea/ *.iml diff --git a/vendor/github.com/spf13/cobra/.travis.yml b/vendor/github.com/spf13/cobra/.travis.yml index fca1e694..a9bd4e54 100644 --- a/vendor/github.com/spf13/cobra/.travis.yml +++ b/vendor/github.com/spf13/cobra/.travis.yml @@ -3,26 +3,27 @@ language: go stages: - diff - test + - build go: - - 1.10.x - - 1.11.x - 1.12.x + - 1.13.x - tip +before_install: + - go get -u github.com/kyoh86/richgo + - go get -u github.com/mitchellh/gox + matrix: allow_failures: - go: tip include: - stage: diff - go: 1.12.x - script: diff -u <(echo -n) <(gofmt -d -s .) - -before_install: go get -u github.com/kyoh86/richgo + go: 1.13.x + script: make fmt + - stage: build + go: 1.13.x + script: make cobra_generator -script: - - richgo test -v ./... - - go build - - if [ -z $NOVET ]; then - diff -u <(echo -n) <(go vet . 2>&1 | grep -vE 'ExampleCommand|bash_completions.*Fprint'); - fi +script: + - make test diff --git a/vendor/github.com/spf13/cobra/CHANGELOG.md b/vendor/github.com/spf13/cobra/CHANGELOG.md new file mode 100644 index 00000000..742d6d6e --- /dev/null +++ b/vendor/github.com/spf13/cobra/CHANGELOG.md @@ -0,0 +1,22 @@ +# Cobra Changelog + +## Pending +* Fix man page doc generation - no auto generated tag when `cmd.DisableAutoGenTag = true` @jpmcb + +## v1.0.0 +Announcing v1.0.0 of Cobra. 🎉 +**Notable Changes** +* Fish completion (including support for Go custom completion) @marckhouzam +* API (urgent): Rename BashCompDirectives to ShellCompDirectives @marckhouzam +* Remove/replace SetOutput on Command - deprecated @jpmcb +* add support for autolabel stale PR @xchapter7x +* Add Labeler Actions @xchapter7x +* Custom completions coded in Go (instead of Bash) @marckhouzam +* Partial Revert of #922 @jharshman +* Add Makefile to project @jharshman +* Correct documentation for InOrStdin @desponda +* Apply formatting to templates @jharshman +* Revert change so help is printed on stdout again @marckhouzam +* Update md2man to v2.0.0 @pdf +* update viper to v1.4.0 @umarcor +* Update cmd/root.go example in README.md @jharshman diff --git a/vendor/github.com/spf13/cobra/CONTRIBUTING.md b/vendor/github.com/spf13/cobra/CONTRIBUTING.md new file mode 100644 index 00000000..6f356e6a --- /dev/null +++ b/vendor/github.com/spf13/cobra/CONTRIBUTING.md @@ -0,0 +1,50 @@ +# Contributing to Cobra + +Thank you so much for contributing to Cobra. We appreciate your time and help. +Here are some guidelines to help you get started. + +## Code of Conduct + +Be kind and respectful to the members of the community. Take time to educate +others who are seeking help. Harassment of any kind will not be tolerated. + +## Questions + +If you have questions regarding Cobra, feel free to ask it in the community +[#cobra Slack channel][cobra-slack] + +## Filing a bug or feature + +1. Before filing an issue, please check the existing issues to see if a + similar one was already opened. If there is one already opened, feel free + to comment on it. +1. If you believe you've found a bug, please provide detailed steps of + reproduction, the version of Cobra and anything else you believe will be + useful to help troubleshoot it (e.g. OS environment, environment variables, + etc...). Also state the current behavior vs. the expected behavior. +1. If you'd like to see a feature or an enhancement please open an issue with + a clear title and description of what the feature is and why it would be + beneficial to the project and its users. + +## Submitting changes + +1. CLA: Upon submitting a Pull Request (PR), contributors will be prompted to + sign a CLA. Please sign the CLA :slightly_smiling_face: +1. Tests: If you are submitting code, please ensure you have adequate tests + for the feature. Tests can be run via `go test ./...` or `make test`. +1. Since this is golang project, ensure the new code is properly formatted to + ensure code consistency. Run `make all`. + +### Quick steps to contribute + +1. Fork the project. +1. Download your fork to your PC (`git clone https://github.com/your_username/cobra && cd cobra`) +1. Create your feature branch (`git checkout -b my-new-feature`) +1. Make changes and run tests (`make test`) +1. Add them to staging (`git add .`) +1. Commit your changes (`git commit -m 'Add some feature'`) +1. Push to the branch (`git push origin my-new-feature`) +1. Create new pull request + + +[cobra-slack]: https://gophers.slack.com/archives/CD3LP1199 diff --git a/vendor/github.com/spf13/cobra/Makefile b/vendor/github.com/spf13/cobra/Makefile new file mode 100644 index 00000000..e9740d1e --- /dev/null +++ b/vendor/github.com/spf13/cobra/Makefile @@ -0,0 +1,36 @@ +BIN="./bin" +SRC=$(shell find . -name "*.go") + +ifeq (, $(shell which richgo)) +$(warning "could not find richgo in $(PATH), run: go get github.com/kyoh86/richgo") +endif + +.PHONY: fmt vet test cobra_generator install_deps clean + +default: all + +all: fmt vet test cobra_generator + +fmt: + $(info ******************** checking formatting ********************) + @test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1) + +test: install_deps vet + $(info ******************** running tests ********************) + richgo test -v ./... + +cobra_generator: install_deps + $(info ******************** building generator ********************) + mkdir -p $(BIN) + make -C cobra all + +install_deps: + $(info ******************** downloading dependencies ********************) + go get -v ./... + +vet: + $(info ******************** vetting ********************) + go vet ./... + +clean: + rm -rf $(BIN) diff --git a/vendor/github.com/spf13/cobra/README.md b/vendor/github.com/spf13/cobra/README.md index 2f8175bc..3cf1b25d 100644 --- a/vendor/github.com/spf13/cobra/README.md +++ b/vendor/github.com/spf13/cobra/README.md @@ -2,35 +2,14 @@ Cobra is both a library for creating powerful modern CLI applications as well as a program to generate applications and command files. -Many of the most widely used Go projects are built using Cobra, such as: -[Kubernetes](http://kubernetes.io/), -[Hugo](http://gohugo.io), -[rkt](https://github.com/coreos/rkt), -[etcd](https://github.com/coreos/etcd), -[Moby (former Docker)](https://github.com/moby/moby), -[Docker (distribution)](https://github.com/docker/distribution), -[OpenShift](https://www.openshift.com/), -[Delve](https://github.com/derekparker/delve), -[GopherJS](http://www.gopherjs.org/), -[CockroachDB](http://www.cockroachlabs.com/), -[Bleve](http://www.blevesearch.com/), -[ProjectAtomic (enterprise)](http://www.projectatomic.io/), -[Giant Swarm's gsctl](https://github.com/giantswarm/gsctl), -[Nanobox](https://github.com/nanobox-io/nanobox)/[Nanopack](https://github.com/nanopack), -[rclone](http://rclone.org/), -[nehm](https://github.com/bogem/nehm), -[Pouch](https://github.com/alibaba/pouch), -[Istio](https://istio.io), -[Prototool](https://github.com/uber/prototool), -[mattermost-server](https://github.com/mattermost/mattermost-server), -[Gardener](https://github.com/gardener/gardenctl), -[Linkerd](https://linkerd.io/), -etc. +Cobra is used in many Go projects such as [Kubernetes](http://kubernetes.io/), +[Hugo](https://gohugo.io), and [Github CLI](https://github.com/cli/cli) to +name a few. [This list](./projects_using_cobra.md) contains a more extensive list of projects using Cobra. [![Build Status](https://travis-ci.org/spf13/cobra.svg "Travis CI status")](https://travis-ci.org/spf13/cobra) -[![CircleCI status](https://circleci.com/gh/spf13/cobra.png?circle-token=:circle-token "CircleCI status")](https://circleci.com/gh/spf13/cobra) [![GoDoc](https://godoc.org/github.com/spf13/cobra?status.svg)](https://godoc.org/github.com/spf13/cobra) [![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cobra)](https://goreportcard.com/report/github.com/spf13/cobra) +[![Slack](https://img.shields.io/badge/Slack-cobra-brightgreen)](https://gophers.slack.com/archives/CD3LP1199) # Table of Contents @@ -50,9 +29,8 @@ etc. * [PreRun and PostRun Hooks](#prerun-and-postrun-hooks) * [Suggestions when "unknown command" happens](#suggestions-when-unknown-command-happens) * [Generating documentation for your command](#generating-documentation-for-your-command) - * [Generating bash completions](#generating-bash-completions) - * [Generating zsh completions](#generating-zsh-completions) -- [Contributing](#contributing) + * [Generating shell completions](#generating-shell-completions) +- [Contributing](CONTRIBUTING.md) - [License](#license) # Overview @@ -72,7 +50,7 @@ Cobra provides: * Intelligent suggestions (`app srver`... did you mean `app server`?) * Automatic help generation for commands and flags * Automatic help flag recognition of `-h`, `--help`, etc. -* Automatically generated bash autocomplete for your application +* Automatically generated shell autocomplete for your application (bash, zsh, fish, powershell) * Automatically generated man pages for your application * Command aliases so you can change things without breaking them * The flexibility to define your own help, usage, etc. @@ -130,7 +108,7 @@ Using Cobra is easy. First, use `go get` to install the latest version of the library. This command will install the `cobra` generator executable along with the library and its dependencies: - go get -u github.com/spf13/cobra/cobra + go get -u github.com/spf13/cobra Next, include Cobra in your application: @@ -199,7 +177,7 @@ var rootCmd = &cobra.Command{ func Execute() { if err := rootCmd.Execute(); err != nil { - fmt.Println(err) + fmt.Fprintln(os.Stderr, err) os.Exit(1) } } @@ -335,6 +313,37 @@ var versionCmd = &cobra.Command{ } ``` +### Returning and handling errors + +If you wish to return an error to the caller of a command, `RunE` can be used. + +```go +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +func init() { + rootCmd.AddCommand(tryCmd) +} + +var tryCmd = &cobra.Command{ + Use: "try", + Short: "Try and possibly fail at something", + RunE: func(cmd *cobra.Command, args []string) error { + if err := someFunc(); err != nil { + return err + } + return nil + }, +} +``` + +The error can then be caught at the execute function call. + ## Working with Flags Flags provide modifiers to control how the action command operates. @@ -410,6 +419,12 @@ rootCmd.Flags().StringVarP(&Region, "region", "r", "", "AWS region (required)") rootCmd.MarkFlagRequired("region") ``` +Or, for persistent flags: +```go +rootCmd.PersistentFlags().StringVarP(&Region, "region", "r", "", "AWS region (required)") +rootCmd.MarkPersistentFlagRequired("region") +``` + ## Positional and Custom Arguments Validation of positional arguments can be specified using the `Args` field @@ -740,30 +755,11 @@ Run 'kubectl help' for usage. ## Generating documentation for your command -Cobra can generate documentation based on subcommands, flags, etc. in the following formats: - -- [Markdown](doc/md_docs.md) -- [ReStructured Text](doc/rest_docs.md) -- [Man Page](doc/man_docs.md) - -## Generating bash completions - -Cobra can generate a bash-completion file. If you add more information to your command, these completions can be amazingly powerful and flexible. Read more about it in [Bash Completions](bash_completions.md). - -## Generating zsh completions - -Cobra can generate zsh-completion file. Read more about it in -[Zsh Completions](zsh_completions.md). +Cobra can generate documentation based on subcommands, flags, etc. Read more about it in the [docs generation documentation](doc/README.md). -# Contributing +## Generating shell completions -1. Fork it -2. Download your fork to your PC (`git clone https://github.com/your_username/cobra && cd cobra`) -3. Create your feature branch (`git checkout -b my-new-feature`) -4. Make changes and add them (`git add .`) -5. Commit your changes (`git commit -m 'Add some feature'`) -6. Push to the branch (`git push origin my-new-feature`) -7. Create new pull request +Cobra can generate a shell-completion file for the following shells: Bash, Zsh, Fish, Powershell. If you add more information to your commands, these completions can be amazingly powerful and flexible. Read more about it in [Shell Completions](shell_completions.md). # License diff --git a/vendor/github.com/spf13/cobra/args.go b/vendor/github.com/spf13/cobra/args.go index c4d820b8..70e9b262 100644 --- a/vendor/github.com/spf13/cobra/args.go +++ b/vendor/github.com/spf13/cobra/args.go @@ -2,6 +2,7 @@ package cobra import ( "fmt" + "strings" ) type PositionalArgs func(cmd *Command, args []string) error @@ -34,8 +35,15 @@ func NoArgs(cmd *Command, args []string) error { // OnlyValidArgs returns an error if any args are not in the list of ValidArgs. func OnlyValidArgs(cmd *Command, args []string) error { if len(cmd.ValidArgs) > 0 { + // Remove any description that may be included in ValidArgs. + // A description is following a tab character. + var validArgs []string + for _, v := range cmd.ValidArgs { + validArgs = append(validArgs, strings.Split(v, "\t")[0]) + } + for _, v := range args { - if !stringInSlice(v, cmd.ValidArgs) { + if !stringInSlice(v, validArgs) { return fmt.Errorf("invalid argument %q for %q%s", v, cmd.CommandPath(), cmd.findSuggestions(args[0])) } } diff --git a/vendor/github.com/spf13/cobra/bash_completions.go b/vendor/github.com/spf13/cobra/bash_completions.go index 1e0e25cf..846636d7 100644 --- a/vendor/github.com/spf13/cobra/bash_completions.go +++ b/vendor/github.com/spf13/cobra/bash_completions.go @@ -58,6 +58,99 @@ __%[1]s_contains_word() return 1 } +__%[1]s_handle_go_custom_completion() +{ + __%[1]s_debug "${FUNCNAME[0]}: cur is ${cur}, words[*] is ${words[*]}, #words[@] is ${#words[@]}" + + local shellCompDirectiveError=%[3]d + local shellCompDirectiveNoSpace=%[4]d + local shellCompDirectiveNoFileComp=%[5]d + local shellCompDirectiveFilterFileExt=%[6]d + local shellCompDirectiveFilterDirs=%[7]d + + local out requestComp lastParam lastChar comp directive args + + # Prepare the command to request completions for the program. + # Calling ${words[0]} instead of directly %[1]s allows to handle aliases + args=("${words[@]:1}") + requestComp="${words[0]} %[2]s ${args[*]}" + + lastParam=${words[$((${#words[@]}-1))]} + lastChar=${lastParam:$((${#lastParam}-1)):1} + __%[1]s_debug "${FUNCNAME[0]}: lastParam ${lastParam}, lastChar ${lastChar}" + + if [ -z "${cur}" ] && [ "${lastChar}" != "=" ]; then + # If the last parameter is complete (there is a space following it) + # We add an extra empty parameter so we can indicate this to the go method. + __%[1]s_debug "${FUNCNAME[0]}: Adding extra empty parameter" + requestComp="${requestComp} \"\"" + fi + + __%[1]s_debug "${FUNCNAME[0]}: calling ${requestComp}" + # Use eval to handle any environment variables and such + out=$(eval "${requestComp}" 2>/dev/null) + + # Extract the directive integer at the very end of the output following a colon (:) + directive=${out##*:} + # Remove the directive + out=${out%%:*} + if [ "${directive}" = "${out}" ]; then + # There is not directive specified + directive=0 + fi + __%[1]s_debug "${FUNCNAME[0]}: the completion directive is: ${directive}" + __%[1]s_debug "${FUNCNAME[0]}: the completions are: ${out[*]}" + + if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then + # Error code. No completion. + __%[1]s_debug "${FUNCNAME[0]}: received error from custom completion go code" + return + else + if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then + if [[ $(type -t compopt) = "builtin" ]]; then + __%[1]s_debug "${FUNCNAME[0]}: activating no space" + compopt -o nospace + fi + fi + if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then + if [[ $(type -t compopt) = "builtin" ]]; then + __%[1]s_debug "${FUNCNAME[0]}: activating no file completion" + compopt +o default + fi + fi + fi + + if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then + # File extension filtering + local fullFilter filter filteringCmd + # Do not use quotes around the $out variable or else newline + # characters will be kept. + for filter in ${out[*]}; do + fullFilter+="$filter|" + done + + filteringCmd="_filedir $fullFilter" + __%[1]s_debug "File filtering command: $filteringCmd" + $filteringCmd + elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then + # File completion for directories only + local subDir + # Use printf to strip any trailing newline + subdir=$(printf "%%s" "${out[0]}") + if [ -n "$subdir" ]; then + __%[1]s_debug "Listing directories in $subdir" + __%[1]s_handle_subdirs_in_dir_flag "$subdir" + else + __%[1]s_debug "Listing directories in ." + _filedir -d + fi + else + while IFS='' read -r comp; do + COMPREPLY+=("$comp") + done < <(compgen -W "${out[*]}" -- "$cur") + fi +} + __%[1]s_handle_reply() { __%[1]s_debug "${FUNCNAME[0]}" @@ -120,7 +213,10 @@ __%[1]s_handle_reply() local completions completions=("${commands[@]}") if [[ ${#must_have_one_noun[@]} -ne 0 ]]; then - completions=("${must_have_one_noun[@]}") + completions+=("${must_have_one_noun[@]}") + elif [[ -n "${has_completion_function}" ]]; then + # if a go completion function is provided, defer to that function + __%[1]s_handle_go_custom_completion fi if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then completions+=("${must_have_one_flag[@]}") @@ -279,7 +375,9 @@ __%[1]s_handle_word() __%[1]s_handle_word } -`, name)) +`, name, ShellCompNoDescRequestCmd, + ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp, + ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs)) } func writePostscript(buf *bytes.Buffer, name string) { @@ -304,6 +402,7 @@ func writePostscript(buf *bytes.Buffer, name string) { local commands=("%[1]s") local must_have_one_flag=() local must_have_one_noun=() + local has_completion_function local last_command local nouns=() @@ -324,7 +423,7 @@ fi func writeCommands(buf *bytes.Buffer, cmd *Command) { buf.WriteString(" commands=()\n") for _, c := range cmd.Commands() { - if !c.IsAvailableCommand() || c == cmd.helpCommand { + if !c.IsAvailableCommand() && c != cmd.helpCommand { continue } buf.WriteString(fmt.Sprintf(" commands+=(%q)\n", c.Name())) @@ -396,15 +495,32 @@ func writeFlag(buf *bytes.Buffer, flag *pflag.Flag, cmd *Command) { func writeLocalNonPersistentFlag(buf *bytes.Buffer, flag *pflag.Flag) { name := flag.Name - format := " local_nonpersistent_flags+=(\"--%s" + format := " local_nonpersistent_flags+=(\"--%[1]s\")\n" if len(flag.NoOptDefVal) == 0 { - format += "=" + format += " local_nonpersistent_flags+=(\"--%[1]s=\")\n" } - format += "\")\n" buf.WriteString(fmt.Sprintf(format, name)) + if len(flag.Shorthand) > 0 { + buf.WriteString(fmt.Sprintf(" local_nonpersistent_flags+=(\"-%s\")\n", flag.Shorthand)) + } +} + +// Setup annotations for go completions for registered flags +func prepareCustomAnnotationsForFlags(cmd *Command) { + for flag := range flagCompletionFunctions { + // Make sure the completion script calls the __*_go_custom_completion function for + // every registered flag. We need to do this here (and not when the flag was registered + // for completion) so that we can know the root command name for the prefix + // of ___go_custom_completion + if flag.Annotations == nil { + flag.Annotations = map[string][]string{} + } + flag.Annotations[BashCompCustom] = []string{fmt.Sprintf("__%[1]s_handle_go_custom_completion", cmd.Root().Name())} + } } func writeFlags(buf *bytes.Buffer, cmd *Command) { + prepareCustomAnnotationsForFlags(cmd) buf.WriteString(` flags=() two_word_flags=() local_nonpersistent_flags=() @@ -421,7 +537,9 @@ func writeFlags(buf *bytes.Buffer, cmd *Command) { if len(flag.Shorthand) > 0 { writeShortFlag(buf, flag, cmd) } - if localNonPersistentFlags.Lookup(flag.Name) != nil { + // localNonPersistentFlags are used to stop the completion of subcommands when one is set + // if TraverseChildren is true we should allow to complete subcommands + if localNonPersistentFlags.Lookup(flag.Name) != nil && !cmd.Root().TraverseChildren { writeLocalNonPersistentFlag(buf, flag) } }) @@ -467,8 +585,14 @@ func writeRequiredNouns(buf *bytes.Buffer, cmd *Command) { buf.WriteString(" must_have_one_noun=()\n") sort.Sort(sort.StringSlice(cmd.ValidArgs)) for _, value := range cmd.ValidArgs { + // Remove any description that may be included following a tab character. + // Descriptions are not supported by bash completion. + value = strings.Split(value, "\t")[0] buf.WriteString(fmt.Sprintf(" must_have_one_noun+=(%q)\n", value)) } + if cmd.ValidArgsFunction != nil { + buf.WriteString(" has_completion_function=1\n") + } } func writeCmdAliases(buf *bytes.Buffer, cmd *Command) { @@ -496,7 +620,7 @@ func writeArgAliases(buf *bytes.Buffer, cmd *Command) { func gen(buf *bytes.Buffer, cmd *Command) { for _, c := range cmd.Commands() { - if !c.IsAvailableCommand() || c == cmd.helpCommand { + if !c.IsAvailableCommand() && c != cmd.helpCommand { continue } gen(buf, c) diff --git a/vendor/github.com/spf13/cobra/bash_completions.md b/vendor/github.com/spf13/cobra/bash_completions.md index 4ac61ee1..a82d5bb8 100644 --- a/vendor/github.com/spf13/cobra/bash_completions.md +++ b/vendor/github.com/spf13/cobra/bash_completions.md @@ -1,64 +1,14 @@ -# Generating Bash Completions For Your Own cobra.Command +# Generating Bash Completions For Your cobra.Command -If you are using the generator you can create a completion command by running +Please refer to [Shell Completions](shell_completions.md) for details. -```bash -cobra add completion -``` - -Update the help text show how to install the bash_completion Linux show here [Kubectl docs show mac options](https://kubernetes.io/docs/tasks/tools/install-kubectl/#enabling-shell-autocompletion) - -Writing the shell script to stdout allows the most flexible use. - -```go -// completionCmd represents the completion command -var completionCmd = &cobra.Command{ - Use: "completion", - Short: "Generates bash completion scripts", - Long: `To load completion run - -. <(bitbucket completion) - -To configure your bash shell to load completions for each session add to your bashrc - -# ~/.bashrc or ~/.profile -. <(bitbucket completion) -`, - Run: func(cmd *cobra.Command, args []string) { - rootCmd.GenBashCompletion(os.Stdout); - }, -} -``` - -**Note:** The cobra generator may include messages printed to stdout for example if the config file is loaded, this will break the auto complete script - - -## Example from kubectl - -Generating bash completions from a cobra command is incredibly easy. An actual program which does so for the kubernetes kubectl binary is as follows: +## Bash legacy dynamic completions -```go -package main - -import ( - "io/ioutil" - "os" - - "k8s.io/kubernetes/pkg/kubectl/cmd" - "k8s.io/kubernetes/pkg/kubectl/cmd/util" -) +For backwards-compatibility, Cobra still supports its legacy dynamic completion solution (described below). Unlike the `ValidArgsFunction` solution, the legacy solution will only work for Bash shell-completion and not for other shells. This legacy solution can be used along-side `ValidArgsFunction` and `RegisterFlagCompletionFunc()`, as long as both solutions are not used for the same command. This provides a path to gradually migrate from the legacy solution to the new solution. -func main() { - kubectl := cmd.NewKubectlCommand(util.NewFactory(nil), os.Stdin, ioutil.Discard, ioutil.Discard) - kubectl.GenBashCompletionFile("out.sh") -} -``` +The legacy solution allows you to inject bash functions into the bash completion script. Those bash functions are responsible for providing the completion choices for your own completions. -`out.sh` will get you completions of subcommands and flags. Copy it to `/etc/bash_completion.d/` as described [here](https://debian-administration.org/article/316/An_introduction_to_bash_completion_part_1) and reset your terminal to use autocompletion. If you make additional annotations to your code, you can get even more intelligent and flexible behavior. - -## Creating your own custom functions - -Some more actual code that works in kubernetes: +Some code that works in kubernetes: ```bash const ( @@ -111,108 +61,7 @@ Find more information at https://github.com/GoogleCloudPlatform/kubernetes.`, The `BashCompletionFunction` option is really only valid/useful on the root command. Doing the above will cause `__kubectl_custom_func()` (`___custom_func()`) to be called when the built in processor was unable to find a solution. In the case of kubernetes a valid command might look something like `kubectl get pod [mypod]`. If you type `kubectl get pod [tab][tab]` the `__kubectl_customc_func()` will run because the cobra.Command only understood "kubectl" and "get." `__kubectl_custom_func()` will see that the cobra.Command is "kubectl_get" and will thus call another helper `__kubectl_get_resource()`. `__kubectl_get_resource` will look at the 'nouns' collected. In our example the only noun will be `pod`. So it will call `__kubectl_parse_get pod`. `__kubectl_parse_get` will actually call out to kubernetes and get any pods. It will then set `COMPREPLY` to valid pods! -## Have the completions code complete your 'nouns' - -In the above example "pod" was assumed to already be typed. But if you want `kubectl get [tab][tab]` to show a list of valid "nouns" you have to set them. Simplified code from `kubectl get` looks like: - -```go -validArgs []string = { "pod", "node", "service", "replicationcontroller" } - -cmd := &cobra.Command{ - Use: "get [(-o|--output=)json|yaml|template|...] (RESOURCE [NAME] | RESOURCE/NAME ...)", - Short: "Display one or many resources", - Long: get_long, - Example: get_example, - Run: func(cmd *cobra.Command, args []string) { - err := RunGet(f, out, cmd, args) - util.CheckErr(err) - }, - ValidArgs: validArgs, -} -``` - -Notice we put the "ValidArgs" on the "get" subcommand. Doing so will give results like - -```bash -# kubectl get [tab][tab] -node pod replicationcontroller service -``` - -## Plural form and shortcuts for nouns - -If your nouns have a number of aliases, you can define them alongside `ValidArgs` using `ArgAliases`: - -```go -argAliases []string = { "pods", "nodes", "services", "svc", "replicationcontrollers", "rc" } - -cmd := &cobra.Command{ - ... - ValidArgs: validArgs, - ArgAliases: argAliases -} -``` - -The aliases are not shown to the user on tab completion, but they are accepted as valid nouns by -the completion algorithm if entered manually, e.g. in: - -```bash -# kubectl get rc [tab][tab] -backend frontend database -``` - -Note that without declaring `rc` as an alias, the completion algorithm would show the list of nouns -in this example again instead of the replication controllers. - -## Mark flags as required - -Most of the time completions will only show subcommands. But if a flag is required to make a subcommand work, you probably want it to show up when the user types [tab][tab]. Marking a flag as 'Required' is incredibly easy. - -```go -cmd.MarkFlagRequired("pod") -cmd.MarkFlagRequired("container") -``` - -and you'll get something like - -```bash -# kubectl exec [tab][tab][tab] --c --container= -p --pod= -``` - -# Specify valid filename extensions for flags that take a filename - -In this example we use --filename= and expect to get a json or yaml file as the argument. To make this easier we annotate the --filename flag with valid filename extensions. - -```go - annotations := []string{"json", "yaml", "yml"} - annotation := make(map[string][]string) - annotation[cobra.BashCompFilenameExt] = annotations - - flag := &pflag.Flag{ - Name: "filename", - Shorthand: "f", - Usage: usage, - Value: value, - DefValue: value.String(), - Annotations: annotation, - } - cmd.Flags().AddFlag(flag) -``` - -Now when you run a command with this filename flag you'll get something like - -```bash -# kubectl create -f -test/ example/ rpmbuild/ -hello.yml test.json -``` - -So while there are many other files in the CWD it only shows me subdirs and those with valid extensions. - -# Specify custom flag completion - -Similar to the filename completion and filtering using cobra.BashCompFilenameExt, you can specify -a custom flag completion function with cobra.BashCompCustom: +Similarly, for flags: ```go annotation := make(map[string][]string) @@ -226,7 +75,7 @@ a custom flag completion function with cobra.BashCompCustom: cmd.Flags().AddFlag(flag) ``` -In addition add the `__handle_namespace_flag` implementation in the `BashCompletionFunction` +In addition add the `__kubectl_get_namespaces` implementation in the `BashCompletionFunction` value, e.g.: ```bash @@ -240,17 +89,3 @@ __kubectl_get_namespaces() fi } ``` -# Using bash aliases for commands - -You can also configure the `bash aliases` for the commands and they will also support completions. - -```bash -alias aliasname=origcommand -complete -o default -F __start_origcommand aliasname - -# and now when you run `aliasname` completion will make -# suggestions as it did for `origcommand`. - -$) aliasname -completion firstcommand secondcommand -``` diff --git a/vendor/github.com/spf13/cobra/command.go b/vendor/github.com/spf13/cobra/command.go index fb60ebd9..77b399e0 100644 --- a/vendor/github.com/spf13/cobra/command.go +++ b/vendor/github.com/spf13/cobra/command.go @@ -18,7 +18,6 @@ package cobra import ( "bytes" "context" - "errors" "fmt" "io" "os" @@ -29,8 +28,6 @@ import ( flag "github.com/spf13/pflag" ) -var ErrSubCommandRequired = errors.New("subcommand is required") - // FParseErrWhitelist configures Flag parse errors to be ignored type FParseErrWhitelist flag.ParseErrorsWhitelist @@ -40,6 +37,14 @@ type FParseErrWhitelist flag.ParseErrorsWhitelist // definition to ensure usability. type Command struct { // Use is the one-line usage message. + // Recommended syntax is as follow: + // [ ] identifies an optional argument. Arguments that are not enclosed in brackets are required. + // ... indicates that you can specify multiple values for the previous argument. + // | indicates mutually exclusive information. You can use the argument to the left of the separator or the + // argument to the right of the separator. You cannot use both arguments in a single use of the command. + // { } delimits a set of mutually exclusive arguments when one of the arguments is required. If the arguments are + // optional, they are enclosed in brackets ([ ]). + // Example: add [-F file | -D dir]... [-f format] profile Use string // Aliases is an array of aliases that can be used instead of the first word in Use. @@ -60,6 +65,10 @@ type Command struct { // ValidArgs is list of all valid non-flag arguments that are accepted in bash completions ValidArgs []string + // ValidArgsFunction is an optional function that provides valid non-flag arguments for bash completion. + // It is a dynamic version of using ValidArgs. + // Only one of ValidArgs and ValidArgsFunction can be used for a command. + ValidArgsFunction func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective) // Expected arguments Args PositionalArgs @@ -84,7 +93,8 @@ type Command struct { // Version defines the version for this command. If this value is non-empty and the command does not // define a "version" flag, a "version" boolean flag will be added to the command and, if specified, - // will print content of the "Version" variable. + // will print content of the "Version" variable. A shorthand "v" flag will also be added if the + // command does not define one. Version string // The *Run functions are executed in the following order: @@ -309,7 +319,7 @@ func (c *Command) ErrOrStderr() io.Writer { return c.getErr(os.Stderr) } -// InOrStdin returns output to stderr +// InOrStdin returns input to stdin func (c *Command) InOrStdin() io.Reader { return c.getIn(os.Stdin) } @@ -357,7 +367,7 @@ func (c *Command) UsageFunc() (f func(*Command) error) { c.mergePersistentFlags() err := tmpl(c.OutOrStderr(), c.UsageTemplate(), c) if err != nil { - c.Println(err) + c.PrintErrln(err) } return err } @@ -385,7 +395,7 @@ func (c *Command) HelpFunc() func(*Command, []string) { // See https://github.com/spf13/cobra/issues/1002 err := tmpl(c.OutOrStdout(), c.HelpTemplate(), c) if err != nil { - c.Println(err) + c.PrintErrln(err) } } } @@ -800,7 +810,7 @@ func (c *Command) execute(a []string) (err error) { } if !c.Runnable() { - return ErrSubCommandRequired + return flag.ErrHelp } c.preRun() @@ -913,6 +923,9 @@ func (c *Command) ExecuteC() (cmd *Command, err error) { args = os.Args[1:] } + // initialize the hidden command to be used for bash completion + c.initCompleteCmd(args) + var flags []string if c.TraverseChildren { cmd, flags, err = c.Traverse(args) @@ -925,8 +938,8 @@ func (c *Command) ExecuteC() (cmd *Command, err error) { c = cmd } if !c.SilenceErrors { - c.Println("Error:", err.Error()) - c.Printf("Run '%v --help' for usage.\n", c.CommandPath()) + c.PrintErrln("Error:", err.Error()) + c.PrintErrf("Run '%v --help' for usage.\n", c.CommandPath()) } return c, err } @@ -951,18 +964,10 @@ func (c *Command) ExecuteC() (cmd *Command, err error) { return cmd, nil } - // If command wasn't runnable, show full help, but do return the error. - // This will result in apps by default returning a non-success exit code, but also gives them the option to - // handle specially. - if err == ErrSubCommandRequired { - cmd.HelpFunc()(cmd, args) - return cmd, err - } - // If root command has SilentErrors flagged, // all subcommands should respect it if !cmd.SilenceErrors && !c.SilenceErrors { - c.Println("Error:", err.Error()) + c.PrintErrln("Error:", err.Error()) } // If root command has SilentUsage flagged, @@ -982,6 +987,10 @@ func (c *Command) ValidateArgs(args []string) error { } func (c *Command) validateRequiredFlags() error { + if c.DisableFlagParsing { + return nil + } + flags := c.Flags() missingFlagNames := []string{} flags.VisitAll(func(pflag *flag.Flag) { @@ -1033,7 +1042,11 @@ func (c *Command) InitDefaultVersionFlag() { } else { usage += c.Name() } - c.Flags().Bool("version", false, usage) + if c.Flags().ShorthandLookup("v") == nil { + c.Flags().BoolP("version", "v", false, usage) + } else { + c.Flags().Bool("version", false, usage) + } } } @@ -1051,7 +1064,25 @@ func (c *Command) InitDefaultHelpCmd() { Short: "Help about any command", Long: `Help provides help for any command in the application. Simply type ` + c.Name() + ` help [path to command] for full details.`, - + ValidArgsFunction: func(c *Command, args []string, toComplete string) ([]string, ShellCompDirective) { + var completions []string + cmd, _, e := c.Root().Find(args) + if e != nil { + return nil, ShellCompDirectiveNoFileComp + } + if cmd == nil { + // Root help command. + cmd = c.Root() + } + for _, subCmd := range cmd.Commands() { + if subCmd.IsAvailableCommand() || subCmd == cmd.helpCommand { + if strings.HasPrefix(subCmd.Name(), toComplete) { + completions = append(completions, fmt.Sprintf("%s\t%s", subCmd.Name(), subCmd.Short)) + } + } + } + return completions, ShellCompDirectiveNoFileComp + }, Run: func(c *Command, args []string) { cmd, _, e := c.Root().Find(args) if cmd == nil || e != nil { @@ -1178,12 +1209,12 @@ func (c *Command) PrintErr(i ...interface{}) { // PrintErrln is a convenience method to Println to the defined Err output, fallback to Stderr if not set. func (c *Command) PrintErrln(i ...interface{}) { - c.Print(fmt.Sprintln(i...)) + c.PrintErr(fmt.Sprintln(i...)) } // PrintErrf is a convenience method to Printf to the defined Err output, fallback to Stderr if not set. func (c *Command) PrintErrf(format string, i ...interface{}) { - c.Print(fmt.Sprintf(format, i...)) + c.PrintErr(fmt.Sprintf(format, i...)) } // CommandPath returns the full path to this command. diff --git a/vendor/github.com/spf13/cobra/custom_completions.go b/vendor/github.com/spf13/cobra/custom_completions.go new file mode 100644 index 00000000..f9e88e08 --- /dev/null +++ b/vendor/github.com/spf13/cobra/custom_completions.go @@ -0,0 +1,557 @@ +package cobra + +import ( + "fmt" + "os" + "strings" + + "github.com/spf13/pflag" +) + +const ( + // ShellCompRequestCmd is the name of the hidden command that is used to request + // completion results from the program. It is used by the shell completion scripts. + ShellCompRequestCmd = "__complete" + // ShellCompNoDescRequestCmd is the name of the hidden command that is used to request + // completion results without their description. It is used by the shell completion scripts. + ShellCompNoDescRequestCmd = "__completeNoDesc" +) + +// Global map of flag completion functions. +var flagCompletionFunctions = map[*pflag.Flag]func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective){} + +// ShellCompDirective is a bit map representing the different behaviors the shell +// can be instructed to have once completions have been provided. +type ShellCompDirective int + +const ( + // ShellCompDirectiveError indicates an error occurred and completions should be ignored. + ShellCompDirectiveError ShellCompDirective = 1 << iota + + // ShellCompDirectiveNoSpace indicates that the shell should not add a space + // after the completion even if there is a single completion provided. + ShellCompDirectiveNoSpace + + // ShellCompDirectiveNoFileComp indicates that the shell should not provide + // file completion even when no completion is provided. + // This currently does not work for zsh or bash < 4 + ShellCompDirectiveNoFileComp + + // ShellCompDirectiveFilterFileExt indicates that the provided completions + // should be used as file extension filters. + // For flags, using Command.MarkFlagFilename() and Command.MarkPersistentFlagFilename() + // is a shortcut to using this directive explicitly. The BashCompFilenameExt + // annotation can also be used to obtain the same behavior for flags. + ShellCompDirectiveFilterFileExt + + // ShellCompDirectiveFilterDirs indicates that only directory names should + // be provided in file completion. To request directory names within another + // directory, the returned completions should specify the directory within + // which to search. The BashCompSubdirsInDir annotation can be used to + // obtain the same behavior but only for flags. + ShellCompDirectiveFilterDirs + + // =========================================================================== + + // All directives using iota should be above this one. + // For internal use. + shellCompDirectiveMaxValue + + // ShellCompDirectiveDefault indicates to let the shell perform its default + // behavior after completions have been provided. + // This one must be last to avoid messing up the iota count. + ShellCompDirectiveDefault ShellCompDirective = 0 +) + +// RegisterFlagCompletionFunc should be called to register a function to provide completion for a flag. +func (c *Command) RegisterFlagCompletionFunc(flagName string, f func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective)) error { + flag := c.Flag(flagName) + if flag == nil { + return fmt.Errorf("RegisterFlagCompletionFunc: flag '%s' does not exist", flagName) + } + if _, exists := flagCompletionFunctions[flag]; exists { + return fmt.Errorf("RegisterFlagCompletionFunc: flag '%s' already registered", flagName) + } + flagCompletionFunctions[flag] = f + return nil +} + +// Returns a string listing the different directive enabled in the specified parameter +func (d ShellCompDirective) string() string { + var directives []string + if d&ShellCompDirectiveError != 0 { + directives = append(directives, "ShellCompDirectiveError") + } + if d&ShellCompDirectiveNoSpace != 0 { + directives = append(directives, "ShellCompDirectiveNoSpace") + } + if d&ShellCompDirectiveNoFileComp != 0 { + directives = append(directives, "ShellCompDirectiveNoFileComp") + } + if d&ShellCompDirectiveFilterFileExt != 0 { + directives = append(directives, "ShellCompDirectiveFilterFileExt") + } + if d&ShellCompDirectiveFilterDirs != 0 { + directives = append(directives, "ShellCompDirectiveFilterDirs") + } + if len(directives) == 0 { + directives = append(directives, "ShellCompDirectiveDefault") + } + + if d >= shellCompDirectiveMaxValue { + return fmt.Sprintf("ERROR: unexpected ShellCompDirective value: %d", d) + } + return strings.Join(directives, ", ") +} + +// Adds a special hidden command that can be used to request custom completions. +func (c *Command) initCompleteCmd(args []string) { + completeCmd := &Command{ + Use: fmt.Sprintf("%s [command-line]", ShellCompRequestCmd), + Aliases: []string{ShellCompNoDescRequestCmd}, + DisableFlagsInUseLine: true, + Hidden: true, + DisableFlagParsing: true, + Args: MinimumNArgs(1), + Short: "Request shell completion choices for the specified command-line", + Long: fmt.Sprintf("%[2]s is a special command that is used by the shell completion logic\n%[1]s", + "to request completion choices for the specified command-line.", ShellCompRequestCmd), + Run: func(cmd *Command, args []string) { + finalCmd, completions, directive, err := cmd.getCompletions(args) + if err != nil { + CompErrorln(err.Error()) + // Keep going for multiple reasons: + // 1- There could be some valid completions even though there was an error + // 2- Even without completions, we need to print the directive + } + + noDescriptions := (cmd.CalledAs() == ShellCompNoDescRequestCmd) + for _, comp := range completions { + if noDescriptions { + // Remove any description that may be included following a tab character. + comp = strings.Split(comp, "\t")[0] + } + + // Make sure we only write the first line to the output. + // This is needed if a description contains a linebreak. + // Otherwise the shell scripts will interpret the other lines as new flags + // and could therefore provide a wrong completion. + comp = strings.Split(comp, "\n")[0] + + // Finally trim the completion. This is especially important to get rid + // of a trailing tab when there are no description following it. + // For example, a sub-command without a description should not be completed + // with a tab at the end (or else zsh will show a -- following it + // although there is no description). + comp = strings.TrimSpace(comp) + + // Print each possible completion to stdout for the completion script to consume. + fmt.Fprintln(finalCmd.OutOrStdout(), comp) + } + + if directive >= shellCompDirectiveMaxValue { + directive = ShellCompDirectiveDefault + } + + // As the last printout, print the completion directive for the completion script to parse. + // The directive integer must be that last character following a single colon (:). + // The completion script expects : + fmt.Fprintf(finalCmd.OutOrStdout(), ":%d\n", directive) + + // Print some helpful info to stderr for the user to understand. + // Output from stderr must be ignored by the completion script. + fmt.Fprintf(finalCmd.ErrOrStderr(), "Completion ended with directive: %s\n", directive.string()) + }, + } + c.AddCommand(completeCmd) + subCmd, _, err := c.Find(args) + if err != nil || subCmd.Name() != ShellCompRequestCmd { + // Only create this special command if it is actually being called. + // This reduces possible side-effects of creating such a command; + // for example, having this command would cause problems to a + // cobra program that only consists of the root command, since this + // command would cause the root command to suddenly have a subcommand. + c.RemoveCommand(completeCmd) + } +} + +func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDirective, error) { + // The last argument, which is not completely typed by the user, + // should not be part of the list of arguments + toComplete := args[len(args)-1] + trimmedArgs := args[:len(args)-1] + + var finalCmd *Command + var finalArgs []string + var err error + // Find the real command for which completion must be performed + // check if we need to traverse here to parse local flags on parent commands + if c.Root().TraverseChildren { + finalCmd, finalArgs, err = c.Root().Traverse(trimmedArgs) + } else { + finalCmd, finalArgs, err = c.Root().Find(trimmedArgs) + } + if err != nil { + // Unable to find the real command. E.g., someInvalidCmd + return c, []string{}, ShellCompDirectiveDefault, fmt.Errorf("Unable to find a command for arguments: %v", trimmedArgs) + } + + // Check if we are doing flag value completion before parsing the flags. + // This is important because if we are completing a flag value, we need to also + // remove the flag name argument from the list of finalArgs or else the parsing + // could fail due to an invalid value (incomplete) for the flag. + flag, finalArgs, toComplete, err := checkIfFlagCompletion(finalCmd, finalArgs, toComplete) + if err != nil { + // Error while attempting to parse flags + return finalCmd, []string{}, ShellCompDirectiveDefault, err + } + + // Parse the flags early so we can check if required flags are set + if err = finalCmd.ParseFlags(finalArgs); err != nil { + return finalCmd, []string{}, ShellCompDirectiveDefault, fmt.Errorf("Error while parsing flags from args %v: %s", finalArgs, err.Error()) + } + + if flag != nil { + // Check if we are completing a flag value subject to annotations + if validExts, present := flag.Annotations[BashCompFilenameExt]; present { + if len(validExts) != 0 { + // File completion filtered by extensions + return finalCmd, validExts, ShellCompDirectiveFilterFileExt, nil + } + + // The annotation requests simple file completion. There is no reason to do + // that since it is the default behavior anyway. Let's ignore this annotation + // in case the program also registered a completion function for this flag. + // Even though it is a mistake on the program's side, let's be nice when we can. + } + + if subDir, present := flag.Annotations[BashCompSubdirsInDir]; present { + if len(subDir) == 1 { + // Directory completion from within a directory + return finalCmd, subDir, ShellCompDirectiveFilterDirs, nil + } + // Directory completion + return finalCmd, []string{}, ShellCompDirectiveFilterDirs, nil + } + } + + // When doing completion of a flag name, as soon as an argument starts with + // a '-' we know it is a flag. We cannot use isFlagArg() here as it requires + // the flag name to be complete + if flag == nil && len(toComplete) > 0 && toComplete[0] == '-' && !strings.Contains(toComplete, "=") { + var completions []string + + // First check for required flags + completions = completeRequireFlags(finalCmd, toComplete) + + // If we have not found any required flags, only then can we show regular flags + if len(completions) == 0 { + doCompleteFlags := func(flag *pflag.Flag) { + if !flag.Changed || + strings.Contains(flag.Value.Type(), "Slice") || + strings.Contains(flag.Value.Type(), "Array") { + // If the flag is not already present, or if it can be specified multiple times (Array or Slice) + // we suggest it as a completion + completions = append(completions, getFlagNameCompletions(flag, toComplete)...) + } + } + + // We cannot use finalCmd.Flags() because we may not have called ParsedFlags() for commands + // that have set DisableFlagParsing; it is ParseFlags() that merges the inherited and + // non-inherited flags. + finalCmd.InheritedFlags().VisitAll(func(flag *pflag.Flag) { + doCompleteFlags(flag) + }) + finalCmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) { + doCompleteFlags(flag) + }) + } + + directive := ShellCompDirectiveNoFileComp + if len(completions) == 1 && strings.HasSuffix(completions[0], "=") { + // If there is a single completion, the shell usually adds a space + // after the completion. We don't want that if the flag ends with an = + directive = ShellCompDirectiveNoSpace + } + return finalCmd, completions, directive, nil + } + + // We only remove the flags from the arguments if DisableFlagParsing is not set. + // This is important for commands which have requested to do their own flag completion. + if !finalCmd.DisableFlagParsing { + finalArgs = finalCmd.Flags().Args() + } + + var completions []string + directive := ShellCompDirectiveDefault + if flag == nil { + foundLocalNonPersistentFlag := false + // If TraverseChildren is true on the root command we don't check for + // local flags because we can use a local flag on a parent command + if !finalCmd.Root().TraverseChildren { + // Check if there are any local, non-persistent flags on the command-line + localNonPersistentFlags := finalCmd.LocalNonPersistentFlags() + finalCmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) { + if localNonPersistentFlags.Lookup(flag.Name) != nil && flag.Changed { + foundLocalNonPersistentFlag = true + } + }) + } + + // Complete subcommand names, including the help command + if len(finalArgs) == 0 && !foundLocalNonPersistentFlag { + // We only complete sub-commands if: + // - there are no arguments on the command-line and + // - there are no local, non-peristent flag on the command-line or TraverseChildren is true + for _, subCmd := range finalCmd.Commands() { + if subCmd.IsAvailableCommand() || subCmd == finalCmd.helpCommand { + if strings.HasPrefix(subCmd.Name(), toComplete) { + completions = append(completions, fmt.Sprintf("%s\t%s", subCmd.Name(), subCmd.Short)) + } + directive = ShellCompDirectiveNoFileComp + } + } + } + + // Complete required flags even without the '-' prefix + completions = append(completions, completeRequireFlags(finalCmd, toComplete)...) + + // Always complete ValidArgs, even if we are completing a subcommand name. + // This is for commands that have both subcommands and ValidArgs. + if len(finalCmd.ValidArgs) > 0 { + if len(finalArgs) == 0 { + // ValidArgs are only for the first argument + for _, validArg := range finalCmd.ValidArgs { + if strings.HasPrefix(validArg, toComplete) { + completions = append(completions, validArg) + } + } + directive = ShellCompDirectiveNoFileComp + + // If no completions were found within commands or ValidArgs, + // see if there are any ArgAliases that should be completed. + if len(completions) == 0 { + for _, argAlias := range finalCmd.ArgAliases { + if strings.HasPrefix(argAlias, toComplete) { + completions = append(completions, argAlias) + } + } + } + } + + // If there are ValidArgs specified (even if they don't match), we stop completion. + // Only one of ValidArgs or ValidArgsFunction can be used for a single command. + return finalCmd, completions, directive, nil + } + + // Let the logic continue so as to add any ValidArgsFunction completions, + // even if we already found sub-commands. + // This is for commands that have subcommands but also specify a ValidArgsFunction. + } + + // Find the completion function for the flag or command + var completionFn func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective) + if flag != nil { + completionFn = flagCompletionFunctions[flag] + } else { + completionFn = finalCmd.ValidArgsFunction + } + if completionFn != nil { + // Go custom completion defined for this flag or command. + // Call the registered completion function to get the completions. + var comps []string + comps, directive = completionFn(finalCmd, finalArgs, toComplete) + completions = append(completions, comps...) + } + + return finalCmd, completions, directive, nil +} + +func getFlagNameCompletions(flag *pflag.Flag, toComplete string) []string { + if nonCompletableFlag(flag) { + return []string{} + } + + var completions []string + flagName := "--" + flag.Name + if strings.HasPrefix(flagName, toComplete) { + // Flag without the = + completions = append(completions, fmt.Sprintf("%s\t%s", flagName, flag.Usage)) + + // Why suggest both long forms: --flag and --flag= ? + // This forces the user to *always* have to type either an = or a space after the flag name. + // Let's be nice and avoid making users have to do that. + // Since boolean flags and shortname flags don't show the = form, let's go that route and never show it. + // The = form will still work, we just won't suggest it. + // This also makes the list of suggested flags shorter as we avoid all the = forms. + // + // if len(flag.NoOptDefVal) == 0 { + // // Flag requires a value, so it can be suffixed with = + // flagName += "=" + // completions = append(completions, fmt.Sprintf("%s\t%s", flagName, flag.Usage)) + // } + } + + flagName = "-" + flag.Shorthand + if len(flag.Shorthand) > 0 && strings.HasPrefix(flagName, toComplete) { + completions = append(completions, fmt.Sprintf("%s\t%s", flagName, flag.Usage)) + } + + return completions +} + +func completeRequireFlags(finalCmd *Command, toComplete string) []string { + var completions []string + + doCompleteRequiredFlags := func(flag *pflag.Flag) { + if _, present := flag.Annotations[BashCompOneRequiredFlag]; present { + if !flag.Changed { + // If the flag is not already present, we suggest it as a completion + completions = append(completions, getFlagNameCompletions(flag, toComplete)...) + } + } + } + + // We cannot use finalCmd.Flags() because we may not have called ParsedFlags() for commands + // that have set DisableFlagParsing; it is ParseFlags() that merges the inherited and + // non-inherited flags. + finalCmd.InheritedFlags().VisitAll(func(flag *pflag.Flag) { + doCompleteRequiredFlags(flag) + }) + finalCmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) { + doCompleteRequiredFlags(flag) + }) + + return completions +} + +func checkIfFlagCompletion(finalCmd *Command, args []string, lastArg string) (*pflag.Flag, []string, string, error) { + if finalCmd.DisableFlagParsing { + // We only do flag completion if we are allowed to parse flags + // This is important for commands which have requested to do their own flag completion. + return nil, args, lastArg, nil + } + + var flagName string + trimmedArgs := args + flagWithEqual := false + + // When doing completion of a flag name, as soon as an argument starts with + // a '-' we know it is a flag. We cannot use isFlagArg() here as that function + // requires the flag name to be complete + if len(lastArg) > 0 && lastArg[0] == '-' { + if index := strings.Index(lastArg, "="); index >= 0 { + // Flag with an = + flagName = strings.TrimLeft(lastArg[:index], "-") + lastArg = lastArg[index+1:] + flagWithEqual = true + } else { + // Normal flag completion + return nil, args, lastArg, nil + } + } + + if len(flagName) == 0 { + if len(args) > 0 { + prevArg := args[len(args)-1] + if isFlagArg(prevArg) { + // Only consider the case where the flag does not contain an =. + // If the flag contains an = it means it has already been fully processed, + // so we don't need to deal with it here. + if index := strings.Index(prevArg, "="); index < 0 { + flagName = strings.TrimLeft(prevArg, "-") + + // Remove the uncompleted flag or else there could be an error created + // for an invalid value for that flag + trimmedArgs = args[:len(args)-1] + } + } + } + } + + if len(flagName) == 0 { + // Not doing flag completion + return nil, trimmedArgs, lastArg, nil + } + + flag := findFlag(finalCmd, flagName) + if flag == nil { + // Flag not supported by this command, nothing to complete + err := fmt.Errorf("Subcommand '%s' does not support flag '%s'", finalCmd.Name(), flagName) + return nil, nil, "", err + } + + if !flagWithEqual { + if len(flag.NoOptDefVal) != 0 { + // We had assumed dealing with a two-word flag but the flag is a boolean flag. + // In that case, there is no value following it, so we are not really doing flag completion. + // Reset everything to do noun completion. + trimmedArgs = args + flag = nil + } + } + + return flag, trimmedArgs, lastArg, nil +} + +func findFlag(cmd *Command, name string) *pflag.Flag { + flagSet := cmd.Flags() + if len(name) == 1 { + // First convert the short flag into a long flag + // as the cmd.Flag() search only accepts long flags + if short := flagSet.ShorthandLookup(name); short != nil { + name = short.Name + } else { + set := cmd.InheritedFlags() + if short = set.ShorthandLookup(name); short != nil { + name = short.Name + } else { + return nil + } + } + } + return cmd.Flag(name) +} + +// CompDebug prints the specified string to the same file as where the +// completion script prints its logs. +// Note that completion printouts should never be on stdout as they would +// be wrongly interpreted as actual completion choices by the completion script. +func CompDebug(msg string, printToStdErr bool) { + msg = fmt.Sprintf("[Debug] %s", msg) + + // Such logs are only printed when the user has set the environment + // variable BASH_COMP_DEBUG_FILE to the path of some file to be used. + if path := os.Getenv("BASH_COMP_DEBUG_FILE"); path != "" { + f, err := os.OpenFile(path, + os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + if err == nil { + defer f.Close() + f.WriteString(msg) + } + } + + if printToStdErr { + // Must print to stderr for this not to be read by the completion script. + fmt.Fprintf(os.Stderr, msg) + } +} + +// CompDebugln prints the specified string with a newline at the end +// to the same file as where the completion script prints its logs. +// Such logs are only printed when the user has set the environment +// variable BASH_COMP_DEBUG_FILE to the path of some file to be used. +func CompDebugln(msg string, printToStdErr bool) { + CompDebug(fmt.Sprintf("%s\n", msg), printToStdErr) +} + +// CompError prints the specified completion message to stderr. +func CompError(msg string) { + msg = fmt.Sprintf("[Error] %s", msg) + CompDebug(msg, true) +} + +// CompErrorln prints the specified completion message to stderr with a newline at the end. +func CompErrorln(msg string) { + CompError(fmt.Sprintf("%s\n", msg)) +} diff --git a/vendor/github.com/spf13/cobra/fish_completions.go b/vendor/github.com/spf13/cobra/fish_completions.go new file mode 100644 index 00000000..eaae9bca --- /dev/null +++ b/vendor/github.com/spf13/cobra/fish_completions.go @@ -0,0 +1,207 @@ +package cobra + +import ( + "bytes" + "fmt" + "io" + "os" + "strings" +) + +func genFishComp(buf *bytes.Buffer, name string, includeDesc bool) { + // Variables should not contain a '-' or ':' character + nameForVar := name + nameForVar = strings.Replace(nameForVar, "-", "_", -1) + nameForVar = strings.Replace(nameForVar, ":", "_", -1) + + compCmd := ShellCompRequestCmd + if !includeDesc { + compCmd = ShellCompNoDescRequestCmd + } + buf.WriteString(fmt.Sprintf("# fish completion for %-36s -*- shell-script -*-\n", name)) + buf.WriteString(fmt.Sprintf(` +function __%[1]s_debug + set file "$BASH_COMP_DEBUG_FILE" + if test -n "$file" + echo "$argv" >> $file + end +end + +function __%[1]s_perform_completion + __%[1]s_debug "Starting __%[1]s_perform_completion with: $argv" + + set args (string split -- " " "$argv") + set lastArg "$args[-1]" + + __%[1]s_debug "args: $args" + __%[1]s_debug "last arg: $lastArg" + + set emptyArg "" + if test -z "$lastArg" + __%[1]s_debug "Setting emptyArg" + set emptyArg \"\" + end + __%[1]s_debug "emptyArg: $emptyArg" + + if not type -q "$args[1]" + # This can happen when "complete --do-complete %[2]s" is called when running this script. + __%[1]s_debug "Cannot find $args[1]. No completions." + return + end + + set requestComp "$args[1] %[3]s $args[2..-1] $emptyArg" + __%[1]s_debug "Calling $requestComp" + + set results (eval $requestComp 2> /dev/null) + set comps $results[1..-2] + set directiveLine $results[-1] + + # For Fish, when completing a flag with an = (e.g., -n=) + # completions must be prefixed with the flag + set flagPrefix (string match -r -- '-.*=' "$lastArg") + + __%[1]s_debug "Comps: $comps" + __%[1]s_debug "DirectiveLine: $directiveLine" + __%[1]s_debug "flagPrefix: $flagPrefix" + + for comp in $comps + printf "%%s%%s\n" "$flagPrefix" "$comp" + end + + printf "%%s\n" "$directiveLine" +end + +# This function does three things: +# 1- Obtain the completions and store them in the global __%[1]s_comp_results +# 2- Set the __%[1]s_comp_do_file_comp flag if file completion should be performed +# and unset it otherwise +# 3- Return true if the completion results are not empty +function __%[1]s_prepare_completions + # Start fresh + set --erase __%[1]s_comp_do_file_comp + set --erase __%[1]s_comp_results + + # Check if the command-line is already provided. This is useful for testing. + if not set --query __%[1]s_comp_commandLine + # Use the -c flag to allow for completion in the middle of the line + set __%[1]s_comp_commandLine (commandline -c) + end + __%[1]s_debug "commandLine is: $__%[1]s_comp_commandLine" + + set results (__%[1]s_perform_completion "$__%[1]s_comp_commandLine") + set --erase __%[1]s_comp_commandLine + __%[1]s_debug "Completion results: $results" + + if test -z "$results" + __%[1]s_debug "No completion, probably due to a failure" + # Might as well do file completion, in case it helps + set --global __%[1]s_comp_do_file_comp 1 + return 1 + end + + set directive (string sub --start 2 $results[-1]) + set --global __%[1]s_comp_results $results[1..-2] + + __%[1]s_debug "Completions are: $__%[1]s_comp_results" + __%[1]s_debug "Directive is: $directive" + + set shellCompDirectiveError %[4]d + set shellCompDirectiveNoSpace %[5]d + set shellCompDirectiveNoFileComp %[6]d + set shellCompDirectiveFilterFileExt %[7]d + set shellCompDirectiveFilterDirs %[8]d + + if test -z "$directive" + set directive 0 + end + + set compErr (math (math --scale 0 $directive / $shellCompDirectiveError) %% 2) + if test $compErr -eq 1 + __%[1]s_debug "Received error directive: aborting." + # Might as well do file completion, in case it helps + set --global __%[1]s_comp_do_file_comp 1 + return 1 + end + + set filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) %% 2) + set dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) %% 2) + if test $filefilter -eq 1; or test $dirfilter -eq 1 + __%[1]s_debug "File extension filtering or directory filtering not supported" + # Do full file completion instead + set --global __%[1]s_comp_do_file_comp 1 + return 1 + end + + set nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) %% 2) + set nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) %% 2) + + __%[1]s_debug "nospace: $nospace, nofiles: $nofiles" + + # Important not to quote the variable for count to work + set numComps (count $__%[1]s_comp_results) + __%[1]s_debug "numComps: $numComps" + + if test $numComps -eq 1; and test $nospace -ne 0 + # To support the "nospace" directive we trick the shell + # by outputting an extra, longer completion. + __%[1]s_debug "Adding second completion to perform nospace directive" + set --append __%[1]s_comp_results $__%[1]s_comp_results[1]. + end + + if test $numComps -eq 0; and test $nofiles -eq 0 + __%[1]s_debug "Requesting file completion" + set --global __%[1]s_comp_do_file_comp 1 + end + + # If we don't want file completion, we must return true even if there + # are no completions found. This is because fish will perform the last + # completion command, even if its condition is false, if no other + # completion command was triggered + return (not set --query __%[1]s_comp_do_file_comp) +end + +# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves +# so we can properly delete any completions provided by another script. +# The space after the the program name is essential to trigger completion for the program +# and not completion of the program name itself. +complete --do-complete "%[2]s " > /dev/null 2>&1 +# Using '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. + +# Remove any pre-existing completions for the program since we will be handling all of them. +complete -c %[2]s -e + +# The order in which the below two lines are defined is very important so that __%[1]s_prepare_completions +# is called first. It is __%[1]s_prepare_completions that sets up the __%[1]s_comp_do_file_comp variable. +# +# This completion will be run second as complete commands are added FILO. +# It triggers file completion choices when __%[1]s_comp_do_file_comp is set. +complete -c %[2]s -n 'set --query __%[1]s_comp_do_file_comp' + +# This completion will be run first as complete commands are added FILO. +# The call to __%[1]s_prepare_completions will setup both __%[1]s_comp_results and __%[1]s_comp_do_file_comp. +# It provides the program's completion choices. +complete -c %[2]s -n '__%[1]s_prepare_completions' -f -a '$__%[1]s_comp_results' + +`, nameForVar, name, compCmd, + ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp, + ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs)) +} + +// GenFishCompletion generates fish completion file and writes to the passed writer. +func (c *Command) GenFishCompletion(w io.Writer, includeDesc bool) error { + buf := new(bytes.Buffer) + genFishComp(buf, c.Name(), includeDesc) + _, err := buf.WriteTo(w) + return err +} + +// GenFishCompletionFile generates fish completion file. +func (c *Command) GenFishCompletionFile(filename string, includeDesc bool) error { + outFile, err := os.Create(filename) + if err != nil { + return err + } + defer outFile.Close() + + return c.GenFishCompletion(outFile, includeDesc) +} diff --git a/vendor/github.com/spf13/cobra/fish_completions.md b/vendor/github.com/spf13/cobra/fish_completions.md new file mode 100644 index 00000000..19b2ed12 --- /dev/null +++ b/vendor/github.com/spf13/cobra/fish_completions.md @@ -0,0 +1,4 @@ +## Generating Fish Completions For Your cobra.Command + +Please refer to [Shell Completions](shell_completions.md) for details. + diff --git a/vendor/github.com/spf13/cobra/go.mod b/vendor/github.com/spf13/cobra/go.mod index dea1030b..57e3244d 100644 --- a/vendor/github.com/spf13/cobra/go.mod +++ b/vendor/github.com/spf13/cobra/go.mod @@ -6,7 +6,7 @@ require ( github.com/cpuguy83/go-md2man/v2 v2.0.0 github.com/inconshreveable/mousetrap v1.0.0 github.com/mitchellh/go-homedir v1.1.0 - github.com/spf13/pflag v1.0.3 - github.com/spf13/viper v1.4.0 - gopkg.in/yaml.v2 v2.2.2 + github.com/spf13/pflag v1.0.5 + github.com/spf13/viper v1.7.0 + gopkg.in/yaml.v2 v2.2.8 ) diff --git a/vendor/github.com/spf13/cobra/go.sum b/vendor/github.com/spf13/cobra/go.sum index 3aaa2ac0..0aae7386 100644 --- a/vendor/github.com/spf13/cobra/go.sum +++ b/vendor/github.com/spf13/cobra/go.sum @@ -1,28 +1,48 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +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/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= @@ -32,19 +52,55 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= @@ -55,20 +111,34 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -79,11 +149,18 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= @@ -92,58 +169,145 @@ github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 h1:HyfiK1WMnHj5FXFXatD+Qs1A/xC2Run6RzeW1SyHxpc= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/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/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= 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/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/vendor/github.com/spf13/cobra/powershell_completions.md b/vendor/github.com/spf13/cobra/powershell_completions.md index afed8024..55f154a6 100644 --- a/vendor/github.com/spf13/cobra/powershell_completions.md +++ b/vendor/github.com/spf13/cobra/powershell_completions.md @@ -2,6 +2,8 @@ Cobra can generate PowerShell completion scripts. Users need PowerShell version 5.0 or above, which comes with Windows 10 and can be downloaded separately for Windows 7 or 8.1. They can then write the completions to a file and source this file from their PowerShell profile, which is referenced by the `$Profile` environment variable. See `Get-Help about_Profiles` for more info about PowerShell profiles. +*Note*: PowerShell completions have not (yet?) been aligned to Cobra's generic shell completion support. This implies the PowerShell completions are not as rich as for other shells (see [What's not yet supported](#whats-not-yet-supported)), and may behave slightly differently. They are still very useful for PowerShell users. + # What's supported - Completion for subcommands using their `.Short` description diff --git a/vendor/github.com/spf13/cobra/projects_using_cobra.md b/vendor/github.com/spf13/cobra/projects_using_cobra.md new file mode 100644 index 00000000..31c27203 --- /dev/null +++ b/vendor/github.com/spf13/cobra/projects_using_cobra.md @@ -0,0 +1,35 @@ +## Projects using Cobra + +- [Arduino CLI](https://github.com/arduino/arduino-cli) +- [Bleve](http://www.blevesearch.com/) +- [CockroachDB](http://www.cockroachlabs.com/) +- [Cosmos SDK](https://github.com/cosmos/cosmos-sdk) +- [Delve](https://github.com/derekparker/delve) +- [Docker (distribution)](https://github.com/docker/distribution) +- [Etcd](https://etcd.io/) +- [Gardener](https://github.com/gardener/gardenctl) +- [Giant Swarm's gsctl](https://github.com/giantswarm/gsctl) +- [Git Bump](https://github.com/erdaltsksn/git-bump) +- [Github CLI](https://github.com/cli/cli) +- [GitHub Labeler](https://github.com/erdaltsksn/gh-label) +- [Golangci-lint](https://golangci-lint.run) +- [GopherJS](http://www.gopherjs.org/) +- [Helm](https://helm.sh) +- [Hugo](https://gohugo.io) +- [Istio](https://istio.io) +- [Kool](https://github.com/kool-dev/kool) +- [Kubernetes](http://kubernetes.io/) +- [Linkerd](https://linkerd.io/) +- [Mattermost-server](https://github.com/mattermost/mattermost-server) +- [Metal Stack CLI](https://github.com/metal-stack/metalctl) +- [Moby (former Docker)](https://github.com/moby/moby) +- [Nanobox](https://github.com/nanobox-io/nanobox)/[Nanopack](https://github.com/nanopack) +- [OpenShift](https://www.openshift.com/) +- [Pouch](https://github.com/alibaba/pouch) +- [ProjectAtomic (enterprise)](http://www.projectatomic.io/) +- [Prototool](https://github.com/uber/prototool) +- [Random](https://github.com/erdaltsksn/random) +- [Rclone](https://rclone.org/) +- [Skaffold](https://skaffold.dev/) +- [Tendermint](https://github.com/tendermint/tendermint) +- [Werf](https://werf.io/) diff --git a/vendor/github.com/spf13/cobra/shell_completions.go b/vendor/github.com/spf13/cobra/shell_completions.go index ba0af9cb..d99bf91e 100644 --- a/vendor/github.com/spf13/cobra/shell_completions.go +++ b/vendor/github.com/spf13/cobra/shell_completions.go @@ -4,82 +4,81 @@ import ( "github.com/spf13/pflag" ) -// MarkFlagRequired adds the BashCompOneRequiredFlag annotation to the named flag if it exists, +// MarkFlagRequired instructs the various shell completion implementations to +// prioritize the named flag when performing completion, // and causes your command to report an error if invoked without the flag. func (c *Command) MarkFlagRequired(name string) error { return MarkFlagRequired(c.Flags(), name) } -// MarkPersistentFlagRequired adds the BashCompOneRequiredFlag annotation to the named persistent flag if it exists, +// MarkPersistentFlagRequired instructs the various shell completion implementations to +// prioritize the named persistent flag when performing completion, // and causes your command to report an error if invoked without the flag. func (c *Command) MarkPersistentFlagRequired(name string) error { return MarkFlagRequired(c.PersistentFlags(), name) } -// MarkFlagRequired adds the BashCompOneRequiredFlag annotation to the named flag if it exists, +// MarkFlagRequired instructs the various shell completion implementations to +// prioritize the named flag when performing completion, // and causes your command to report an error if invoked without the flag. func MarkFlagRequired(flags *pflag.FlagSet, name string) error { return flags.SetAnnotation(name, BashCompOneRequiredFlag, []string{"true"}) } -// MarkFlagFilename adds the BashCompFilenameExt annotation to the named flag, if it exists. -// Generated bash autocompletion will select filenames for the flag, limiting to named extensions if provided. +// MarkFlagFilename instructs the various shell completion implementations to +// limit completions for the named flag to the specified file extensions. func (c *Command) MarkFlagFilename(name string, extensions ...string) error { return MarkFlagFilename(c.Flags(), name, extensions...) } // MarkFlagCustom adds the BashCompCustom annotation to the named flag, if it exists. -// Generated bash autocompletion will call the bash function f for the flag. +// The bash completion script will call the bash function f for the flag. +// +// This will only work for bash completion. +// It is recommended to instead use c.RegisterFlagCompletionFunc(...) which allows +// to register a Go function which will work across all shells. func (c *Command) MarkFlagCustom(name string, f string) error { return MarkFlagCustom(c.Flags(), name, f) } // MarkPersistentFlagFilename instructs the various shell completion -// implementations to limit completions for this persistent flag to the -// specified extensions (patterns). -// -// Shell Completion compatibility matrix: bash, zsh +// implementations to limit completions for the named persistent flag to the +// specified file extensions. func (c *Command) MarkPersistentFlagFilename(name string, extensions ...string) error { return MarkFlagFilename(c.PersistentFlags(), name, extensions...) } // MarkFlagFilename instructs the various shell completion implementations to -// limit completions for this flag to the specified extensions (patterns). -// -// Shell Completion compatibility matrix: bash, zsh +// limit completions for the named flag to the specified file extensions. func MarkFlagFilename(flags *pflag.FlagSet, name string, extensions ...string) error { return flags.SetAnnotation(name, BashCompFilenameExt, extensions) } -// MarkFlagCustom instructs the various shell completion implementations to -// limit completions for this flag to the specified extensions (patterns). +// MarkFlagCustom adds the BashCompCustom annotation to the named flag, if it exists. +// The bash completion script will call the bash function f for the flag. // -// Shell Completion compatibility matrix: bash, zsh +// This will only work for bash completion. +// It is recommended to instead use c.RegisterFlagCompletionFunc(...) which allows +// to register a Go function which will work across all shells. func MarkFlagCustom(flags *pflag.FlagSet, name string, f string) error { return flags.SetAnnotation(name, BashCompCustom, []string{f}) } // MarkFlagDirname instructs the various shell completion implementations to -// complete only directories with this named flag. -// -// Shell Completion compatibility matrix: zsh +// limit completions for the named flag to directory names. func (c *Command) MarkFlagDirname(name string) error { return MarkFlagDirname(c.Flags(), name) } // MarkPersistentFlagDirname instructs the various shell completion -// implementations to complete only directories with this persistent named flag. -// -// Shell Completion compatibility matrix: zsh +// implementations to limit completions for the named persistent flag to +// directory names. func (c *Command) MarkPersistentFlagDirname(name string) error { return MarkFlagDirname(c.PersistentFlags(), name) } // MarkFlagDirname instructs the various shell completion implementations to -// complete only directories with this specified flag. -// -// Shell Completion compatibility matrix: zsh +// limit completions for the named flag to directory names. func MarkFlagDirname(flags *pflag.FlagSet, name string) error { - zshPattern := "-(/)" - return flags.SetAnnotation(name, zshCompDirname, []string{zshPattern}) + return flags.SetAnnotation(name, BashCompSubdirsInDir, []string{}) } diff --git a/vendor/github.com/spf13/cobra/shell_completions.md b/vendor/github.com/spf13/cobra/shell_completions.md new file mode 100644 index 00000000..d8416ab1 --- /dev/null +++ b/vendor/github.com/spf13/cobra/shell_completions.md @@ -0,0 +1,434 @@ +# Generating shell completions + +Cobra can generate shell completions for multiple shells. +The currently supported shells are: +- Bash +- Zsh +- Fish +- PowerShell + +If you are using the generator you can create a completion command by running + +```bash +cobra add completion +``` +and then modifying the generated `cmd/completion.go` file to look something like this +(writing the shell script to stdout allows the most flexible use): + +```go +var completionCmd = &cobra.Command{ + Use: "completion [bash|zsh|fish|powershell]", + Short: "Generate completion script", + Long: `To load completions: + +Bash: + +$ source <(yourprogram completion bash) + +# To load completions for each session, execute once: +Linux: + $ yourprogram completion bash > /etc/bash_completion.d/yourprogram +MacOS: + $ yourprogram completion bash > /usr/local/etc/bash_completion.d/yourprogram + +Zsh: + +# If shell completion is not already enabled in your environment you will need +# to enable it. You can execute the following once: + +$ echo "autoload -U compinit; compinit" >> ~/.zshrc + +# To load completions for each session, execute once: +$ yourprogram completion zsh > "${fpath[1]}/_yourprogram" + +# You will need to start a new shell for this setup to take effect. + +Fish: + +$ yourprogram completion fish | source + +# To load completions for each session, execute once: +$ yourprogram completion fish > ~/.config/fish/completions/yourprogram.fish +`, + DisableFlagsInUseLine: true, + ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, + Args: cobra.ExactValidArgs(1), + Run: func(cmd *cobra.Command, args []string) { + switch args[0] { + case "bash": + cmd.Root().GenBashCompletion(os.Stdout) + case "zsh": + cmd.Root().GenZshCompletion(os.Stdout) + case "fish": + cmd.Root().GenFishCompletion(os.Stdout, true) + case "powershell": + cmd.Root().GenPowerShellCompletion(os.Stdout) + } + }, +} +``` + +**Note:** The cobra generator may include messages printed to stdout for example if the config file is loaded, this will break the auto complete script so must be removed. + +# Customizing completions + +The generated completion scripts will automatically handle completing commands and flags. However, you can make your completions much more powerful by providing information to complete your program's nouns and flag values. + +## Completion of nouns + +### Static completion of nouns + +Cobra allows you to provide a pre-defined list of completion choices for your nouns using the `ValidArgs` field. +For example, if you want `kubectl get [tab][tab]` to show a list of valid "nouns" you have to set them. +Some simplified code from `kubectl get` looks like: + +```go +validArgs []string = { "pod", "node", "service", "replicationcontroller" } + +cmd := &cobra.Command{ + Use: "get [(-o|--output=)json|yaml|template|...] (RESOURCE [NAME] | RESOURCE/NAME ...)", + Short: "Display one or many resources", + Long: get_long, + Example: get_example, + Run: func(cmd *cobra.Command, args []string) { + err := RunGet(f, out, cmd, args) + util.CheckErr(err) + }, + ValidArgs: validArgs, +} +``` + +Notice we put the `ValidArgs` field on the `get` sub-command. Doing so will give results like: + +```bash +$ kubectl get [tab][tab] +node pod replicationcontroller service +``` + +#### Aliases for nouns + +If your nouns have aliases, you can define them alongside `ValidArgs` using `ArgAliases`: + +```go +argAliases []string = { "pods", "nodes", "services", "svc", "replicationcontrollers", "rc" } + +cmd := &cobra.Command{ + ... + ValidArgs: validArgs, + ArgAliases: argAliases +} +``` + +The aliases are not shown to the user on tab completion, but they are accepted as valid nouns by +the completion algorithm if entered manually, e.g. in: + +```bash +$ kubectl get rc [tab][tab] +backend frontend database +``` + +Note that without declaring `rc` as an alias, the completion algorithm would not know to show the list of +replication controllers following `rc`. + +### Dynamic completion of nouns + +In some cases it is not possible to provide a list of completions in advance. Instead, the list of completions must be determined at execution-time. In a similar fashion as for static completions, you can use the `ValidArgsFunction` field to provide a Go function that Cobra will execute when it needs the list of completion choices for the nouns of a command. Note that either `ValidArgs` or `ValidArgsFunction` can be used for a single cobra command, but not both. +Simplified code from `helm status` looks like: + +```go +cmd := &cobra.Command{ + Use: "status RELEASE_NAME", + Short: "Display the status of the named release", + Long: status_long, + RunE: func(cmd *cobra.Command, args []string) { + RunGet(args[0]) + }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + if len(args) != 0 { + return nil, cobra.ShellCompDirectiveNoFileComp + } + return getReleasesFromCluster(toComplete), cobra.ShellCompDirectiveNoFileComp + }, +} +``` +Where `getReleasesFromCluster()` is a Go function that obtains the list of current Helm releases running on the Kubernetes cluster. +Notice we put the `ValidArgsFunction` on the `status` sub-command. Let's assume the Helm releases on the cluster are: `harbor`, `notary`, `rook` and `thanos` then this dynamic completion will give results like: + +```bash +$ helm status [tab][tab] +harbor notary rook thanos +``` +You may have noticed the use of `cobra.ShellCompDirective`. These directives are bit fields allowing to control some shell completion behaviors for your particular completion. You can combine them with the bit-or operator such as `cobra.ShellCompDirectiveNoSpace | cobra.ShellCompDirectiveNoFileComp` +```go +// Indicates that the shell will perform its default behavior after completions +// have been provided (this implies none of the other directives). +ShellCompDirectiveDefault + +// Indicates an error occurred and completions should be ignored. +ShellCompDirectiveError + +// Indicates that the shell should not add a space after the completion, +// even if there is a single completion provided. +ShellCompDirectiveNoSpace + +// Indicates that the shell should not provide file completion even when +// no completion is provided. +ShellCompDirectiveNoFileComp + +// Indicates that the returned completions should be used as file extension filters. +// For example, to complete only files of the form *.json or *.yaml: +// return []string{"yaml", "json"}, ShellCompDirectiveFilterFileExt +// For flags, using MarkFlagFilename() and MarkPersistentFlagFilename() +// is a shortcut to using this directive explicitly. +// +ShellCompDirectiveFilterFileExt + +// Indicates that only directory names should be provided in file completion. +// For example: +// return nil, ShellCompDirectiveFilterDirs +// For flags, using MarkFlagDirname() is a shortcut to using this directive explicitly. +// +// To request directory names within another directory, the returned completions +// should specify a single directory name within which to search. For example, +// to complete directories within "themes/": +// return []string{"themes"}, ShellCompDirectiveFilterDirs +// +ShellCompDirectiveFilterDirs +``` + +***Note***: When using the `ValidArgsFunction`, Cobra will call your registered function after having parsed all flags and arguments provided in the command-line. You therefore don't need to do this parsing yourself. For example, when a user calls `helm status --namespace my-rook-ns [tab][tab]`, Cobra will call your registered `ValidArgsFunction` after having parsed the `--namespace` flag, as it would have done when calling the `RunE` function. + +#### Debugging + +Cobra achieves dynamic completion through the use of a hidden command called by the completion script. To debug your Go completion code, you can call this hidden command directly: +```bash +$ helm __complete status har +harbor +:4 +Completion ended with directive: ShellCompDirectiveNoFileComp # This is on stderr +``` +***Important:*** If the noun to complete is empty (when the user has not yet typed any letters of that noun), you must pass an empty parameter to the `__complete` command: +```bash +$ helm __complete status "" +harbor +notary +rook +thanos +:4 +Completion ended with directive: ShellCompDirectiveNoFileComp # This is on stderr +``` +Calling the `__complete` command directly allows you to run the Go debugger to troubleshoot your code. You can also add printouts to your code; Cobra provides the following functions to use for printouts in Go completion code: +```go +// Prints to the completion script debug file (if BASH_COMP_DEBUG_FILE +// is set to a file path) and optionally prints to stderr. +cobra.CompDebug(msg string, printToStdErr bool) { +cobra.CompDebugln(msg string, printToStdErr bool) + +// Prints to the completion script debug file (if BASH_COMP_DEBUG_FILE +// is set to a file path) and to stderr. +cobra.CompError(msg string) +cobra.CompErrorln(msg string) +``` +***Important:*** You should **not** leave traces that print directly to stdout in your completion code as they will be interpreted as completion choices by the completion script. Instead, use the cobra-provided debugging traces functions mentioned above. + +## Completions for flags + +### Mark flags as required + +Most of the time completions will only show sub-commands. But if a flag is required to make a sub-command work, you probably want it to show up when the user types [tab][tab]. You can mark a flag as 'Required' like so: + +```go +cmd.MarkFlagRequired("pod") +cmd.MarkFlagRequired("container") +``` + +and you'll get something like + +```bash +$ kubectl exec [tab][tab] +-c --container= -p --pod= +``` + +### Specify dynamic flag completion + +As for nouns, Cobra provides a way of defining dynamic completion of flags. To provide a Go function that Cobra will execute when it needs the list of completion choices for a flag, you must register the function using the `command.RegisterFlagCompletionFunc()` function. + +```go +flagName := "output" +cmd.RegisterFlagCompletionFunc(flagName, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + return []string{"json", "table", "yaml"}, cobra.ShellCompDirectiveDefault +}) +``` +Notice that calling `RegisterFlagCompletionFunc()` is done through the `command` with which the flag is associated. In our example this dynamic completion will give results like so: + +```bash +$ helm status --output [tab][tab] +json table yaml +``` + +#### Debugging + +You can also easily debug your Go completion code for flags: +```bash +$ helm __complete status --output "" +json +table +yaml +:4 +Completion ended with directive: ShellCompDirectiveNoFileComp # This is on stderr +``` +***Important:*** You should **not** leave traces that print to stdout in your completion code as they will be interpreted as completion choices by the completion script. Instead, use the cobra-provided debugging traces functions mentioned further above. + +### Specify valid filename extensions for flags that take a filename + +To limit completions of flag values to file names with certain extensions you can either use the different `MarkFlagFilename()` functions or a combination of `RegisterFlagCompletionFunc()` and `ShellCompDirectiveFilterFileExt`, like so: +```go +flagName := "output" +cmd.MarkFlagFilename(flagName, "yaml", "json") +``` +or +```go +flagName := "output" +cmd.RegisterFlagCompletionFunc(flagName, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + return []string{"yaml", "json"}, ShellCompDirectiveFilterFileExt}) +``` + +### Limit flag completions to directory names + +To limit completions of flag values to directory names you can either use the `MarkFlagDirname()` functions or a combination of `RegisterFlagCompletionFunc()` and `ShellCompDirectiveFilterDirs`, like so: +```go +flagName := "output" +cmd.MarkFlagDirname(flagName) +``` +or +```go +flagName := "output" +cmd.RegisterFlagCompletionFunc(flagName, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + return nil, cobra.ShellCompDirectiveFilterDirs +}) +``` +To limit completions of flag values to directory names *within another directory* you can use a combination of `RegisterFlagCompletionFunc()` and `ShellCompDirectiveFilterDirs` like so: +```go +flagName := "output" +cmd.RegisterFlagCompletionFunc(flagName, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + return []string{"themes"}, cobra.ShellCompDirectiveFilterDirs +}) +``` +### Descriptions for completions + +Both `zsh` and `fish` allow for descriptions to annotate completion choices. For commands and flags, Cobra will provide the descriptions automatically, based on usage information. For example, using zsh: +``` +$ helm s[tab] +search -- search for a keyword in charts +show -- show information of a chart +status -- displays the status of the named release +``` +while using fish: +``` +$ helm s[tab] +search (search for a keyword in charts) show (show information of a chart) status (displays the status of the named release) +``` + +Cobra allows you to add annotations to your own completions. Simply add the annotation text after each completion, following a `\t` separator. This technique applies to completions returned by `ValidArgs`, `ValidArgsFunction` and `RegisterFlagCompletionFunc()`. For example: +```go +ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + return []string{"harbor\tAn image registry", "thanos\tLong-term metrics"}, cobra.ShellCompDirectiveNoFileComp +}} +``` +or +```go +ValidArgs: []string{"bash\tCompletions for bash", "zsh\tCompletions for zsh"} +``` +## Bash completions + +### Dependencies + +The bash completion script generated by Cobra requires the `bash_completion` package. You should update the help text of your completion command to show how to install the `bash_completion` package ([Kubectl docs](https://kubernetes.io/docs/tasks/tools/install-kubectl/#enabling-shell-autocompletion)) + +### Aliases + +You can also configure `bash` aliases for your program and they will also support completions. + +```bash +alias aliasname=origcommand +complete -o default -F __start_origcommand aliasname + +# and now when you run `aliasname` completion will make +# suggestions as it did for `origcommand`. + +$ aliasname +completion firstcommand secondcommand +``` +### Bash legacy dynamic completions + +For backwards-compatibility, Cobra still supports its bash legacy dynamic completion solution. +Please refer to [Bash Completions](bash_completions.md) for details. + +## Zsh completions + +Cobra supports native Zsh completion generated from the root `cobra.Command`. +The generated completion script should be put somewhere in your `$fpath` and be named +`_`. You will need to start a new shell for the completions to become available. + +Zsh supports descriptions for completions. Cobra will provide the description automatically, +based on usage information. Cobra provides a way to completely disable such descriptions by +using `GenZshCompletionNoDesc()` or `GenZshCompletionFileNoDesc()`. You can choose to make +this a configurable option to your users. +``` +# With descriptions +$ helm s[tab] +search -- search for a keyword in charts +show -- show information of a chart +status -- displays the status of the named release + +# Without descriptions +$ helm s[tab] +search show status +``` +*Note*: Because of backwards-compatibility requirements, we were forced to have a different API to disable completion descriptions between `Zsh` and `Fish`. + +### Limitations + +* Custom completions implemented in Bash scripting (legacy) are not supported and will be ignored for `zsh` (including the use of the `BashCompCustom` flag annotation). + * You should instead use `ValidArgsFunction` and `RegisterFlagCompletionFunc()` which are portable to the different shells (`bash`, `zsh`, `fish`). +* The function `MarkFlagCustom()` is not supported and will be ignored for `zsh`. + * You should instead use `RegisterFlagCompletionFunc()`. + +### Zsh completions standardization + +Cobra 1.1 standardized its zsh completion support to align it with its other shell completions. Although the API was kept backwards-compatible, some small changes in behavior were introduced. +Please refer to [Zsh Completions](zsh_completions.md) for details. + +## Fish completions + +Cobra supports native Fish completions generated from the root `cobra.Command`. You can use the `command.GenFishCompletion()` or `command.GenFishCompletionFile()` functions. You must provide these functions with a parameter indicating if the completions should be annotated with a description; Cobra will provide the description automatically based on usage information. You can choose to make this option configurable by your users. +``` +# With descriptions +$ helm s[tab] +search (search for a keyword in charts) show (show information of a chart) status (displays the status of the named release) + +# Without descriptions +$ helm s[tab] +search show status +``` +*Note*: Because of backwards-compatibility requirements, we were forced to have a different API to disable completion descriptions between `Zsh` and `Fish`. + +### Limitations + +* Custom completions implemented in Bash scripting (legacy) are not supported and will be ignored for `fish` (including the use of the `BashCompCustom` flag annotation). + * You should instead use `ValidArgsFunction` and `RegisterFlagCompletionFunc()` which are portable to the different shells (`bash`, `zsh`, `fish`). +* The function `MarkFlagCustom()` is not supported and will be ignored for `fish`. + * You should instead use `RegisterFlagCompletionFunc()`. +* The following flag completion annotations are not supported and will be ignored for `fish`: + * `BashCompFilenameExt` (filtering by file extension) + * `BashCompSubdirsInDir` (filtering by directory) +* The functions corresponding to the above annotations are consequently not supported and will be ignored for `fish`: + * `MarkFlagFilename()` and `MarkPersistentFlagFilename()` (filtering by file extension) + * `MarkFlagDirname()` and `MarkPersistentFlagDirname()` (filtering by directory) +* Similarly, the following completion directives are not supported and will be ignored for `fish`: + * `ShellCompDirectiveFilterFileExt` (filtering by file extension) + * `ShellCompDirectiveFilterDirs` (filtering by directory) + +## PowerShell completions + +Please refer to [PowerShell Completions](powershell_completions.md) for details. diff --git a/vendor/github.com/spf13/cobra/zsh_completions.go b/vendor/github.com/spf13/cobra/zsh_completions.go index 12755482..92a70394 100644 --- a/vendor/github.com/spf13/cobra/zsh_completions.go +++ b/vendor/github.com/spf13/cobra/zsh_completions.go @@ -1,336 +1,240 @@ package cobra import ( - "encoding/json" + "bytes" "fmt" "io" "os" - "sort" - "strings" - "text/template" - - "github.com/spf13/pflag" -) - -const ( - zshCompArgumentAnnotation = "cobra_annotations_zsh_completion_argument_annotation" - zshCompArgumentFilenameComp = "cobra_annotations_zsh_completion_argument_file_completion" - zshCompArgumentWordComp = "cobra_annotations_zsh_completion_argument_word_completion" - zshCompDirname = "cobra_annotations_zsh_dirname" ) -var ( - zshCompFuncMap = template.FuncMap{ - "genZshFuncName": zshCompGenFuncName, - "extractFlags": zshCompExtractFlag, - "genFlagEntryForZshArguments": zshCompGenFlagEntryForArguments, - "extractArgsCompletions": zshCompExtractArgumentCompletionHintsForRendering, - } - zshCompletionText = ` -{{/* should accept Command (that contains subcommands) as parameter */}} -{{define "argumentsC" -}} -{{ $cmdPath := genZshFuncName .}} -function {{$cmdPath}} { - local -a commands - - _arguments -C \{{- range extractFlags .}} - {{genFlagEntryForZshArguments .}} \{{- end}} - "1: :->cmnds" \ - "*::arg:->args" - - case $state in - cmnds) - commands=({{range .Commands}}{{if not .Hidden}} - "{{.Name}}:{{.Short}}"{{end}}{{end}} - ) - _describe "command" commands - ;; - esac - - case "$words[1]" in {{- range .Commands}}{{if not .Hidden}} - {{.Name}}) - {{$cmdPath}}_{{.Name}} - ;;{{end}}{{end}} - esac -} -{{range .Commands}}{{if not .Hidden}} -{{template "selectCmdTemplate" .}} -{{- end}}{{end}} -{{- end}} - -{{/* should accept Command without subcommands as parameter */}} -{{define "arguments" -}} -function {{genZshFuncName .}} { -{{" _arguments"}}{{range extractFlags .}} \ - {{genFlagEntryForZshArguments . -}} -{{end}}{{range extractArgsCompletions .}} \ - {{.}}{{end}} -} -{{end}} - -{{/* dispatcher for commands with or without subcommands */}} -{{define "selectCmdTemplate" -}} -{{if .Hidden}}{{/* ignore hidden*/}}{{else -}} -{{if .Commands}}{{template "argumentsC" .}}{{else}}{{template "arguments" .}}{{end}} -{{- end}} -{{- end}} - -{{/* template entry point */}} -{{define "Main" -}} -#compdef _{{.Name}} {{.Name}} - -{{template "selectCmdTemplate" .}} -{{end}} -` -) - -// zshCompArgsAnnotation is used to encode/decode zsh completion for -// arguments to/from Command.Annotations. -type zshCompArgsAnnotation map[int]zshCompArgHint - -type zshCompArgHint struct { - // Indicates the type of the completion to use. One of: - // zshCompArgumentFilenameComp or zshCompArgumentWordComp - Tipe string `json:"type"` - - // A value for the type above (globs for file completion or words) - Options []string `json:"options"` -} - -// GenZshCompletionFile generates zsh completion file. +// GenZshCompletionFile generates zsh completion file including descriptions. func (c *Command) GenZshCompletionFile(filename string) error { - outFile, err := os.Create(filename) - if err != nil { - return err - } - defer outFile.Close() - - return c.GenZshCompletion(outFile) + return c.genZshCompletionFile(filename, true) } -// GenZshCompletion generates a zsh completion file and writes to the passed -// writer. The completion always run on the root command regardless of the -// command it was called from. +// GenZshCompletion generates zsh completion file including descriptions +// and writes it to the passed writer. func (c *Command) GenZshCompletion(w io.Writer) error { - tmpl, err := template.New("Main").Funcs(zshCompFuncMap).Parse(zshCompletionText) - if err != nil { - return fmt.Errorf("error creating zsh completion template: %v", err) - } - return tmpl.Execute(w, c.Root()) -} - -// MarkZshCompPositionalArgumentFile marks the specified argument (first -// argument is 1) as completed by file selection. patterns (e.g. "*.txt") are -// optional - if not provided the completion will search for all files. -func (c *Command) MarkZshCompPositionalArgumentFile(argPosition int, patterns ...string) error { - if argPosition < 1 { - return fmt.Errorf("Invalid argument position (%d)", argPosition) - } - annotation, err := c.zshCompGetArgsAnnotations() - if err != nil { - return err - } - if c.zshcompArgsAnnotationnIsDuplicatePosition(annotation, argPosition) { - return fmt.Errorf("Duplicate annotation for positional argument at index %d", argPosition) - } - annotation[argPosition] = zshCompArgHint{ - Tipe: zshCompArgumentFilenameComp, - Options: patterns, - } - return c.zshCompSetArgsAnnotations(annotation) -} - -// MarkZshCompPositionalArgumentWords marks the specified positional argument -// (first argument is 1) as completed by the provided words. At east one word -// must be provided, spaces within words will be offered completion with -// "word\ word". -func (c *Command) MarkZshCompPositionalArgumentWords(argPosition int, words ...string) error { - if argPosition < 1 { - return fmt.Errorf("Invalid argument position (%d)", argPosition) - } - if len(words) == 0 { - return fmt.Errorf("Trying to set empty word list for positional argument %d", argPosition) - } - annotation, err := c.zshCompGetArgsAnnotations() - if err != nil { - return err - } - if c.zshcompArgsAnnotationnIsDuplicatePosition(annotation, argPosition) { - return fmt.Errorf("Duplicate annotation for positional argument at index %d", argPosition) - } - annotation[argPosition] = zshCompArgHint{ - Tipe: zshCompArgumentWordComp, - Options: words, - } - return c.zshCompSetArgsAnnotations(annotation) -} - -func zshCompExtractArgumentCompletionHintsForRendering(c *Command) ([]string, error) { - var result []string - annotation, err := c.zshCompGetArgsAnnotations() - if err != nil { - return nil, err - } - for k, v := range annotation { - s, err := zshCompRenderZshCompArgHint(k, v) - if err != nil { - return nil, err - } - result = append(result, s) - } - if len(c.ValidArgs) > 0 { - if _, positionOneExists := annotation[1]; !positionOneExists { - s, err := zshCompRenderZshCompArgHint(1, zshCompArgHint{ - Tipe: zshCompArgumentWordComp, - Options: c.ValidArgs, - }) - if err != nil { - return nil, err - } - result = append(result, s) - } - } - sort.Strings(result) - return result, nil + return c.genZshCompletion(w, true) } -func zshCompRenderZshCompArgHint(i int, z zshCompArgHint) (string, error) { - switch t := z.Tipe; t { - case zshCompArgumentFilenameComp: - var globs []string - for _, g := range z.Options { - globs = append(globs, fmt.Sprintf(`-g "%s"`, g)) - } - return fmt.Sprintf(`'%d: :_files %s'`, i, strings.Join(globs, " ")), nil - case zshCompArgumentWordComp: - var words []string - for _, w := range z.Options { - words = append(words, fmt.Sprintf("%q", w)) - } - return fmt.Sprintf(`'%d: :(%s)'`, i, strings.Join(words, " ")), nil - default: - return "", fmt.Errorf("Invalid zsh argument completion annotation: %s", t) - } +// GenZshCompletionFileNoDesc generates zsh completion file without descriptions. +func (c *Command) GenZshCompletionFileNoDesc(filename string) error { + return c.genZshCompletionFile(filename, false) } -func (c *Command) zshcompArgsAnnotationnIsDuplicatePosition(annotation zshCompArgsAnnotation, position int) bool { - _, dup := annotation[position] - return dup +// GenZshCompletionNoDesc generates zsh completion file without descriptions +// and writes it to the passed writer. +func (c *Command) GenZshCompletionNoDesc(w io.Writer) error { + return c.genZshCompletion(w, false) } -func (c *Command) zshCompGetArgsAnnotations() (zshCompArgsAnnotation, error) { - annotation := make(zshCompArgsAnnotation) - annotationString, ok := c.Annotations[zshCompArgumentAnnotation] - if !ok { - return annotation, nil - } - err := json.Unmarshal([]byte(annotationString), &annotation) - if err != nil { - return annotation, fmt.Errorf("Error unmarshaling zsh argument annotation: %v", err) - } - return annotation, nil -} - -func (c *Command) zshCompSetArgsAnnotations(annotation zshCompArgsAnnotation) error { - jsn, err := json.Marshal(annotation) - if err != nil { - return fmt.Errorf("Error marshaling zsh argument annotation: %v", err) - } - if c.Annotations == nil { - c.Annotations = make(map[string]string) - } - c.Annotations[zshCompArgumentAnnotation] = string(jsn) +// MarkZshCompPositionalArgumentFile only worked for zsh and its behavior was +// not consistent with Bash completion. It has therefore been disabled. +// Instead, when no other completion is specified, file completion is done by +// default for every argument. One can disable file completion on a per-argument +// basis by using ValidArgsFunction and ShellCompDirectiveNoFileComp. +// To achieve file extension filtering, one can use ValidArgsFunction and +// ShellCompDirectiveFilterFileExt. +// +// Deprecated +func (c *Command) MarkZshCompPositionalArgumentFile(argPosition int, patterns ...string) error { return nil } -func zshCompGenFuncName(c *Command) string { - if c.HasParent() { - return zshCompGenFuncName(c.Parent()) + "_" + c.Name() - } - return "_" + c.Name() -} - -func zshCompExtractFlag(c *Command) []*pflag.Flag { - var flags []*pflag.Flag - c.LocalFlags().VisitAll(func(f *pflag.Flag) { - if !f.Hidden { - flags = append(flags, f) - } - }) - c.InheritedFlags().VisitAll(func(f *pflag.Flag) { - if !f.Hidden { - flags = append(flags, f) - } - }) - return flags -} - -// zshCompGenFlagEntryForArguments returns an entry that matches _arguments -// zsh-completion parameters. It's too complicated to generate in a template. -func zshCompGenFlagEntryForArguments(f *pflag.Flag) string { - if f.Name == "" || f.Shorthand == "" { - return zshCompGenFlagEntryForSingleOptionFlag(f) - } - return zshCompGenFlagEntryForMultiOptionFlag(f) -} - -func zshCompGenFlagEntryForSingleOptionFlag(f *pflag.Flag) string { - var option, multiMark, extras string - - if zshCompFlagCouldBeSpecifiedMoreThenOnce(f) { - multiMark = "*" - } - - option = "--" + f.Name - if option == "--" { - option = "-" + f.Shorthand - } - extras = zshCompGenFlagEntryExtras(f) - - return fmt.Sprintf(`'%s%s[%s]%s'`, multiMark, option, zshCompQuoteFlagDescription(f.Usage), extras) -} - -func zshCompGenFlagEntryForMultiOptionFlag(f *pflag.Flag) string { - var options, parenMultiMark, curlyMultiMark, extras string - - if zshCompFlagCouldBeSpecifiedMoreThenOnce(f) { - parenMultiMark = "*" - curlyMultiMark = "\\*" - } - - options = fmt.Sprintf(`'(%s-%s %s--%s)'{%s-%s,%s--%s}`, - parenMultiMark, f.Shorthand, parenMultiMark, f.Name, curlyMultiMark, f.Shorthand, curlyMultiMark, f.Name) - extras = zshCompGenFlagEntryExtras(f) - - return fmt.Sprintf(`%s'[%s]%s'`, options, zshCompQuoteFlagDescription(f.Usage), extras) +// MarkZshCompPositionalArgumentWords only worked for zsh. It has therefore +// been disabled. +// To achieve the same behavior across all shells, one can use +// ValidArgs (for the first argument only) or ValidArgsFunction for +// any argument (can include the first one also). +// +// Deprecated +func (c *Command) MarkZshCompPositionalArgumentWords(argPosition int, words ...string) error { + return nil } -func zshCompGenFlagEntryExtras(f *pflag.Flag) string { - if f.NoOptDefVal != "" { - return "" - } - - extras := ":" // allow options for flag (even without assistance) - for key, values := range f.Annotations { - switch key { - case zshCompDirname: - extras = fmt.Sprintf(":filename:_files -g %q", values[0]) - case BashCompFilenameExt: - extras = ":filename:_files" - for _, pattern := range values { - extras = extras + fmt.Sprintf(` -g "%s"`, pattern) - } - } +func (c *Command) genZshCompletionFile(filename string, includeDesc bool) error { + outFile, err := os.Create(filename) + if err != nil { + return err } + defer outFile.Close() - return extras -} - -func zshCompFlagCouldBeSpecifiedMoreThenOnce(f *pflag.Flag) bool { - return strings.Contains(f.Value.Type(), "Slice") || - strings.Contains(f.Value.Type(), "Array") -} - -func zshCompQuoteFlagDescription(s string) string { - return strings.Replace(s, "'", `'\''`, -1) + return c.genZshCompletion(outFile, includeDesc) +} + +func (c *Command) genZshCompletion(w io.Writer, includeDesc bool) error { + buf := new(bytes.Buffer) + genZshComp(buf, c.Name(), includeDesc) + _, err := buf.WriteTo(w) + return err +} + +func genZshComp(buf *bytes.Buffer, name string, includeDesc bool) { + compCmd := ShellCompRequestCmd + if !includeDesc { + compCmd = ShellCompNoDescRequestCmd + } + buf.WriteString(fmt.Sprintf(`#compdef _%[1]s %[1]s + +# zsh completion for %-36[1]s -*- shell-script -*- + +__%[1]s_debug() +{ + local file="$BASH_COMP_DEBUG_FILE" + if [[ -n ${file} ]]; then + echo "$*" >> "${file}" + fi +} + +_%[1]s() +{ + local shellCompDirectiveError=%[3]d + local shellCompDirectiveNoSpace=%[4]d + local shellCompDirectiveNoFileComp=%[5]d + local shellCompDirectiveFilterFileExt=%[6]d + local shellCompDirectiveFilterDirs=%[7]d + + local lastParam lastChar flagPrefix requestComp out directive compCount comp lastComp + local -a completions + + __%[1]s_debug "\n========= starting completion logic ==========" + __%[1]s_debug "CURRENT: ${CURRENT}, words[*]: ${words[*]}" + + # The user could have moved the cursor backwards on the command-line. + # We need to trigger completion from the $CURRENT location, so we need + # to truncate the command-line ($words) up to the $CURRENT location. + # (We cannot use $CURSOR as its value does not work when a command is an alias.) + words=("${=words[1,CURRENT]}") + __%[1]s_debug "Truncated words[*]: ${words[*]}," + + lastParam=${words[-1]} + lastChar=${lastParam[-1]} + __%[1]s_debug "lastParam: ${lastParam}, lastChar: ${lastChar}" + + # For zsh, when completing a flag with an = (e.g., %[1]s -n=) + # completions must be prefixed with the flag + setopt local_options BASH_REMATCH + if [[ "${lastParam}" =~ '-.*=' ]]; then + # We are dealing with a flag with an = + flagPrefix="-P ${BASH_REMATCH}" + fi + + # Prepare the command to obtain completions + requestComp="${words[1]} %[2]s ${words[2,-1]}" + if [ "${lastChar}" = "" ]; then + # If the last parameter is complete (there is a space following it) + # We add an extra empty parameter so we can indicate this to the go completion code. + __%[1]s_debug "Adding extra empty parameter" + requestComp="${requestComp} \"\"" + fi + + __%[1]s_debug "About to call: eval ${requestComp}" + + # Use eval to handle any environment variables and such + out=$(eval ${requestComp} 2>/dev/null) + __%[1]s_debug "completion output: ${out}" + + # Extract the directive integer following a : from the last line + local lastLine + while IFS='\n' read -r line; do + lastLine=${line} + done < <(printf "%%s\n" "${out[@]}") + __%[1]s_debug "last line: ${lastLine}" + + if [ "${lastLine[1]}" = : ]; then + directive=${lastLine[2,-1]} + # Remove the directive including the : and the newline + local suffix + (( suffix=${#lastLine}+2)) + out=${out[1,-$suffix]} + else + # There is no directive specified. Leave $out as is. + __%[1]s_debug "No directive found. Setting do default" + directive=0 + fi + + __%[1]s_debug "directive: ${directive}" + __%[1]s_debug "completions: ${out}" + __%[1]s_debug "flagPrefix: ${flagPrefix}" + + if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then + __%[1]s_debug "Completion received error. Ignoring completions." + return + fi + + compCount=0 + while IFS='\n' read -r comp; do + if [ -n "$comp" ]; then + # If requested, completions are returned with a description. + # The description is preceded by a TAB character. + # For zsh's _describe, we need to use a : instead of a TAB. + # We first need to escape any : as part of the completion itself. + comp=${comp//:/\\:} + + local tab=$(printf '\t') + comp=${comp//$tab/:} + + ((compCount++)) + __%[1]s_debug "Adding completion: ${comp}" + completions+=${comp} + lastComp=$comp + fi + done < <(printf "%%s\n" "${out[@]}") + + if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then + # File extension filtering + local filteringCmd + filteringCmd='_files' + for filter in ${completions[@]}; do + if [ ${filter[1]} != '*' ]; then + # zsh requires a glob pattern to do file filtering + filter="\*.$filter" + fi + filteringCmd+=" -g $filter" + done + filteringCmd+=" ${flagPrefix}" + + __%[1]s_debug "File filtering command: $filteringCmd" + _arguments '*:filename:'"$filteringCmd" + elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then + # File completion for directories only + local subDir + subdir="${completions[1]}" + if [ -n "$subdir" ]; then + __%[1]s_debug "Listing directories in $subdir" + pushd "${subdir}" >/dev/null 2>&1 + else + __%[1]s_debug "Listing directories in ." + fi + + _arguments '*:dirname:_files -/'" ${flagPrefix}" + if [ -n "$subdir" ]; then + popd >/dev/null 2>&1 + fi + elif [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ] && [ ${compCount} -eq 1 ]; then + __%[1]s_debug "Activating nospace." + # We can use compadd here as there is no description when + # there is only one completion. + compadd -S '' "${lastComp}" + elif [ ${compCount} -eq 0 ]; then + if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then + __%[1]s_debug "deactivating file completion" + else + # Perform file completion + __%[1]s_debug "activating file completion" + _arguments '*:filename:_files'" ${flagPrefix}" + fi + else + _describe "completions" completions $(echo $flagPrefix) + fi +} + +# don't run the completion function when being source-ed or eval-ed +if [ "$funcstack[1]" = "_%[1]s" ]; then + _%[1]s +fi +`, name, compCmd, + ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp, + ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs)) } diff --git a/vendor/github.com/spf13/cobra/zsh_completions.md b/vendor/github.com/spf13/cobra/zsh_completions.md index df9c2eac..7cff6178 100644 --- a/vendor/github.com/spf13/cobra/zsh_completions.md +++ b/vendor/github.com/spf13/cobra/zsh_completions.md @@ -1,39 +1,48 @@ -## Generating Zsh Completion for your cobra.Command - -Cobra supports native Zsh completion generated from the root `cobra.Command`. -The generated completion script should be put somewhere in your `$fpath` named -`_`. - -### What's Supported - -* Completion for all non-hidden subcommands using their `.Short` description. -* Completion for all non-hidden flags using the following rules: - * Filename completion works by marking the flag with `cmd.MarkFlagFilename...` - family of commands. - * The requirement for argument to the flag is decided by the `.NoOptDefVal` - flag value - if it's empty then completion will expect an argument. - * Flags of one of the various `*Array` and `*Slice` types supports multiple - specifications (with or without argument depending on the specific type). -* Completion of positional arguments using the following rules: - * Argument position for all options below starts at `1`. If argument position - `0` is requested it will raise an error. - * Use `command.MarkZshCompPositionalArgumentFile` to complete filenames. Glob - patterns (e.g. `"*.log"`) are optional - if not specified it will offer to - complete all file types. - * Use `command.MarkZshCompPositionalArgumentWords` to offer specific words for - completion. At least one word is required. - * It's possible to specify completion for some arguments and leave some - unspecified (e.g. offer words for second argument but nothing for first - argument). This will cause no completion for first argument but words - completion for second argument. - * If no argument completion was specified for 1st argument (but optionally was - specified for 2nd) and the command has `ValidArgs` it will be used as - completion options for 1st argument. - * Argument completions only offered for commands with no subcommands. - -### What's not yet Supported - -* Custom completion scripts are not supported yet (We should probably create zsh - specific one, doesn't make sense to re-use the bash one as the functions will - be different). -* Whatever other feature you're looking for and doesn't exist :) +## Generating Zsh Completion For Your cobra.Command + +Please refer to [Shell Completions](shell_completions.md) for details. + +## Zsh completions standardization + +Cobra 1.1 standardized its zsh completion support to align it with its other shell completions. Although the API was kept backwards-compatible, some small changes in behavior were introduced. + +### Deprecation summary + +See further below for more details on these deprecations. + +* `cmd.MarkZshCompPositionalArgumentFile(pos, []string{})` is no longer needed. It is therefore **deprecated** and silently ignored. +* `cmd.MarkZshCompPositionalArgumentFile(pos, glob[])` is **deprecated** and silently ignored. + * Instead use `ValidArgsFunction` with `ShellCompDirectiveFilterFileExt`. +* `cmd.MarkZshCompPositionalArgumentWords()` is **deprecated** and silently ignored. + * Instead use `ValidArgsFunction`. + +### Behavioral changes + +**Noun completion** +|Old behavior|New behavior| +|---|---| +|No file completion by default (opposite of bash)|File completion by default; use `ValidArgsFunction` with `ShellCompDirectiveNoFileComp` to turn off file completion on a per-argument basis| +|Completion of flag names without the `-` prefix having been typed|Flag names are only completed if the user has typed the first `-`| +`cmd.MarkZshCompPositionalArgumentFile(pos, []string{})` used to turn on file completion on a per-argument position basis|File completion for all arguments by default; `cmd.MarkZshCompPositionalArgumentFile()` is **deprecated** and silently ignored| +|`cmd.MarkZshCompPositionalArgumentFile(pos, glob[])` used to turn on file completion **with glob filtering** on a per-argument position basis (zsh-specific)|`cmd.MarkZshCompPositionalArgumentFile()` is **deprecated** and silently ignored; use `ValidArgsFunction` with `ShellCompDirectiveFilterFileExt` for file **extension** filtering (not full glob filtering)| +|`cmd.MarkZshCompPositionalArgumentWords(pos, words[])` used to provide completion choices on a per-argument position basis (zsh-specific)|`cmd.MarkZshCompPositionalArgumentWords()` is **deprecated** and silently ignored; use `ValidArgsFunction` to achieve the same behavior| + +**Flag-value completion** + +|Old behavior|New behavior| +|---|---| +|No file completion by default (opposite of bash)|File completion by default; use `RegisterFlagCompletionFunc()` with `ShellCompDirectiveNoFileComp` to turn off file completion| +|`cmd.MarkFlagFilename(flag, []string{})` and similar used to turn on file completion|File completion by default; `cmd.MarkFlagFilename(flag, []string{})` no longer needed in this context and silently ignored| +|`cmd.MarkFlagFilename(flag, glob[])` used to turn on file completion **with glob filtering** (syntax of `[]string{"*.yaml", "*.yml"}` incompatible with bash)|Will continue to work, however, support for bash syntax is added and should be used instead so as to work for all shells (`[]string{"yaml", "yml"}`)| +|`cmd.MarkFlagDirname(flag)` only completes directories (zsh-specific)|Has been added for all shells| +|Completion of a flag name does not repeat, unless flag is of type `*Array` or `*Slice` (not supported by bash)|Retained for `zsh` and added to `fish`| +|Completion of a flag name does not provide the `=` form (unlike bash)|Retained for `zsh` and added to `fish`| + +**Improvements** + +* Custom completion support (`ValidArgsFunction` and `RegisterFlagCompletionFunc()`) +* File completion by default if no other completions found +* Handling of required flags +* File extension filtering no longer mutually exclusive with bash usage +* Completion of directory names *within* another directory +* Support for `=` form of flags diff --git a/vendor/go.uber.org/atomic/CHANGELOG.md b/vendor/go.uber.org/atomic/CHANGELOG.md index 6db846f1..aef8b6eb 100644 --- a/vendor/go.uber.org/atomic/CHANGELOG.md +++ b/vendor/go.uber.org/atomic/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.6.0] - 2020-02-24 +### Changed +- Drop library dependency on `golang.org/x/{lint, tools}`. + ## [1.5.1] - 2019-11-19 - Fix bug where `Bool.CAS` and `Bool.Toggle` do work correctly together causing `CAS` to fail even though the old value matches. @@ -48,6 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release. +[1.6.0]: https://github.com/uber-go/atomic/compare/v1.5.1...v1.6.0 [1.5.1]: https://github.com/uber-go/atomic/compare/v1.5.0...v1.5.1 [1.5.0]: https://github.com/uber-go/atomic/compare/v1.4.0...v1.5.0 [1.4.0]: https://github.com/uber-go/atomic/compare/v1.3.2...v1.4.0 diff --git a/vendor/go.uber.org/atomic/tools.go b/vendor/go.uber.org/atomic/tools.go deleted file mode 100644 index 654f5b2f..00000000 --- a/vendor/go.uber.org/atomic/tools.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2019 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -// +build tools - -package atomic - -import ( - // Tools used during development. - _ "golang.org/x/lint/golint" -) diff --git a/vendor/go.uber.org/multierr/CHANGELOG.md b/vendor/go.uber.org/multierr/CHANGELOG.md index abb355a0..3110c5af 100644 --- a/vendor/go.uber.org/multierr/CHANGELOG.md +++ b/vendor/go.uber.org/multierr/CHANGELOG.md @@ -1,6 +1,12 @@ Releases ======== +v1.5.0 (2020-02-24) +=================== + +- Drop library dependency on development-time tooling. + + v1.4.0 (2019-11-04) =================== diff --git a/vendor/go.uber.org/multierr/error.go b/vendor/go.uber.org/multierr/error.go index 0ee6fe8b..04eb9618 100644 --- a/vendor/go.uber.org/multierr/error.go +++ b/vendor/go.uber.org/multierr/error.go @@ -130,7 +130,7 @@ type errorGroup interface { } // Errors returns a slice containing zero or more errors that the supplied -// error is composed of. If the error is nil, the returned slice is empty. +// error is composed of. If the error is nil, a nil slice is returned. // // err := multierr.Append(r.Close(), w.Close()) // errors := multierr.Errors(err) diff --git a/vendor/go.uber.org/multierr/go.mod b/vendor/go.uber.org/multierr/go.mod index 5463fac7..58d5f90b 100644 --- a/vendor/go.uber.org/multierr/go.mod +++ b/vendor/go.uber.org/multierr/go.mod @@ -4,7 +4,7 @@ go 1.12 require ( github.com/stretchr/testify v1.3.0 - go.uber.org/atomic v1.5.0 + go.uber.org/atomic v1.6.0 go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee golang.org/x/lint v0.0.0-20190930215403-16217165b5de golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 // indirect diff --git a/vendor/go.uber.org/multierr/go.sum b/vendor/go.uber.org/multierr/go.sum index b460913d..557fbba2 100644 --- a/vendor/go.uber.org/multierr/go.sum +++ b/vendor/go.uber.org/multierr/go.sum @@ -15,8 +15,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -go.uber.org/atomic v1.5.0 h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/vendor/go.uber.org/multierr/tools.go b/vendor/go.uber.org/multierr/tools.go deleted file mode 100644 index df93f072..00000000 --- a/vendor/go.uber.org/multierr/tools.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2019 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -// +build tools - -package multierr - -import ( - // Tools we use during development. - _ "go.uber.org/tools/update-license" - _ "golang.org/x/lint/golint" - _ "honnef.co/go/tools/cmd/staticcheck" -) diff --git a/vendor/go.uber.org/tools/LICENSE b/vendor/go.uber.org/tools/LICENSE deleted file mode 100644 index 858e0247..00000000 --- a/vendor/go.uber.org/tools/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2017 Uber Technologies, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/go.uber.org/tools/update-license/.gitignore b/vendor/go.uber.org/tools/update-license/.gitignore deleted file mode 100644 index b167772c..00000000 --- a/vendor/go.uber.org/tools/update-license/.gitignore +++ /dev/null @@ -1 +0,0 @@ -update-license diff --git a/vendor/go.uber.org/tools/update-license/README.md b/vendor/go.uber.org/tools/update-license/README.md deleted file mode 100644 index 5887df1d..00000000 --- a/vendor/go.uber.org/tools/update-license/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# update-license - -This is a small tool that updates the license header for Uber's open source Golang files. - -## Installation - -``` -go get go.uber.org/tools/update-license -``` - -## Usage - -``` -update-license go_files... -``` - -## Further Work - -* Support more licenses by name (MIT, Apache 2.0, etc), file path, url (http GET) -* Support custom owner (not just "Uber Technologies, Inc.") -* Support more languages than go (cover go, java, js, py to start, along with LICENSE, LICENSE.txt) -* Talk about removing custom logic for header comments (ie `@generated`, `Code generated by`), it probably makes more sense just to put the license at the top -* Better detection support for existing licenses so they can be removed -* Verbose, dry run support diff --git a/vendor/go.uber.org/tools/update-license/licenses.go b/vendor/go.uber.org/tools/update-license/licenses.go deleted file mode 100644 index 76957c21..00000000 --- a/vendor/go.uber.org/tools/update-license/licenses.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2019 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package main - -var licenseTemplates = map[string]string{ - "Apache-2.0": `// Copyright {{.Year}} {{.Owner}} -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License.`, - "MIT": `// Copyright (c) {{.Year}} {{.Owner}} -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE.`, -} diff --git a/vendor/go.uber.org/tools/update-license/main.go b/vendor/go.uber.org/tools/update-license/main.go deleted file mode 100644 index 269fd9b4..00000000 --- a/vendor/go.uber.org/tools/update-license/main.go +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) 2019 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package main - -import ( - "bytes" - "flag" - "fmt" - "html/template" - "io/ioutil" - "log" - "os" - "path/filepath" - "sort" - "strings" - "time" -) - -const ( - // how many lines to check for an existing copyright - // this logic is not great and we should probably do something else - // but this was copied from the python script - copyrightLineLimit = 5 - headerPrefix = "// Copyright" -) - -var ( - flagDryRun = flag.Bool("dry", false, "Do not edit files and just print out what files would be edited") - flagOwner = flag.String("owner", "Uber Technologies, Inc.", "Copyright owner") - flagLicense = flag.String( - "license", - "MIT", - fmt.Sprintf( - "Type of license to use [%s]", - strings.Join(validLicenses(), ", "), - ), - ) - - lineSkipPrefixes = []string{ - "// Code generated by", - "// @generated", - } -) - -func main() { - log.SetFlags(0) - log.SetOutput(os.Stdout) - log.SetPrefix("") - if err := do(); err != nil { - log.Fatal(err) - } -} - -func do() error { - flag.Parse() - - if len(flag.Args()) < 1 { - return fmt.Errorf("usage: %s GO_FILES", os.Args[0]) - } - - return updateFiles( - flag.Args(), - time.Now().UTC().Year(), - *flagLicense, - *flagOwner, - *flagDryRun, - ) -} - -func fullLicense(ts string, year int, owner string) string { - var buf bytes.Buffer - t, err := template.New("").Parse(ts) - if err != nil { - log.Panic("failed to parse license template", err) - } - - data := struct { - Year int - Owner string - }{year, owner} - if err := t.Execute(&buf, data); err != nil { - log.Panic("failed to execture license template", err) - } - - return strings.TrimSpace(buf.String()) -} - -// validLicenses grabs all the license templates from the folder -func validLicenses() []string { - res := make([]string, 0, len(licenseTemplates)) - - for k := range licenseTemplates { - res = append(res, k) - } - - sort.Strings(res) - return res -} - -func updateFiles( - filePaths []string, - year int, - license string, - owner string, - dryRun bool, -) error { - if err := checkFilePaths(filePaths); err != nil { - return err - } - for _, filePath := range filePaths { - if err := updateFile(filePath, year, license, owner, dryRun); err != nil { - return err - } - } - return nil -} - -func checkFilePaths(filePaths []string) error { - for _, filePath := range filePaths { - if filepath.Ext(filePath) != ".go" { - return fmt.Errorf("%s is not a go file", filePath) - } - } - return nil -} - -func updateFile( - filePath string, - year int, - license string, - owner string, - dryRun bool, -) error { - data, err := ioutil.ReadFile(filePath) - if err != nil { - return err - } - newData := updateData(data, year, license, owner) - if !bytes.Equal(data, newData) { - if dryRun { - log.Print(filePath) - return nil - } - // we could do something more complicated so that we do not - // need to pass 0644 as the file mode, but in this case it should - // never actually be used to create a file since we know the file - // already exists, and it's easier to use the ReadFile/WriteFile - // logic as it is right now, and since this is just a generation - // program, this should be acceptable - return ioutil.WriteFile(filePath, newData, 0644) - } - return nil -} - -func updateData( - data []byte, - year int, - license string, - owner string, -) []byte { - licenseText := fullLicense(string(licenseTemplates[license]), year, owner) - - return []byte( - strings.Join( - updateLines(strings.Split(string(data), "\n"), licenseText), - "\n", - ), - ) -} - -// a value in the returned slice may contain newlines itself -func updateLines(lines []string, license string) []string { - for i, line := range lines { - if i >= copyrightLineLimit { - break - } - if strings.HasPrefix(line, headerPrefix) { - // assume that the new license text always starts with the copyright - // string. Pretty safe to assume, right? RIGHT? - lines[i] = strings.Split(license, "\n")[0] - return lines - } - } - return addToLines(lines, license) -} - -// a value in the returned slice may contain newlines itself -func addToLines(lines []string, license string) []string { - i := 0 - for len(lines) > i && lineContainsSkipPrefix(lines[i]) { - i++ - // skip comments under the generated line too - for strings.HasPrefix(lines[i], "//") { - i++ - } - } - if i == 0 { - return append([]string{license, ""}, lines...) - } - return append(lines[0:i], append([]string{"", license}, lines[i:]...)...) -} - -func lineContainsSkipPrefix(line string) bool { - for _, skipPrefix := range lineSkipPrefixes { - if strings.HasPrefix(line, skipPrefix) { - return true - } - } - return false -} diff --git a/vendor/go.uber.org/zap/.travis.yml b/vendor/go.uber.org/zap/.travis.yml index 647b4ee4..cfdc69f4 100644 --- a/vendor/go.uber.org/zap/.travis.yml +++ b/vendor/go.uber.org/zap/.travis.yml @@ -9,8 +9,8 @@ env: matrix: include: - - go: 1.12.x - go: 1.13.x + - go: 1.14.x env: LINT=1 script: diff --git a/vendor/go.uber.org/zap/CHANGELOG.md b/vendor/go.uber.org/zap/CHANGELOG.md index bebdb748..aeff90e4 100644 --- a/vendor/go.uber.org/zap/CHANGELOG.md +++ b/vendor/go.uber.org/zap/CHANGELOG.md @@ -1,5 +1,43 @@ # Changelog +## 1.15.0 (23 Apr 2020) + +Bugfixes: +* [#804][]: Fix handling of `Time` values out of `UnixNano` range. +* [#812][]: Fix `IncreaseLevel` being reset after a call to `With`. + +Enhancements: +* [#806][]: Add `WithCaller` option to supersede the `AddCaller` option. This + allows disabling annotation of log entries with caller information if + previously enabled with `AddCaller`. +* [#813][]: Deprecate `NewSampler` constructor in favor of + `NewSamplerWithOptions` which supports a `SamplerHook` option. This option + adds support for monitoring sampling decisions through a hook. + +Thanks to @danielbprice for their contributions to this release. + +## 1.14.1 (14 Mar 2020) + +Bugfixes: +* [#791][]: Fix panic on attempting to build a logger with an invalid Config. +* [#795][]: Vendoring Zap with `go mod vendor` no longer includes Zap's + development-time dependencies. +* [#799][]: Fix issue introduced in 1.14.0 that caused invalid JSON output to + be generated for arrays of `time.Time` objects when using string-based time + formats. + +Thanks to @YashishDua for their contributions to this release. + +## 1.14.0 (20 Feb 2020) + +Enhancements: +* [#771][]: Optimize calls for disabled log levels. +* [#773][]: Add millisecond duration encoder. +* [#775][]: Add option to increase the level of a logger. +* [#786][]: Optimize time formatters using `Time.AppendFormat` where possible. + +Thanks to @caibirdme for their contributions to this release. + ## 1.13.0 (13 Nov 2019) Enhancements: @@ -350,3 +388,14 @@ upgrade to the upcoming stable release. [#736]: https://github.com/uber-go/zap/pull/736 [#751]: https://github.com/uber-go/zap/pull/751 [#758]: https://github.com/uber-go/zap/pull/758 +[#771]: https://github.com/uber-go/zap/pull/771 +[#773]: https://github.com/uber-go/zap/pull/773 +[#775]: https://github.com/uber-go/zap/pull/775 +[#786]: https://github.com/uber-go/zap/pull/786 +[#791]: https://github.com/uber-go/zap/pull/791 +[#795]: https://github.com/uber-go/zap/pull/795 +[#799]: https://github.com/uber-go/zap/pull/799 +[#804]: https://github.com/uber-go/zap/pull/804 +[#812]: https://github.com/uber-go/zap/pull/812 +[#806]: https://github.com/uber-go/zap/pull/806 +[#813]: https://github.com/uber-go/zap/pull/813 diff --git a/vendor/go.uber.org/zap/Makefile b/vendor/go.uber.org/zap/Makefile index 21e436c4..dfaf6406 100644 --- a/vendor/go.uber.org/zap/Makefile +++ b/vendor/go.uber.org/zap/Makefile @@ -1,6 +1,7 @@ export GOBIN ?= $(shell pwd)/bin GOLINT = $(GOBIN)/golint +STATICCHECK = $(GOBIN)/staticcheck BENCH_FLAGS ?= -cpuprofile=cpu.pprof -memprofile=mem.pprof -benchmem # Directories containing independent Go modules. @@ -17,7 +18,7 @@ GO_FILES := $(shell \ all: lint test .PHONY: lint -lint: $(GOLINT) +lint: $(GOLINT) $(STATICCHECK) @rm -rf lint.log @echo "Checking formatting..." @gofmt -d -s $(GO_FILES) 2>&1 | tee lint.log @@ -25,6 +26,8 @@ lint: $(GOLINT) @$(foreach dir,$(MODULE_DIRS),(cd $(dir) && go vet ./... 2>&1) &&) true | tee -a lint.log @echo "Checking lint..." @$(foreach dir,$(MODULE_DIRS),(cd $(dir) && $(GOLINT) ./... 2>&1) &&) true | tee -a lint.log + @echo "Checking staticcheck..." + @$(foreach dir,$(MODULE_DIRS),(cd $(dir) && $(STATICCHECK) ./... 2>&1) &&) true | tee -a lint.log @echo "Checking for unresolved FIXMEs..." @git grep -i fixme | grep -v -e Makefile | tee -a lint.log @echo "Checking for license headers..." @@ -34,6 +37,9 @@ lint: $(GOLINT) $(GOLINT): go install golang.org/x/lint/golint +$(STATICCHECK): + go install honnef.co/go/tools/cmd/staticcheck + .PHONY: test test: @$(foreach dir,$(MODULE_DIRS),(cd $(dir) && go test -race ./...) &&) true diff --git a/vendor/go.uber.org/zap/buffer/buffer.go b/vendor/go.uber.org/zap/buffer/buffer.go index 7592e8c6..3f4b86e0 100644 --- a/vendor/go.uber.org/zap/buffer/buffer.go +++ b/vendor/go.uber.org/zap/buffer/buffer.go @@ -23,7 +23,10 @@ // package's zero-allocation formatters. package buffer // import "go.uber.org/zap/buffer" -import "strconv" +import ( + "strconv" + "time" +) const _size = 1024 // by default, create 1 KiB buffers @@ -49,6 +52,11 @@ func (b *Buffer) AppendInt(i int64) { b.bs = strconv.AppendInt(b.bs, i, 10) } +// AppendTime appends the time formatted using the specified layout. +func (b *Buffer) AppendTime(t time.Time, layout string) { + b.bs = t.AppendFormat(b.bs, layout) +} + // AppendUint appends an unsigned integer to the underlying buffer (assuming // base 10). func (b *Buffer) AppendUint(i uint64) { diff --git a/vendor/go.uber.org/zap/config.go b/vendor/go.uber.org/zap/config.go index 6fe17d9e..192fd1a9 100644 --- a/vendor/go.uber.org/zap/config.go +++ b/vendor/go.uber.org/zap/config.go @@ -21,6 +21,7 @@ package zap import ( + "fmt" "sort" "time" @@ -31,10 +32,14 @@ import ( // global CPU and I/O load that logging puts on your process while attempting // to preserve a representative subset of your logs. // -// Values configured here are per-second. See zapcore.NewSampler for details. +// If specified, the Sampler will invoke the Hook after each decision. +// +// Values configured here are per-second. See zapcore.NewSamplerWithOptions for +// details. type SamplingConfig struct { - Initial int `json:"initial" yaml:"initial"` - Thereafter int `json:"thereafter" yaml:"thereafter"` + Initial int `json:"initial" yaml:"initial"` + Thereafter int `json:"thereafter" yaml:"thereafter"` + Hook func(zapcore.Entry, zapcore.SamplingDecision) `json:"-" yaml:"-"` } // Config offers a declarative way to construct a logger. It doesn't do @@ -174,6 +179,10 @@ func (cfg Config) Build(opts ...Option) (*Logger, error) { return nil, err } + if cfg.Level == (AtomicLevel{}) { + return nil, fmt.Errorf("missing Level") + } + log := New( zapcore.NewCore(enc, sink, cfg.Level), cfg.buildOptions(errSink)..., @@ -203,9 +212,19 @@ func (cfg Config) buildOptions(errSink zapcore.WriteSyncer) []Option { opts = append(opts, AddStacktrace(stackLevel)) } - if cfg.Sampling != nil { + if scfg := cfg.Sampling; scfg != nil { opts = append(opts, WrapCore(func(core zapcore.Core) zapcore.Core { - return zapcore.NewSampler(core, time.Second, int(cfg.Sampling.Initial), int(cfg.Sampling.Thereafter)) + var samplerOpts []zapcore.SamplerOption + if scfg.Hook != nil { + samplerOpts = append(samplerOpts, zapcore.SamplerHook(scfg.Hook)) + } + return zapcore.NewSamplerWithOptions( + core, + time.Second, + cfg.Sampling.Initial, + cfg.Sampling.Thereafter, + samplerOpts..., + ) })) } diff --git a/vendor/go.uber.org/zap/encoder.go b/vendor/go.uber.org/zap/encoder.go index 2e9d3c34..08ed8335 100644 --- a/vendor/go.uber.org/zap/encoder.go +++ b/vendor/go.uber.org/zap/encoder.go @@ -62,6 +62,10 @@ func RegisterEncoder(name string, constructor func(zapcore.EncoderConfig) (zapco } func newEncoder(name string, encoderConfig zapcore.EncoderConfig) (zapcore.Encoder, error) { + if encoderConfig.TimeKey != "" && encoderConfig.EncodeTime == nil { + return nil, fmt.Errorf("missing EncodeTime in EncoderConfig") + } + _encoderMutex.RLock() defer _encoderMutex.RUnlock() if name == "" { diff --git a/vendor/go.uber.org/zap/field.go b/vendor/go.uber.org/zap/field.go index 83c1ea24..dd558fc2 100644 --- a/vendor/go.uber.org/zap/field.go +++ b/vendor/go.uber.org/zap/field.go @@ -32,6 +32,11 @@ import ( // improves the navigability of this package's API documentation. type Field = zapcore.Field +var ( + _minTimeInt64 = time.Unix(0, math.MinInt64) + _maxTimeInt64 = time.Unix(0, math.MaxInt64) +) + // Skip constructs a no-op field, which is often useful when handling invalid // inputs in other Field constructors. func Skip() Field { @@ -339,6 +344,9 @@ func Stringer(key string, val fmt.Stringer) Field { // Time constructs a Field with the given key and value. The encoder // controls how the time is serialized. func Time(key string, val time.Time) Field { + if val.Before(_minTimeInt64) || val.After(_maxTimeInt64) { + return Field{Key: key, Type: zapcore.TimeFullType, Interface: val} + } return Field{Key: key, Type: zapcore.TimeType, Integer: val.UnixNano(), Interface: val.Location()} } diff --git a/vendor/go.uber.org/zap/go.mod b/vendor/go.uber.org/zap/go.mod index 1fb6bba0..118abda1 100644 --- a/vendor/go.uber.org/zap/go.mod +++ b/vendor/go.uber.org/zap/go.mod @@ -5,7 +5,8 @@ go 1.13 require ( github.com/pkg/errors v0.8.1 github.com/stretchr/testify v1.4.0 - go.uber.org/atomic v1.5.0 - go.uber.org/multierr v1.3.0 + go.uber.org/atomic v1.6.0 + go.uber.org/multierr v1.5.0 golang.org/x/lint v0.0.0-20190930215403-16217165b5de + honnef.co/go/tools v0.0.1-2019.2.3 ) diff --git a/vendor/go.uber.org/zap/go.sum b/vendor/go.uber.org/zap/go.sum index 9ff6735d..99cdb93e 100644 --- a/vendor/go.uber.org/zap/go.sum +++ b/vendor/go.uber.org/zap/go.sum @@ -20,10 +20,10 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -go.uber.org/atomic v1.5.0 h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/multierr v1.3.0 h1:sFPn2GLc3poCkfrpIXGhBD2X0CMIo4Q/zSULXrj/+uc= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/vendor/go.uber.org/zap/logger.go b/vendor/go.uber.org/zap/logger.go index dc8f6e3a..cd6e1955 100644 --- a/vendor/go.uber.org/zap/logger.go +++ b/vendor/go.uber.org/zap/logger.go @@ -258,6 +258,12 @@ func (log *Logger) check(lvl zapcore.Level, msg string) *zapcore.CheckedEntry { // (e.g., Check, Info, Fatal). const callerSkipOffset = 2 + // Check the level first to reduce the cost of disabled log calls. + // Since Panic and higher may exit, we skip the optimization for those levels. + if lvl < zapcore.DPanicLevel && !log.core.Enabled(lvl) { + return nil + } + // Create basic checked entry thru the core; this will be non-nil if the // log message will actually be written somewhere. ent := zapcore.Entry{ diff --git a/vendor/go.uber.org/zap/options.go b/vendor/go.uber.org/zap/options.go index 7a6b0fca..59f1b54a 100644 --- a/vendor/go.uber.org/zap/options.go +++ b/vendor/go.uber.org/zap/options.go @@ -20,7 +20,11 @@ package zap -import "go.uber.org/zap/zapcore" +import ( + "fmt" + + "go.uber.org/zap/zapcore" +) // An Option configures a Logger. type Option interface { @@ -83,10 +87,17 @@ func Development() Option { } // AddCaller configures the Logger to annotate each message with the filename -// and line number of zap's caller. +// and line number of zap's caller. See also WithCaller. func AddCaller() Option { + return WithCaller(true) +} + +// WithCaller configures the Logger to annotate each message with the filename +// and line number of zap's caller, or not, depending on the value of enabled. +// This is a generalized form of AddCaller. +func WithCaller(enabled bool) Option { return optionFunc(func(log *Logger) { - log.addCaller = true + log.addCaller = enabled }) } @@ -107,3 +118,16 @@ func AddStacktrace(lvl zapcore.LevelEnabler) Option { log.addStack = lvl }) } + +// IncreaseLevel increase the level of the logger. It has no effect if +// the passed in level tries to decrease the level of the logger. +func IncreaseLevel(lvl zapcore.LevelEnabler) Option { + return optionFunc(func(log *Logger) { + core, err := zapcore.NewIncreaseLevelCore(log.core, lvl) + if err != nil { + fmt.Fprintf(log.errorOutput, "failed to IncreaseLevel: %v", err) + } else { + log.core = core + } + }) +} diff --git a/vendor/go.uber.org/zap/tools.go b/vendor/go.uber.org/zap/tools.go deleted file mode 100644 index 2b6366be..00000000 --- a/vendor/go.uber.org/zap/tools.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2019 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -// +build tools - -package zap - -import ( - // Tools we use during development. - _ "golang.org/x/lint/golint" -) diff --git a/vendor/go.uber.org/zap/zapcore/encoder.go b/vendor/go.uber.org/zap/zapcore/encoder.go index 5e0a69be..6c78f7e4 100644 --- a/vendor/go.uber.org/zap/zapcore/encoder.go +++ b/vendor/go.uber.org/zap/zapcore/encoder.go @@ -112,21 +112,43 @@ func EpochNanosTimeEncoder(t time.Time, enc PrimitiveArrayEncoder) { enc.AppendInt64(t.UnixNano()) } +func encodeTimeLayout(t time.Time, layout string, enc PrimitiveArrayEncoder) { + type appendTimeEncoder interface { + AppendTimeLayout(time.Time, string) + } + + if enc, ok := enc.(appendTimeEncoder); ok { + enc.AppendTimeLayout(t, layout) + return + } + + enc.AppendString(t.Format(layout)) +} + // ISO8601TimeEncoder serializes a time.Time to an ISO8601-formatted string // with millisecond precision. +// +// If enc supports AppendTimeLayout(t time.Time,layout string), it's used +// instead of appending a pre-formatted string value. func ISO8601TimeEncoder(t time.Time, enc PrimitiveArrayEncoder) { - enc.AppendString(t.Format("2006-01-02T15:04:05.000Z0700")) + encodeTimeLayout(t, "2006-01-02T15:04:05.000Z0700", enc) } // RFC3339TimeEncoder serializes a time.Time to an RFC3339-formatted string. +// +// If enc supports AppendTimeLayout(t time.Time,layout string), it's used +// instead of appending a pre-formatted string value. func RFC3339TimeEncoder(t time.Time, enc PrimitiveArrayEncoder) { - enc.AppendString(t.Format(time.RFC3339)) + encodeTimeLayout(t, time.RFC3339, enc) } // RFC3339NanoTimeEncoder serializes a time.Time to an RFC3339-formatted string // with nanosecond precision. +// +// If enc supports AppendTimeLayout(t time.Time,layout string), it's used +// instead of appending a pre-formatted string value. func RFC3339NanoTimeEncoder(t time.Time, enc PrimitiveArrayEncoder) { - enc.AppendString(t.Format(time.RFC3339Nano)) + encodeTimeLayout(t, time.RFC3339Nano, enc) } // UnmarshalText unmarshals text to a TimeEncoder. @@ -168,6 +190,12 @@ func NanosDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) { enc.AppendInt64(int64(d)) } +// MillisDurationEncoder serializes a time.Duration to an integer number of +// milliseconds elapsed. +func MillisDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) { + enc.AppendInt64(d.Nanoseconds() / 1e6) +} + // StringDurationEncoder serializes a time.Duration using its built-in String // method. func StringDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) { @@ -183,6 +211,8 @@ func (e *DurationEncoder) UnmarshalText(text []byte) error { *e = StringDurationEncoder case "nanos": *e = NanosDurationEncoder + case "ms": + *e = MillisDurationEncoder default: *e = SecondsDurationEncoder } diff --git a/vendor/go.uber.org/zap/zapcore/error.go b/vendor/go.uber.org/zap/zapcore/error.go index a67c7bac..9ba2272c 100644 --- a/vendor/go.uber.org/zap/zapcore/error.go +++ b/vendor/go.uber.org/zap/zapcore/error.go @@ -66,11 +66,6 @@ type errorGroup interface { Errors() []error } -type causer interface { - // Provides access to the error that caused this error. - Cause() error -} - // Note that errArry and errArrayElem are very similar to the version // implemented in the top-level error.go file. We can't re-use this because // that would require exporting errArray as part of the zapcore API. diff --git a/vendor/go.uber.org/zap/zapcore/field.go b/vendor/go.uber.org/zap/zapcore/field.go index ae772e4a..6e05f831 100644 --- a/vendor/go.uber.org/zap/zapcore/field.go +++ b/vendor/go.uber.org/zap/zapcore/field.go @@ -65,8 +65,11 @@ const ( Int8Type // StringType indicates that the field carries a string. StringType - // TimeType indicates that the field carries a time.Time. + // TimeType indicates that the field carries a time.Time that is + // representable by a UnixNano() stored as an int64. TimeType + // TimeFullType indicates that the field carries a time.Time stored as-is. + TimeFullType // Uint64Type indicates that the field carries a uint64. Uint64Type // Uint32Type indicates that the field carries a uint32. @@ -145,6 +148,8 @@ func (f Field) AddTo(enc ObjectEncoder) { // Fall back to UTC if location is nil. enc.AddTime(f.Key, time.Unix(0, f.Integer)) } + case TimeFullType: + enc.AddTime(f.Key, f.Interface.(time.Time)) case Uint64Type: enc.AddUint64(f.Key, uint64(f.Integer)) case Uint32Type: diff --git a/vendor/go.uber.org/zap/zapcore/increase_level.go b/vendor/go.uber.org/zap/zapcore/increase_level.go new file mode 100644 index 00000000..5a174926 --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/increase_level.go @@ -0,0 +1,66 @@ +// Copyright (c) 2020 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +import "fmt" + +type levelFilterCore struct { + core Core + level LevelEnabler +} + +// NewIncreaseLevelCore creates a core that can be used to increase the level of +// an existing Core. It cannot be used to decrease the logging level, as it acts +// as a filter before calling the underlying core. If level decreases the log level, +// an error is returned. +func NewIncreaseLevelCore(core Core, level LevelEnabler) (Core, error) { + for l := _maxLevel; l >= _minLevel; l-- { + if !core.Enabled(l) && level.Enabled(l) { + return nil, fmt.Errorf("invalid increase level, as level %q is allowed by increased level, but not by existing core", l) + } + } + + return &levelFilterCore{core, level}, nil +} + +func (c *levelFilterCore) Enabled(lvl Level) bool { + return c.level.Enabled(lvl) +} + +func (c *levelFilterCore) With(fields []Field) Core { + return &levelFilterCore{c.core.With(fields), c.level} +} + +func (c *levelFilterCore) Check(ent Entry, ce *CheckedEntry) *CheckedEntry { + if !c.Enabled(ent.Level) { + return ce + } + + return c.core.Check(ent, ce) +} + +func (c *levelFilterCore) Write(ent Entry, fields []Field) error { + return c.core.Write(ent, fields) +} + +func (c *levelFilterCore) Sync() error { + return c.core.Sync() +} diff --git a/vendor/go.uber.org/zap/zapcore/json_encoder.go b/vendor/go.uber.org/zap/zapcore/json_encoder.go index 56256be8..7facc1b3 100644 --- a/vendor/go.uber.org/zap/zapcore/json_encoder.go +++ b/vendor/go.uber.org/zap/zapcore/json_encoder.go @@ -266,6 +266,13 @@ func (enc *jsonEncoder) AppendString(val string) { enc.buf.AppendByte('"') } +func (enc *jsonEncoder) AppendTimeLayout(time time.Time, layout string) { + enc.addElementSeparator() + enc.buf.AppendByte('"') + enc.buf.AppendTime(time, layout) + enc.buf.AppendByte('"') +} + func (enc *jsonEncoder) AppendTime(val time.Time) { cur := enc.buf.Len() enc.EncodeTime(val, enc) diff --git a/vendor/go.uber.org/zap/zapcore/sampler.go b/vendor/go.uber.org/zap/zapcore/sampler.go index e3164186..25f10ca1 100644 --- a/vendor/go.uber.org/zap/zapcore/sampler.go +++ b/vendor/go.uber.org/zap/zapcore/sampler.go @@ -81,33 +81,104 @@ func (c *counter) IncCheckReset(t time.Time, tick time.Duration) uint64 { return 1 } -type sampler struct { - Core +// SamplingDecision is a decision represented as a bit field made by sampler. +// More decisions may be added in the future. +type SamplingDecision uint32 - counts *counters - tick time.Duration - first, thereafter uint64 +const ( + // LogDropped indicates that the Sampler dropped a log entry. + LogDropped SamplingDecision = 1 << iota + // LogSampled indicates that the Sampler sampled a log entry. + LogSampled +) + +// optionFunc wraps a func so it satisfies the SamplerOption interface. +type optionFunc func(*sampler) + +func (f optionFunc) apply(s *sampler) { + f(s) +} + +// SamplerOption configures a Sampler. +type SamplerOption interface { + apply(*sampler) } -// NewSampler creates a Core that samples incoming entries, which caps the CPU -// and I/O load of logging while attempting to preserve a representative subset -// of your logs. +// nopSamplingHook is the default hook used by sampler. +func nopSamplingHook(Entry, SamplingDecision) {} + +// SamplerHook registers a function which will be called when Sampler makes a +// decision. +// +// This hook may be used to get visibility into the performance of the sampler. +// For example, use it to track metrics of dropped versus sampled logs. +// +// var dropped atomic.Int64 +// zapcore.SamplerHook(func(ent zapcore.Entry, dec zapcore.SamplingDecision) { +// if dec&zapcore.LogDropped > 0 { +// dropped.Inc() +// } +// }) +func SamplerHook(hook func(entry Entry, dec SamplingDecision)) SamplerOption { + return optionFunc(func(s *sampler) { + s.hook = hook + }) +} + +// NewSamplerWithOptions creates a Core that samples incoming entries, which +// caps the CPU and I/O load of logging while attempting to preserve a +// representative subset of your logs. // // Zap samples by logging the first N entries with a given level and message // each tick. If more Entries with the same level and message are seen during // the same interval, every Mth message is logged and the rest are dropped. // +// Sampler can be configured to report sampling decisions with the SamplerHook +// option. +// // Keep in mind that zap's sampling implementation is optimized for speed over // absolute precision; under load, each tick may be slightly over- or // under-sampled. -func NewSampler(core Core, tick time.Duration, first, thereafter int) Core { - return &sampler{ +func NewSamplerWithOptions(core Core, tick time.Duration, first, thereafter int, opts ...SamplerOption) Core { + s := &sampler{ Core: core, tick: tick, counts: newCounters(), first: uint64(first), thereafter: uint64(thereafter), + hook: nopSamplingHook, } + for _, opt := range opts { + opt.apply(s) + } + + return s +} + +type sampler struct { + Core + + counts *counters + tick time.Duration + first, thereafter uint64 + hook func(Entry, SamplingDecision) +} + +// NewSampler creates a Core that samples incoming entries, which +// caps the CPU and I/O load of logging while attempting to preserve a +// representative subset of your logs. +// +// Zap samples by logging the first N entries with a given level and message +// each tick. If more Entries with the same level and message are seen during +// the same interval, every Mth message is logged and the rest are dropped. +// +// Keep in mind that zap's sampling implementation is optimized for speed over +// absolute precision; under load, each tick may be slightly over- or +// under-sampled. +// +// Deprecated: use NewSamplerWithOptions. +func NewSampler(core Core, tick time.Duration, first, thereafter int) Core { + return NewSamplerWithOptions(core, tick, first, thereafter) } func (s *sampler) With(fields []Field) Core { @@ -117,6 +188,7 @@ func (s *sampler) With(fields []Field) Core { counts: s.counts, first: s.first, thereafter: s.thereafter, + hook: s.hook, } } @@ -128,7 +200,9 @@ func (s *sampler) Check(ent Entry, ce *CheckedEntry) *CheckedEntry { counter := s.counts.get(ent.Level, ent.Message) n := counter.IncCheckReset(ent.Time, s.tick) if n > s.first && (n-s.first)%s.thereafter != 0 { + s.hook(ent, LogDropped) return ce } + s.hook(ent, LogSampled) return s.Core.Check(ent, ce) } diff --git a/vendor/golang.org/x/crypto/bcrypt/base64.go b/vendor/golang.org/x/crypto/bcrypt/base64.go deleted file mode 100644 index fc311609..00000000 --- a/vendor/golang.org/x/crypto/bcrypt/base64.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package bcrypt - -import "encoding/base64" - -const alphabet = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" - -var bcEncoding = base64.NewEncoding(alphabet) - -func base64Encode(src []byte) []byte { - n := bcEncoding.EncodedLen(len(src)) - dst := make([]byte, n) - bcEncoding.Encode(dst, src) - for dst[n-1] == '=' { - n-- - } - return dst[:n] -} - -func base64Decode(src []byte) ([]byte, error) { - numOfEquals := 4 - (len(src) % 4) - for i := 0; i < numOfEquals; i++ { - src = append(src, '=') - } - - dst := make([]byte, bcEncoding.DecodedLen(len(src))) - n, err := bcEncoding.Decode(dst, src) - if err != nil { - return nil, err - } - return dst[:n], nil -} diff --git a/vendor/golang.org/x/crypto/bcrypt/bcrypt.go b/vendor/golang.org/x/crypto/bcrypt/bcrypt.go deleted file mode 100644 index aeb73f81..00000000 --- a/vendor/golang.org/x/crypto/bcrypt/bcrypt.go +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package bcrypt implements Provos and Mazières's bcrypt adaptive hashing -// algorithm. See http://www.usenix.org/event/usenix99/provos/provos.pdf -package bcrypt // import "golang.org/x/crypto/bcrypt" - -// The code is a port of Provos and Mazières's C implementation. -import ( - "crypto/rand" - "crypto/subtle" - "errors" - "fmt" - "io" - "strconv" - - "golang.org/x/crypto/blowfish" -) - -const ( - MinCost int = 4 // the minimum allowable cost as passed in to GenerateFromPassword - MaxCost int = 31 // the maximum allowable cost as passed in to GenerateFromPassword - DefaultCost int = 10 // the cost that will actually be set if a cost below MinCost is passed into GenerateFromPassword -) - -// The error returned from CompareHashAndPassword when a password and hash do -// not match. -var ErrMismatchedHashAndPassword = errors.New("crypto/bcrypt: hashedPassword is not the hash of the given password") - -// The error returned from CompareHashAndPassword when a hash is too short to -// be a bcrypt hash. -var ErrHashTooShort = errors.New("crypto/bcrypt: hashedSecret too short to be a bcrypted password") - -// The error returned from CompareHashAndPassword when a hash was created with -// a bcrypt algorithm newer than this implementation. -type HashVersionTooNewError byte - -func (hv HashVersionTooNewError) Error() string { - return fmt.Sprintf("crypto/bcrypt: bcrypt algorithm version '%c' requested is newer than current version '%c'", byte(hv), majorVersion) -} - -// The error returned from CompareHashAndPassword when a hash starts with something other than '$' -type InvalidHashPrefixError byte - -func (ih InvalidHashPrefixError) Error() string { - return fmt.Sprintf("crypto/bcrypt: bcrypt hashes must start with '$', but hashedSecret started with '%c'", byte(ih)) -} - -type InvalidCostError int - -func (ic InvalidCostError) Error() string { - return fmt.Sprintf("crypto/bcrypt: cost %d is outside allowed range (%d,%d)", int(ic), int(MinCost), int(MaxCost)) -} - -const ( - majorVersion = '2' - minorVersion = 'a' - maxSaltSize = 16 - maxCryptedHashSize = 23 - encodedSaltSize = 22 - encodedHashSize = 31 - minHashSize = 59 -) - -// magicCipherData is an IV for the 64 Blowfish encryption calls in -// bcrypt(). It's the string "OrpheanBeholderScryDoubt" in big-endian bytes. -var magicCipherData = []byte{ - 0x4f, 0x72, 0x70, 0x68, - 0x65, 0x61, 0x6e, 0x42, - 0x65, 0x68, 0x6f, 0x6c, - 0x64, 0x65, 0x72, 0x53, - 0x63, 0x72, 0x79, 0x44, - 0x6f, 0x75, 0x62, 0x74, -} - -type hashed struct { - hash []byte - salt []byte - cost int // allowed range is MinCost to MaxCost - major byte - minor byte -} - -// GenerateFromPassword returns the bcrypt hash of the password at the given -// cost. If the cost given is less than MinCost, the cost will be set to -// DefaultCost, instead. Use CompareHashAndPassword, as defined in this package, -// to compare the returned hashed password with its cleartext version. -func GenerateFromPassword(password []byte, cost int) ([]byte, error) { - p, err := newFromPassword(password, cost) - if err != nil { - return nil, err - } - return p.Hash(), nil -} - -// CompareHashAndPassword compares a bcrypt hashed password with its possible -// plaintext equivalent. Returns nil on success, or an error on failure. -func CompareHashAndPassword(hashedPassword, password []byte) error { - p, err := newFromHash(hashedPassword) - if err != nil { - return err - } - - otherHash, err := bcrypt(password, p.cost, p.salt) - if err != nil { - return err - } - - otherP := &hashed{otherHash, p.salt, p.cost, p.major, p.minor} - if subtle.ConstantTimeCompare(p.Hash(), otherP.Hash()) == 1 { - return nil - } - - return ErrMismatchedHashAndPassword -} - -// Cost returns the hashing cost used to create the given hashed -// password. When, in the future, the hashing cost of a password system needs -// to be increased in order to adjust for greater computational power, this -// function allows one to establish which passwords need to be updated. -func Cost(hashedPassword []byte) (int, error) { - p, err := newFromHash(hashedPassword) - if err != nil { - return 0, err - } - return p.cost, nil -} - -func newFromPassword(password []byte, cost int) (*hashed, error) { - if cost < MinCost { - cost = DefaultCost - } - p := new(hashed) - p.major = majorVersion - p.minor = minorVersion - - err := checkCost(cost) - if err != nil { - return nil, err - } - p.cost = cost - - unencodedSalt := make([]byte, maxSaltSize) - _, err = io.ReadFull(rand.Reader, unencodedSalt) - if err != nil { - return nil, err - } - - p.salt = base64Encode(unencodedSalt) - hash, err := bcrypt(password, p.cost, p.salt) - if err != nil { - return nil, err - } - p.hash = hash - return p, err -} - -func newFromHash(hashedSecret []byte) (*hashed, error) { - if len(hashedSecret) < minHashSize { - return nil, ErrHashTooShort - } - p := new(hashed) - n, err := p.decodeVersion(hashedSecret) - if err != nil { - return nil, err - } - hashedSecret = hashedSecret[n:] - n, err = p.decodeCost(hashedSecret) - if err != nil { - return nil, err - } - hashedSecret = hashedSecret[n:] - - // The "+2" is here because we'll have to append at most 2 '=' to the salt - // when base64 decoding it in expensiveBlowfishSetup(). - p.salt = make([]byte, encodedSaltSize, encodedSaltSize+2) - copy(p.salt, hashedSecret[:encodedSaltSize]) - - hashedSecret = hashedSecret[encodedSaltSize:] - p.hash = make([]byte, len(hashedSecret)) - copy(p.hash, hashedSecret) - - return p, nil -} - -func bcrypt(password []byte, cost int, salt []byte) ([]byte, error) { - cipherData := make([]byte, len(magicCipherData)) - copy(cipherData, magicCipherData) - - c, err := expensiveBlowfishSetup(password, uint32(cost), salt) - if err != nil { - return nil, err - } - - for i := 0; i < 24; i += 8 { - for j := 0; j < 64; j++ { - c.Encrypt(cipherData[i:i+8], cipherData[i:i+8]) - } - } - - // Bug compatibility with C bcrypt implementations. We only encode 23 of - // the 24 bytes encrypted. - hsh := base64Encode(cipherData[:maxCryptedHashSize]) - return hsh, nil -} - -func expensiveBlowfishSetup(key []byte, cost uint32, salt []byte) (*blowfish.Cipher, error) { - csalt, err := base64Decode(salt) - if err != nil { - return nil, err - } - - // Bug compatibility with C bcrypt implementations. They use the trailing - // NULL in the key string during expansion. - // We copy the key to prevent changing the underlying array. - ckey := append(key[:len(key):len(key)], 0) - - c, err := blowfish.NewSaltedCipher(ckey, csalt) - if err != nil { - return nil, err - } - - var i, rounds uint64 - rounds = 1 << cost - for i = 0; i < rounds; i++ { - blowfish.ExpandKey(ckey, c) - blowfish.ExpandKey(csalt, c) - } - - return c, nil -} - -func (p *hashed) Hash() []byte { - arr := make([]byte, 60) - arr[0] = '$' - arr[1] = p.major - n := 2 - if p.minor != 0 { - arr[2] = p.minor - n = 3 - } - arr[n] = '$' - n++ - copy(arr[n:], []byte(fmt.Sprintf("%02d", p.cost))) - n += 2 - arr[n] = '$' - n++ - copy(arr[n:], p.salt) - n += encodedSaltSize - copy(arr[n:], p.hash) - n += encodedHashSize - return arr[:n] -} - -func (p *hashed) decodeVersion(sbytes []byte) (int, error) { - if sbytes[0] != '$' { - return -1, InvalidHashPrefixError(sbytes[0]) - } - if sbytes[1] > majorVersion { - return -1, HashVersionTooNewError(sbytes[1]) - } - p.major = sbytes[1] - n := 3 - if sbytes[2] != '$' { - p.minor = sbytes[2] - n++ - } - return n, nil -} - -// sbytes should begin where decodeVersion left off. -func (p *hashed) decodeCost(sbytes []byte) (int, error) { - cost, err := strconv.Atoi(string(sbytes[0:2])) - if err != nil { - return -1, err - } - err = checkCost(cost) - if err != nil { - return -1, err - } - p.cost = cost - return 3, nil -} - -func (p *hashed) String() string { - return fmt.Sprintf("&{hash: %#v, salt: %#v, cost: %d, major: %c, minor: %c}", string(p.hash), p.salt, p.cost, p.major, p.minor) -} - -func checkCost(cost int) error { - if cost < MinCost || cost > MaxCost { - return InvalidCostError(cost) - } - return nil -} diff --git a/vendor/golang.org/x/crypto/ssh/kex.go b/vendor/golang.org/x/crypto/ssh/kex.go index 7eedb209..766e9293 100644 --- a/vendor/golang.org/x/crypto/ssh/kex.go +++ b/vendor/golang.org/x/crypto/ssh/kex.go @@ -557,8 +557,6 @@ type dhGEXSHA struct { hashFunc crypto.Hash } -const numMRTests = 64 - const ( dhGroupExchangeMinimumBits = 2048 dhGroupExchangePreferredBits = 2048 @@ -602,15 +600,8 @@ func (gex dhGEXSHA) Client(c packetConn, randSource io.Reader, magics *handshake gex.p = kexDHGexGroup.P gex.g = kexDHGexGroup.G - // Check if p is safe by verifing that p and (p-1)/2 are primes - one := big.NewInt(1) - var pHalf = &big.Int{} - pHalf.Rsh(gex.p, 1) - if !gex.p.ProbablyPrime(numMRTests) || !pHalf.ProbablyPrime(numMRTests) { - return nil, fmt.Errorf("ssh: server provided gex p is not safe") - } - // Check if g is safe by verifing that g > 1 and g < p - 1 + one := big.NewInt(1) var pMinusOne = &big.Int{} pMinusOne.Sub(gex.p, one) if gex.g.Cmp(one) != 1 && gex.g.Cmp(pMinusOne) != -1 { @@ -618,6 +609,8 @@ func (gex dhGEXSHA) Client(c packetConn, randSource io.Reader, magics *handshake } // Send GexInit + var pHalf = &big.Int{} + pHalf.Rsh(gex.p, 1) x, err := rand.Int(randSource, pHalf) if err != nil { return nil, err diff --git a/vendor/golang.org/x/net/html/const.go b/vendor/golang.org/x/net/html/const.go index 73804d34..ff7acf2d 100644 --- a/vendor/golang.org/x/net/html/const.go +++ b/vendor/golang.org/x/net/html/const.go @@ -52,7 +52,7 @@ var isSpecialElementMap = map[string]bool{ "iframe": true, "img": true, "input": true, - "keygen": true, + "keygen": true, // "keygen" has been removed from the spec, but are kept here for backwards compatibility. "li": true, "link": true, "listing": true, diff --git a/vendor/golang.org/x/net/html/foreign.go b/vendor/golang.org/x/net/html/foreign.go index 74774c45..9da9e9dc 100644 --- a/vendor/golang.org/x/net/html/foreign.go +++ b/vendor/golang.org/x/net/html/foreign.go @@ -161,65 +161,62 @@ var mathMLAttributeAdjustments = map[string]string{ } var svgAttributeAdjustments = map[string]string{ - "attributename": "attributeName", - "attributetype": "attributeType", - "basefrequency": "baseFrequency", - "baseprofile": "baseProfile", - "calcmode": "calcMode", - "clippathunits": "clipPathUnits", - "contentscripttype": "contentScriptType", - "contentstyletype": "contentStyleType", - "diffuseconstant": "diffuseConstant", - "edgemode": "edgeMode", - "externalresourcesrequired": "externalResourcesRequired", - "filterunits": "filterUnits", - "glyphref": "glyphRef", - "gradienttransform": "gradientTransform", - "gradientunits": "gradientUnits", - "kernelmatrix": "kernelMatrix", - "kernelunitlength": "kernelUnitLength", - "keypoints": "keyPoints", - "keysplines": "keySplines", - "keytimes": "keyTimes", - "lengthadjust": "lengthAdjust", - "limitingconeangle": "limitingConeAngle", - "markerheight": "markerHeight", - "markerunits": "markerUnits", - "markerwidth": "markerWidth", - "maskcontentunits": "maskContentUnits", - "maskunits": "maskUnits", - "numoctaves": "numOctaves", - "pathlength": "pathLength", - "patterncontentunits": "patternContentUnits", - "patterntransform": "patternTransform", - "patternunits": "patternUnits", - "pointsatx": "pointsAtX", - "pointsaty": "pointsAtY", - "pointsatz": "pointsAtZ", - "preservealpha": "preserveAlpha", - "preserveaspectratio": "preserveAspectRatio", - "primitiveunits": "primitiveUnits", - "refx": "refX", - "refy": "refY", - "repeatcount": "repeatCount", - "repeatdur": "repeatDur", - "requiredextensions": "requiredExtensions", - "requiredfeatures": "requiredFeatures", - "specularconstant": "specularConstant", - "specularexponent": "specularExponent", - "spreadmethod": "spreadMethod", - "startoffset": "startOffset", - "stddeviation": "stdDeviation", - "stitchtiles": "stitchTiles", - "surfacescale": "surfaceScale", - "systemlanguage": "systemLanguage", - "tablevalues": "tableValues", - "targetx": "targetX", - "targety": "targetY", - "textlength": "textLength", - "viewbox": "viewBox", - "viewtarget": "viewTarget", - "xchannelselector": "xChannelSelector", - "ychannelselector": "yChannelSelector", - "zoomandpan": "zoomAndPan", + "attributename": "attributeName", + "attributetype": "attributeType", + "basefrequency": "baseFrequency", + "baseprofile": "baseProfile", + "calcmode": "calcMode", + "clippathunits": "clipPathUnits", + "diffuseconstant": "diffuseConstant", + "edgemode": "edgeMode", + "filterunits": "filterUnits", + "glyphref": "glyphRef", + "gradienttransform": "gradientTransform", + "gradientunits": "gradientUnits", + "kernelmatrix": "kernelMatrix", + "kernelunitlength": "kernelUnitLength", + "keypoints": "keyPoints", + "keysplines": "keySplines", + "keytimes": "keyTimes", + "lengthadjust": "lengthAdjust", + "limitingconeangle": "limitingConeAngle", + "markerheight": "markerHeight", + "markerunits": "markerUnits", + "markerwidth": "markerWidth", + "maskcontentunits": "maskContentUnits", + "maskunits": "maskUnits", + "numoctaves": "numOctaves", + "pathlength": "pathLength", + "patterncontentunits": "patternContentUnits", + "patterntransform": "patternTransform", + "patternunits": "patternUnits", + "pointsatx": "pointsAtX", + "pointsaty": "pointsAtY", + "pointsatz": "pointsAtZ", + "preservealpha": "preserveAlpha", + "preserveaspectratio": "preserveAspectRatio", + "primitiveunits": "primitiveUnits", + "refx": "refX", + "refy": "refY", + "repeatcount": "repeatCount", + "repeatdur": "repeatDur", + "requiredextensions": "requiredExtensions", + "requiredfeatures": "requiredFeatures", + "specularconstant": "specularConstant", + "specularexponent": "specularExponent", + "spreadmethod": "spreadMethod", + "startoffset": "startOffset", + "stddeviation": "stdDeviation", + "stitchtiles": "stitchTiles", + "surfacescale": "surfaceScale", + "systemlanguage": "systemLanguage", + "tablevalues": "tableValues", + "targetx": "targetX", + "targety": "targetY", + "textlength": "textLength", + "viewbox": "viewBox", + "viewtarget": "viewTarget", + "xchannelselector": "xChannelSelector", + "ychannelselector": "yChannelSelector", + "zoomandpan": "zoomAndPan", } diff --git a/vendor/golang.org/x/net/html/parse.go b/vendor/golang.org/x/net/html/parse.go index 2cd12fc8..f91466f7 100644 --- a/vendor/golang.org/x/net/html/parse.go +++ b/vendor/golang.org/x/net/html/parse.go @@ -728,7 +728,13 @@ func inHeadNoscriptIM(p *parser) bool { return inBodyIM(p) case a.Basefont, a.Bgsound, a.Link, a.Meta, a.Noframes, a.Style: return inHeadIM(p) - case a.Head, a.Noscript: + case a.Head: + // Ignore the token. + return true + case a.Noscript: + // Don't let the tokenizer go into raw text mode even when a