MetadataV1 is the APIVersion V1 plugin.yaml format
| 22 | |
| 23 | // MetadataV1 is the APIVersion V1 plugin.yaml format |
| 24 | type MetadataV1 struct { |
| 25 | // APIVersion specifies the plugin API version |
| 26 | APIVersion string `yaml:"apiVersion"` |
| 27 | |
| 28 | // Name is the name of the plugin |
| 29 | Name string `yaml:"name"` |
| 30 | |
| 31 | // Type of plugin (eg, cli/v1, getter/v1, postrenderer/v1) |
| 32 | Type string `yaml:"type"` |
| 33 | |
| 34 | // Runtime specifies the runtime type (subprocess, wasm) |
| 35 | Runtime string `yaml:"runtime"` |
| 36 | |
| 37 | // Version is a SemVer 2 version of the plugin. |
| 38 | Version string `yaml:"version"` |
| 39 | |
| 40 | // SourceURL is the URL where this plugin can be found |
| 41 | SourceURL string `yaml:"sourceURL,omitempty"` |
| 42 | |
| 43 | // Config contains the type-specific configuration for this plugin |
| 44 | Config map[string]any `yaml:"config"` |
| 45 | |
| 46 | // RuntimeConfig contains the runtime-specific configuration |
| 47 | RuntimeConfig map[string]any `yaml:"runtimeConfig"` |
| 48 | } |
| 49 | |
| 50 | func (m *MetadataV1) Validate() error { |
| 51 | if !validPluginName.MatchString(m.Name) { |
nothing calls this directly
no outgoing calls
no test coverage detected