plugin

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGenerateCmd

func NewGenerateCmd() *cobra.Command

NewGenerateCmd builds a command that generates plugin.yaml files.

Types

type Flag

type Flag struct {
	Name      string `yaml:"name"`
	Shorthand string `yaml:"shorthand,omitempty"`
	Desc      string `yaml:"desc"`
	DefValue  string `yaml:"defValue,omitempty"`
}

Flag describes a single flag supported by a given plugin. From https://github.com/kubernetes/kubernetes/blob/23cd1434e69c1a984e8c24c875c19ccbdd0ba2fe/pkg/kubectl/plugins/plugins.go#L93

type Plugin

type Plugin struct {
	Name      string   `yaml:"name"`
	Use       string   `yaml:"use"`
	ShortDesc string   `yaml:"shortDesc"`
	LongDesc  string   `yaml:"longDesc,omitempty"`
	Example   string   `yaml:"example,omitempty"`
	Command   string   `yaml:"command"`
	Flags     []Flag   `yaml:"flags,omitempty"`
	Tree      []Plugin `yaml:"tree,omitempty"`
}

Plugin holds everything needed to register a plugin as a command. Usually comes from a descriptor file. From https://github.com/kubernetes/kubernetes/blob/23cd1434e69c1a984e8c24c875c19ccbdd0ba2fe/pkg/kubectl/plugins/plugins.go#L47

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL