Documentation
¶
Index ¶
- Constants
- func InjectRuleDefine(s *RuleDefine)
- func LoadRuleDefine() baseiface.ISingleton
- type RuleCache
- func (this *RuleCache) CacheGetParam(id string) (*string, bool)
- func (this *RuleCache) CacheGetResult(id string) (*string, bool)
- func (this *RuleCache) CacheGetRule(id string) (*string, bool)
- func (this *RuleCache) CacheSetParam(id string, p *string)
- func (this *RuleCache) CacheSetResult(id string, p *string)
- func (this *RuleCache) CacheSetRule(id string, rule *string)
- type RuleDefine
- type RuleFile
Constants ¶
View Source
const ( Suffix_rule = "_rule.txt" Suffix_param = "_param.json" Suffix_result = "_result.json" )
Variables ¶
This section is empty.
Functions ¶
func InjectRuleDefine ¶
func InjectRuleDefine(s *RuleDefine)
func LoadRuleDefine ¶
func LoadRuleDefine() baseiface.ISingleton
Types ¶
type RuleCache ¶
type RuleCache struct {
}
func (*RuleCache) CacheSetParam ¶
func (*RuleCache) CacheSetResult ¶
func (*RuleCache) CacheSetRule ¶
type RuleDefine ¶
type RuleDefine struct {
basedto.BaseEntity
Id string `json:"id"`
Name string `json:"name"`
Rule string `json:"ruleserver"`
Param string `json:"param"`
Result string `json:"result"`
FuncDefineMap map[string]string `json:"-"`
// rule_path_base string `json:"-"`
DomainPath string `json:"domain_path,omitempty"`
// contains filtered or unexported fields
}
func NewRuleDefine ¶
func NewRuleDefine() *RuleDefine
func NewRuleDefineBy ¶
func NewRuleDefineBy(Id string) *RuleDefine
func (*RuleDefine) IfFunc ¶
func (this *RuleDefine) IfFunc() bool
func (*RuleDefine) ListFunc ¶
func (this *RuleDefine) ListFunc(funcId string) (*RuleDefine, error)
func (*RuleDefine) ListFuncs ¶
func (this *RuleDefine) ListFuncs() *map[string]string
func (*RuleDefine) LoadFile ¶
func (this *RuleDefine) LoadFile() string
func (*RuleDefine) LoadRuleFrom ¶
func (this *RuleDefine) LoadRuleFrom() bool
func (*RuleDefine) RuleId2Name ¶
func (this *RuleDefine) RuleId2Name() *RuleDefine
type RuleFile ¶
type RuleFile struct {
DomainPath string `json:"domain_path"`
Id string `json:"id"`
RuleCache `json:"-"`
// contains filtered or unexported fields
}
func (*RuleFile) BuildFileName ¶
func (*RuleFile) CheckFileExist ¶
func (*RuleFile) ReadRuleFile ¶
func (*RuleFile) ReadRuleParamFile ¶
func (*RuleFile) ReadRuleResultFile ¶
Click to show internal directories.
Click to hide internal directories.