Skip to content

Commit

Permalink
Fix client-pkg import paths (#1931)
Browse files Browse the repository at this point in the history
* Fix client-pkg import paths

* Fix imports
  • Loading branch information
dsimansk committed Mar 27, 2024
1 parent 5c152bd commit cbb6f5c
Show file tree
Hide file tree
Showing 20 changed files with 1,033 additions and 99 deletions.
20 changes: 10 additions & 10 deletions go.mod
Expand Up @@ -20,12 +20,12 @@ require (
k8s.io/cli-runtime v0.29.2
k8s.io/client-go v0.29.2
k8s.io/code-generator v0.29.2
knative.dev/client-pkg v0.0.0-20240313113642-ca457df5ea78
knative.dev/eventing v0.40.1-0.20240318205837-63068bd53ae6
knative.dev/hack v0.0.0-20240318013248-424e75ed769a
knative.dev/networking v0.0.0-20240318132715-69566347ab2a
knative.dev/pkg v0.0.0-20240318073042-db6f3b074e8c
knative.dev/serving v0.40.1-0.20240319121315-da63b4a570fe
knative.dev/client-pkg v0.0.0-20240327121233-6984d81a90ec
knative.dev/eventing v0.40.1-0.20240327131403-47543259ceba
knative.dev/hack v0.0.0-20240327150553-47368d631660
knative.dev/networking v0.0.0-20240327140628-ae039896b125
knative.dev/pkg v0.0.0-20240327140624-1ca1f09c329e
knative.dev/serving v0.40.1-0.20240327150557-17df21964e1d
sigs.k8s.io/yaml v1.4.0
)

Expand Down Expand Up @@ -87,7 +87,7 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.19.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.50.0 // indirect
github.com/prometheus/common v0.51.1 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/prometheus/statsd_exporter v0.22.8 // indirect
github.com/rickb777/date v1.20.0 // indirect
Expand All @@ -112,10 +112,10 @@ require (
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.19.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/api v0.170.0 // indirect
google.golang.org/api v0.171.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240304161311-37d4d3c04a78 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240311132316-a219d84964c2 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c // indirect
google.golang.org/grpc v1.62.1 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand Down
40 changes: 20 additions & 20 deletions go.sum
Expand Up @@ -337,8 +337,8 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9
github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ=
github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ=
github.com/prometheus/common v0.51.1 h1:eIjN50Bwglz6a/c3hAgSMcofL3nD+nFQkV6Dd4DsQCw=
github.com/prometheus/common v0.51.1/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
Expand Down Expand Up @@ -698,8 +698,8 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513
google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
google.golang.org/api v0.170.0 h1:zMaruDePM88zxZBG+NG8+reALO2rfLhe/JShitLyT48=
google.golang.org/api v0.170.0/go.mod h1:/xql9M2btF85xac/VAm4PsLMTLVGUOpq4BE9R8jyNy8=
google.golang.org/api v0.171.0 h1:w174hnBPqut76FzW5Qaupt7zY8Kql6fiVjgys4f58sU=
google.golang.org/api v0.171.0/go.mod h1:Hnq5AHm4OTMt2BUVjael2CWZFD6vksJdWCWiUAmjC9o=
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=
Expand Down Expand Up @@ -747,10 +747,10 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto/googleapis/api v0.0.0-20240304161311-37d4d3c04a78 h1:SzXBGiWM1LNVYLCRP3e0/Gsze804l4jGoJ5lYysEO5I=
google.golang.org/genproto/googleapis/api v0.0.0-20240304161311-37d4d3c04a78/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240311132316-a219d84964c2 h1:9IZDv+/GcI6u+a4jRFRLxQs0RUCfavGfoOgEW6jpkI0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240311132316-a219d84964c2/go.mod h1:UCOku4NytXMJuLQE5VuqA5lX3PcHCBo8pxNyvkf4xBs=
google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 h1:rIo7ocm2roD9DcFIX67Ym8icoGCKSARAiPljFhh5suQ=
google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c h1:lfpJ/2rWPa/kJgxyyXM8PrNnfCzcmxJ265mADgwmvLI=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
Expand Down Expand Up @@ -839,18 +839,18 @@ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/A
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ=
k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/client-pkg v0.0.0-20240313113642-ca457df5ea78 h1:Dyk9poFb3XsKle6bgI3+XoyBZRpKkPXNuZmaw6BcWfE=
knative.dev/client-pkg v0.0.0-20240313113642-ca457df5ea78/go.mod h1:CODwMfQexBzzgB2fv9hYF1+FZfrYc9TF3B26GxW69zQ=
knative.dev/eventing v0.40.1-0.20240318205837-63068bd53ae6 h1:4EK1UKlX1dFJQEJnKYEZv2xXnDnI7CrSBmny0KneCEs=
knative.dev/eventing v0.40.1-0.20240318205837-63068bd53ae6/go.mod h1:/QONbc1yAStWdNFV59rJ7js7Mc/87izlFTWkbzORZeo=
knative.dev/hack v0.0.0-20240318013248-424e75ed769a h1:E5aUF562P5BXHsBYx7S4Oa4KKXSH8SkKFG5CqZOTypg=
knative.dev/hack v0.0.0-20240318013248-424e75ed769a/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/networking v0.0.0-20240318132715-69566347ab2a h1:mWpzptq5CInluhMyGerLrHSyH64sdi/hCtHeHyTOplg=
knative.dev/networking v0.0.0-20240318132715-69566347ab2a/go.mod h1:GgOyc+O4ZctaOgIDXVvC4tf++AHc/pMiiwCzZz67os4=
knative.dev/pkg v0.0.0-20240318073042-db6f3b074e8c h1:d8GmDhObjnH/iKrazsNjgLuuEnxLiFE/QSaeFY337cw=
knative.dev/pkg v0.0.0-20240318073042-db6f3b074e8c/go.mod h1:RfDXq7Rf7UmGCEdAiJZPpBRuh7dX73T8clniFt2zEAA=
knative.dev/serving v0.40.1-0.20240319121315-da63b4a570fe h1:SfsPuu5rZuL88DXQwuBCWW0ERBk1HWJKSGmLCX40OBE=
knative.dev/serving v0.40.1-0.20240319121315-da63b4a570fe/go.mod h1:mkfPllWec0aSHe7Rmcsu9MlyO1RLWQunbT+HGy99ntQ=
knative.dev/client-pkg v0.0.0-20240327121233-6984d81a90ec h1:gG8AzUJDHrYONInTv0wm1gSPzWp3n8tooewl+yGpe/I=
knative.dev/client-pkg v0.0.0-20240327121233-6984d81a90ec/go.mod h1:PYodo1bmKTrxnNCfLJa6a8wdg3QQH0XTOPlZJwrY64A=
knative.dev/eventing v0.40.1-0.20240327131403-47543259ceba h1:uX9UsYNHJQDpqVSMVijhSljmCSLZm5ocPdQJ4jrkyig=
knative.dev/eventing v0.40.1-0.20240327131403-47543259ceba/go.mod h1:19sfPiy4dK2jBIHgszOTk43qOvfCXz1GTIncRY3trB8=
knative.dev/hack v0.0.0-20240327150553-47368d631660 h1:tW6NgyjMnSXBS75+k+Xh5uNiLhJ9TFswS9hrkC3OQOc=
knative.dev/hack v0.0.0-20240327150553-47368d631660/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/networking v0.0.0-20240327140628-ae039896b125 h1:w9XY50H8EmPj0C3QGeScCcCqt8Y3vjPEujf/LeH7RLY=
knative.dev/networking v0.0.0-20240327140628-ae039896b125/go.mod h1:YlLpTHRi0i/5XVD3QoqEfFhSmAfRj9sZR2NQEOF9dVc=
knative.dev/pkg v0.0.0-20240327140624-1ca1f09c329e h1:Cg28hbL35g5Qd3tC0PKSX2FMMD8IZnTYxRr4VLIUgd8=
knative.dev/pkg v0.0.0-20240327140624-1ca1f09c329e/go.mod h1:uYSh5G3A/pFmzgowpvKeyphLbXVkY4x7zEhReKwsVeU=
knative.dev/serving v0.40.1-0.20240327150557-17df21964e1d h1:FM13mIUEX2ruEBl2Y9yMnSKIMfIliaq88PmdPkOUGsU=
knative.dev/serving v0.40.1-0.20240327150557-17df21964e1d/go.mod h1:Ai1kjddNp76rlrHL5wbctNifAk4wu5ASdJ/WR0nmgfk=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
Expand Down
2 changes: 1 addition & 1 deletion pkg/kn/plugin/manager.go
Expand Up @@ -25,7 +25,7 @@ import (
"strings"
"text/template"

pkgplugin "knative.dev/client-pkg/pkg/kn/plugin"
pkgplugin "knative.dev/client-pkg/pkg/plugin"

homedir "github.com/mitchellh/go-homedir"
"github.com/spf13/cobra"
Expand Down
22 changes: 16 additions & 6 deletions vendor/github.com/prometheus/common/expfmt/expfmt.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 0 additions & 30 deletions vendor/knative.dev/client-pkg/pkg/kn/plugin/types.go

This file was deleted.

54 changes: 54 additions & 0 deletions vendor/knative.dev/client-pkg/pkg/plugin/context_sharing_types.go
@@ -0,0 +1,54 @@
// Copyright © 2023 The Knative 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 plugin

// Manifest represents plugin metadata
type Manifest struct {
// Path to external plugin binary. Always empty for inlined plugins.
Path string `json:"path,omitempty"`

// Plugin declares its own manifest to be included in Context Sharing feature
HasManifest bool `json:"hasManifest"`

// ProducesContextDataKeys is a list of keys for the ContextData that
// a plugin can produce. Nil or an empty list declares that this
// plugin is not ContextDataProducer
ProducesContextDataKeys []string `json:"producesKeys,omitempty"`

// ConsumesContextDataKeys is a list of keys from a ContextData that a
// plugin is interested in to consume. Nil or an empty list declares
// that this plugin is not a ContextDataConsumer
ConsumesContextDataKeys []string `json:"consumesKeys,omitempty"`
}

// PluginWithManifest represents extended plugin support for Manifest and Context Sharing feature
type PluginWithManifest interface {
// Plugin original interface wrapper
Plugin

// GetManifest returns a metadata descriptor of plugin
GetManifest() *Manifest

// GetContextData returns a map structure that is used to share common context data from plugin
GetContextData() map[string]string

// ExecuteWithContextData an extended version of plugin.Execute command to allow injection and use of ContextData.
// This is a map[string]string structure to share common value service name between kn and plugins.
ExecuteWithContextData(ctx map[string]string, args []string) error
// Alternative impl: use of native context.Context as a data structure.
// We decided to use plain map, because Context can't be extended to external plugins anyway.
// Another encode to JSON is required to pass it. We might reconsider that in future development iterations.

}

0 comments on commit cbb6f5c

Please sign in to comment.