Documentation
¶
Index ¶
- func InjectRuleData(s *RuleData)
- func InjectRuleRequest(s *RuleRequest)
- func LoadRuleData() baseiface.ISingleton
- func LoadRuleRequest() baseiface.ISingleton
- func RuleDataComparator(a, b interface{}) int
- type RuleData
- func (this *RuleData) Clone() *RuleData
- func (this *RuleData) IfFunc() bool
- func (this *RuleData) Line(i int) string
- func (this *RuleData) LoadRule2IdName() *RuleData
- func (this *RuleData) Log() *RuleData
- func (this *RuleData) LogLines() *RuleData
- func (this *RuleData) Rule2IdName() *RuleData
- func (this *RuleData) RuleId2Name() *RuleData
- func (this *RuleData) Save2File()
- func (this *RuleData) String() string
- func (this *RuleData) ToLines() *strings.Builder
- func (this *RuleData) ToString() string
- type RuleRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InjectRuleData ¶
func InjectRuleData(s *RuleData)
func InjectRuleRequest ¶
func InjectRuleRequest(s *RuleRequest)
func LoadRuleData ¶
func LoadRuleData() baseiface.ISingleton
func LoadRuleRequest ¶
func LoadRuleRequest() baseiface.ISingleton
func RuleDataComparator ¶
func RuleDataComparator(a, b interface{}) int
Types ¶
type RuleData ¶
type RuleData struct {
basedto.BaseEntity
RuleDefine *ruledefine.RuleDefine `json:"-"`
//执行模式:0单一模式10串20并30混40逆50桶
Mode int `json:"mode"`
// 规则id
Id string `json:"id"`
// 规则名称
Name string `json:"name,omitempty"`
//规则定义define
Rule string `json:"ruleserver"`
//参数 json string: 入参
Param string `json:"param"`
//option params
//返回结果
Result string `json:"result,omitempty"`
//结果比对值
Expect string `json:"-"`
}
@Title 文件名称: ichub_ruledata.go @Description 描述: 有芯规则引擎执行的数据值对象
@Author 作者: leijianming@163.com 时间(2024-02-18 22:38:21) @Update 作者: leijianming@163.com 时间(2024-02-18 22:38:21)
func NewRuleData ¶
func NewRuleDataInit ¶
func NewRuleDataInit() *RuleData
func (*RuleData) LoadRule2IdName ¶
func (*RuleData) Rule2IdName ¶
ruleserver "pay-simple-compute-001" "简单计算工资示例" salience 0
type RuleRequest ¶
type RuleRequest struct {
basedto.BaseEntity
RequestId string `json:"request_id"`
RuleData `json:"rule_data,omity"`
RuleDatas []*RuleData `json:"rule_datas,omitempty"`
}
func NewRuleRequest ¶
func NewRuleRequest() *RuleRequest
func (*RuleRequest) Append ¶
func (self *RuleRequest) Append(rules ...*RuleData) *RuleRequest
Click to show internal directories.
Click to hide internal directories.