Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidRecipeVersion = errors.New("recipe version is invalid or not found")
)
Functions ¶
func FromTemplate ¶
func FromTemplate(config TemplateConfig) error
Types ¶
type PluginNode ¶
type PluginNode struct { Name yaml.Node `json:"name" yaml:"name"` Type yaml.Node `json:"type" yaml:"type"` Scope yaml.Node `json:"scope" yaml:"scope"` Config map[string]yaml.Node `json:"config" yaml:"config"` }
PluginNode contains the json data for a recipe node that is being used for generating the plugins code for a recipe.
type PluginRecipe ¶
type PluginRecipe struct { Name string `json:"name" yaml:"name" validate:"required"` Scope string `json:"scope" yaml:"scope"` Config map[string]interface{} `json:"config" yaml:"config"` Node PluginNode }
PluginRecipe contains the json data for a recipe that is being used for generating the plugins code for a recipe.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader is a struct that reads recipe files.
type Recipe ¶
type Recipe struct { Name string `json:"name" yaml:"name" validate:"required"` Version string `json:"version" yaml:"version" validate:"required"` Source PluginRecipe `json:"source" yaml:"source" validate:"required"` Sinks []PluginRecipe `json:"sinks" yaml:"sinks" validate:"required,min=1"` Processors []PluginRecipe `json:"processors" yaml:"processors"` Node RecipeNode }
Recipe contains the json data for a recipe
type RecipeNode ¶
type RecipeNode struct { Name yaml.Node `json:"name" yaml:"name"` Version yaml.Node `json:"version" yaml:"version"` Source PluginNode `json:"source" yaml:"source"` Sinks []PluginNode `json:"sinks" yaml:"sinks"` Processors []PluginNode `json:"processors" yaml:"processors"` }
RecipeNode contains the json data for a recipe node
type TemplateConfig ¶
type TemplateConfig struct { TemplateFilePath string OutputDirPath string DataPath string Data []TemplateData }
type TemplateData ¶
Click to show internal directories.
Click to hide internal directories.