Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶ added in v0.12.2
type Config struct { helper.WriterConfig Plugin *Plugin `json:"-" yaml:"-"` Parameters map[string]interface{} `json:",squash" yaml:",squash"` }
Config is the config values for the plugin
func (Config) MarshalJSON ¶ added in v0.12.3
MarshalJSON marshals JSON
func (Config) MarshalYAML ¶ added in v0.12.2
MarshalYAML marshals YAML
func (*Config) UnmarshalJSON ¶ added in v0.12.3
func (*Config) UnmarshalYAML ¶ added in v0.12.2
UnmarshalYAML unmarshals YAML
type Definition ¶ added in v0.13.0
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"` Hidden bool `json:"hidden" yaml:"hidden"` AdvancedConfig bool `json:"advancedConfig" yaml:"advanced_config"` }
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 ¶ added in v0.12.2
NewPluginFromFile builds a new plugin from a file
func (*Plugin) NewBuilder ¶ added in v0.12.2
NewBuilder creates a new, empty config that can build into an operator
func (*Plugin) Render ¶ added in v0.12.2
Render will render a plugin's template with the given parameters
func (*Plugin) UnmarshalText ¶ added in v0.12.2
UnmarshalText unmarshals a plugin from a text file
Click to show internal directories.
Click to hide internal directories.