schema.go 671 B

123456789101112131415161718192021222324252627282930
  1. package ruleEngine
  2. import "fmt"
  3. // RelationType 默认节点关系
  4. type RelationType string
  5. const (
  6. Success RelationType = "Success" // 成功
  7. Failure RelationType = "Failure" // 失败
  8. True RelationType = "True" // 真
  9. False RelationType = "False" // 假
  10. )
  11. // RuleNodeInfo rule node info for output
  12. type RuleNodeInfo struct {
  13. ruleNodeId string
  14. ruleChainName string
  15. ruleNodeName string
  16. }
  17. func (r *RuleNodeInfo) String() string {
  18. return fmt.Sprintf("[RuleChain:%s|RuleNode:%s|RuleNodeId:%s]", r.ruleChainName, r.ruleNodeName, r.ruleNodeId)
  19. }
  20. type RuleNodeRelation struct {
  21. In string
  22. Out string
  23. RelationType RelationType
  24. }