package plugin
import "k8s.io/kubectl/pkg/cmd/plugin"
Index ¶
- Variables
- func GetPluginCommandGroup(kubectl *cobra.Command) templates.CommandGroup
- func NewCmdPlugin(streams genericiooptions.IOStreams) *cobra.Command
- func NewCmdPluginList(streams genericiooptions.IOStreams) *cobra.Command
- func SetupPluginCompletion(cmd *cobra.Command, args []string)
- type CommandOverrideVerifier
- type PathVerifier
- type PluginListOptions
Variables ¶
var ( ValidPluginFilenamePrefixes = []string{"kubectl"} )
Functions ¶
func GetPluginCommandGroup ¶
func GetPluginCommandGroup(kubectl *cobra.Command) templates.CommandGroup
func NewCmdPlugin ¶
func NewCmdPlugin(streams genericiooptions.IOStreams) *cobra.Command
func NewCmdPluginList ¶
func NewCmdPluginList(streams genericiooptions.IOStreams) *cobra.Command
NewCmdPluginList provides a way to list all plugin executables visible to kubectl
func SetupPluginCompletion ¶
SetupPluginCompletion adds a Cobra command to the command tree for each plugin. This is only done when performing shell completion that relate to plugins.
Types ¶
type CommandOverrideVerifier ¶
type CommandOverrideVerifier struct {
// contains filtered or unexported fields
}
func (*CommandOverrideVerifier) Verify ¶
func (v *CommandOverrideVerifier) Verify(path string) []error
Verify implements PathVerifier and determines if a given path is valid depending on whether or not it overwrites an existing kubectl command path, or a previously seen plugin.
type PathVerifier ¶
type PathVerifier interface { // Verify determines if a given path is valid Verify(path string) []error }
pathVerifier receives a path and determines if it is valid or not
type PluginListOptions ¶
type PluginListOptions struct { Verifier PathVerifier NameOnly bool PluginPaths []string genericiooptions.IOStreams }
func (*PluginListOptions) Complete ¶
func (o *PluginListOptions) Complete(cmd *cobra.Command) error
func (*PluginListOptions) ListPlugins ¶
func (o *PluginListOptions) ListPlugins() ([]string, []error)
ListPlugins returns list of plugin paths.
func (*PluginListOptions) Run ¶
func (o *PluginListOptions) Run() error
Source Files ¶
plugin.go plugin_completion.go
- Version
- v0.32.3 (latest)
- Published
- Mar 12, 2025
- Platform
- linux/amd64
- Imports
- 15 packages
- Last checked
- 5 days ago –
Tools for package owners.