Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Definition ¶
type Definition struct { Name string Source string Description string Destination string Content string JSON interface{} Status ValidationResult }
Definition - definitoin for a workflow defined by a GFlows template
func (*Definition) SetContent ¶
func (definition *Definition) SetContent(workflow string, template *pkg.PathInfo)
type GitHubWorkflow ¶
type GitHubWorkflow struct { Path string Definition *Definition }
type TemplateEngine ¶
type TemplateEngine interface { // GetObservableSources - returns a list of all the local files used to generate workflows. Used // to get the list of files to watch for changes. GetObservableSources() ([]string, error) // GetWorkflowDefinitions - returns definitions generated from workflow templates. GetWorkflowDefinitions() ([]*Definition, error) // ImportWorkflow - imports a workflow, returns the path to the new template. ImportWorkflow(workflow *GitHubWorkflow) (string, error) // WorkflowGenerator - returns a generator to create default workflow and config files WorkflowGenerator(templateVars map[string]string) content.WorkflowGenerator }
type ValidationResult ¶
ValidationResult - validate result
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator - validates a workflow definition
func NewValidator ¶
func NewValidator(fs *afero.Afero, context *config.GFlowsContext) *Validator
NewValidator - creates a new validator for the given filesystem
func (*Validator) ValidateContent ¶
func (validator *Validator) ValidateContent(definition *Definition) ValidationResult
ValidateContent - validates the content at the destination in the definition is up to date
func (*Validator) ValidateSchema ¶
func (validator *Validator) ValidateSchema(definition *Definition) ValidationResult
ValidateSchema - validates the template for the definition generates a valid workflow
Source Files ¶
Click to show internal directories.
Click to hide internal directories.