builder

package
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2021 License: BSD-3-Clause Imports: 11 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RuleBuilder

type RuleBuilder struct {
	Kc *base.KnowledgeContext
	Dc *context.DataContext
	// contains filtered or unexported fields
}

func NewRuleBuilder

func NewRuleBuilder(dc *context.DataContext) *RuleBuilder

func (*RuleBuilder) BuildRuleFromString

func (builder *RuleBuilder) BuildRuleFromString(ruleString string) error

chinese comment :全量更新 if update success, all old rules will be delete and you inject new rules will be in the gengine

func (*RuleBuilder) BuildRuleWithIncremental

func (builder *RuleBuilder) BuildRuleWithIncremental(ruleString string) error

chinese comment:增量更新 if a rule already exists, this method will use the new rule to replace the old one if a rule doesn't exist, this method will add the new rule to the existed rules list in detail: copy from old -> update the copy -> use the updated copy to replace old

func (*RuleBuilder) IsExist

func (builder *RuleBuilder) IsExist(ruleNames []string) []bool

func (*RuleBuilder) RemoveRules

func (builder *RuleBuilder) RemoveRules(ruleNames []string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL