MetadataLegacy is the legacy plugin.yaml format
| 34 | |
| 35 | // MetadataLegacy is the legacy plugin.yaml format |
| 36 | type MetadataLegacy struct { |
| 37 | // Name is the name of the plugin |
| 38 | Name string `yaml:"name"` |
| 39 | |
| 40 | // Version is a SemVer 2 version of the plugin. |
| 41 | Version string `yaml:"version"` |
| 42 | |
| 43 | // Usage is the single-line usage text shown in help |
| 44 | Usage string `yaml:"usage"` |
| 45 | |
| 46 | // Description is a long description shown in places like `helm help` |
| 47 | Description string `yaml:"description"` |
| 48 | |
| 49 | // PlatformCommand is the plugin command, with a platform selector and support for args. |
| 50 | PlatformCommand []PlatformCommand `yaml:"platformCommand"` |
| 51 | |
| 52 | // Command is the plugin command, as a single string. |
| 53 | // DEPRECATED: Use PlatformCommand instead. Removed in subprocess/v1 plugins. |
| 54 | Command string `yaml:"command"` |
| 55 | |
| 56 | // IgnoreFlags ignores any flags passed in from Helm |
| 57 | IgnoreFlags bool `yaml:"ignoreFlags"` |
| 58 | |
| 59 | // PlatformHooks are commands that will run on plugin events, with a platform selector and support for args. |
| 60 | PlatformHooks PlatformHooks `yaml:"platformHooks"` |
| 61 | |
| 62 | // Hooks are commands that will run on plugin events, as a single string. |
| 63 | // DEPRECATED: Use PlatformHooks instead. Removed in subprocess/v1 plugins. |
| 64 | Hooks Hooks `yaml:"hooks"` |
| 65 | |
| 66 | // Downloaders field is used if the plugin supply downloader mechanism |
| 67 | // for special protocols. |
| 68 | Downloaders []Downloaders `yaml:"downloaders"` |
| 69 | } |
| 70 | |
| 71 | func (m *MetadataLegacy) Validate() error { |
| 72 | if !validPluginName.MatchString(m.Name) { |
nothing calls this directly
no outgoing calls
no test coverage detected