Documentation ¶
Index ¶
Constants ¶
const CircularReferencesFix string = "Circular references are created by schemas that reference back to themselves somewhere " +
"in the chain. The link could be very deep, or it could be super shallow. Sometimes it's hard to know what is looping " +
"without resolving the references. This model is looping, Remove the looping link in the chain."
todo: move copy into virtual file system or some kind of map.
Variables ¶
This section is empty.
Functions ¶
func ApplyRules
deprecated
Types ¶
type RuleComposer ¶
type RuleComposer struct { }
RuleComposer will consume a ruleset specification into a *model.RuleSet
func CreateRuleComposer ¶
func CreateRuleComposer() *RuleComposer
CreateRuleComposer will create a new RuleComposer and return a pointer to it.
func (*RuleComposer) ComposeRuleSet ¶
func (rc *RuleComposer) ComposeRuleSet(ruleset []byte) (*rulesets.RuleSet, error)
ComposeRuleSet compose a byte array ruleset specification into a *model.RuleSet
type RuleSetExecution ¶
RuleSetExecution is an instruction set for executing a ruleset. It's a convenience structure to allow the signature of ApplyRules to change, without a huge refactor. The ApplyRules function only returns a single error also.
type RuleSetExecutionResult ¶
type RuleSetExecutionResult struct { RuleSetExecution *RuleSetExecution Results []model.RuleFunctionResult Index *model.SpecIndex SpecInfo *model.SpecInfo Errors []error }
RuleSetExecutionResult returns the results of running the ruleset against the supplied spec.
func ApplyRulesToRuleSet ¶
func ApplyRulesToRuleSet(execution *RuleSetExecution) *RuleSetExecutionResult
ApplyRulesToRuleSet is a replacement for ApplyRules. This function was created before trying to use vacuum as an API. The signature is not sufficient, but is embedded everywhere. This new method uses a message structure, to allow the signature to grow, without breaking anything.