Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { helper.WriterConfig Plugin *Plugin `json:"-" yaml:"-"` Parameters map[string]interface{} `json:",inline" yaml:",squash"` }
Config is the config values for the plugin
func (Config) MarshalYAML ¶
MarshalYAML marshals YAML
func (*Config) UnmarshalJSON ¶
func (*Config) UnmarshalYAML ¶
UnmarshalYAML unmarshals YAML
type Definition ¶
type Definition struct { Version string `json:"version" yaml:"version"` Title string `json:"title" yaml:"title"` Description string `json:"description" yaml:"description"` Parameters []Parameter `json:"parameters" yaml:"parameters"` MinStanzaVersion string `json:"minStanzaVersion" yaml:"min_stanza_version"` MaxStanzaVersion string `json:"maxStanzaVersion" yaml:"max_stanza_version"` SupportedPlatforms []string `json:"supportedPlatforms" yaml:"supported_platforms"` }
Definition contains metadata for rendering the plugin
type Parameter ¶
type Parameter struct { Name string `json:"name" yaml:"name"` Label string `json:"label" yaml:"label"` Description string `json:"description" yaml:"description"` Required bool `json:"required" yaml:"required"` // "string", "int", "bool", "strings", or "enum" Type string `json:"type" yaml:"type"` // only useable if Type == "enum" ValidValues []string `json:"validValues" yaml:"valid_values"` // Must be valid according to Type & ValidValues Default interface{} `json:"default" yaml:"default"` RelevantIf map[string]map[string]interface{} `json:"relevantIf" yaml:"relevant_if"` }
Parameter is a basic description of a plugin's parameter.
type Plugin ¶
type Plugin struct { Definition `yaml:",inline"` ID string `json:"id" yaml:"id"` Template *template.Template }
Plugin is the rendered result of a plugin template.
func NewPluginFromFile ¶
NewPluginFromFile builds a new plugin from a file
func (*Plugin) NewBuilder ¶
NewBuilder creates a new, empty config that can build into an operator
func (*Plugin) UnmarshalText ¶
UnmarshalText unmarshals a plugin from a text file
Click to show internal directories.
Click to hide internal directories.