Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateFramework ¶ added in v0.0.2
ValidateFramework validates the recipe for a Framework
func ValidateResource ¶ added in v0.0.2
ValidateResource validates the recipe for a Resource
Types ¶
type Definition ¶ added in v0.0.2
type Definition struct { Name string `yaml:"name" validate:"required"` Format string `yaml:"format" validate:"required,oneof=json yaml"` Type string `yaml:"type" validate:"required,oneof=dir file"` Path string `yaml:"path" validate:"required"` RegexPattern string `yaml:"regex_pattern"` Function *Function `yaml:"function"` }
Definition is a recipe on how and where to read the actual Definition data
type Framework ¶
type Framework struct { Name string `yaml:"name" validate:"required"` Schemas []*Schema `yaml:"schemas"` Definitions []*Definition `yaml:"definitions"` Procedures []*Procedure `yaml:"procedures"` }
Framework is a recipe on how and where to read the actual Framework data
type Function ¶ added in v0.0.2
type Function struct { Type string `yaml:"type" validate:"required,oneof=dir file"` Path string `yaml:"path" validate:"required"` }
Function is a recipe on how to construct a Definition
type Output ¶ added in v0.0.3
type Output struct { TreatAs string `yaml:"treat_as" validate:"required,oneof=info warning error success"` Targets []*Target `yaml:"targets" validate:"required,min=1"` }
Output defines how the last procedure output is written
type Procedure ¶ added in v0.0.2
type Procedure struct { Name string `yaml:"name" validate:"required"` Type string `yaml:"type" validate:"required,oneof=dir file"` Path string `yaml:"path" validate:"required"` Output *Output `yaml:"output"` }
Procedure is a recipe on how and where to read the actual Procedure data
type Recipe ¶
type Recipe struct { Resources []*Resource `yaml:"resources" validate:"required"` Frameworks []*Framework `yaml:"frameworks" validate:"required"` }
Recipe is the main structure for storing recipe execution flow
type Resource ¶
type Resource struct { Name string `yaml:"name" validate:"required"` Format string `yaml:"format" validate:"required,oneof=json yaml"` Type string `yaml:"type" validate:"required,oneof=dir file"` RegexPattern string `yaml:"regex_pattern"` Path string `yaml:"path" validate:"required"` BatchSize int `yaml:"batch_size"` FrameworkNames []string `yaml:"framework_names" validate:"required,min=1"` }
Resource is a recipe on how and where to read the actual Resource data
type Schema ¶ added in v0.0.2
type Schema struct { Name string `yaml:"name" validate:"required"` Type string `yaml:"type" validate:"required,oneof=dir file"` Path string `yaml:"path" validate:"required"` Output *Output `yaml:"output"` }
Schema is a recipe on how and where to read the actual Schema data
type Target ¶ added in v0.0.3
type Target struct { Name string `yaml:"name" validate:"required"` Format string `yaml:"format" validate:"required,oneof=json yaml"` Type string `yaml:"type" validate:"required,eq=dir"` Path string `yaml:"path"` }
Target defines how an output is written to the targetted stream