ruledefine

package
v1.0.1-rel-02 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: AFL-3.0 Imports: 10 Imported by: 0

Documentation

Index

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) CacheGetParam

func (this *RuleCache) CacheGetParam(id string) (*string, bool)

func (*RuleCache) CacheGetResult

func (this *RuleCache) CacheGetResult(id string) (*string, bool)

func (*RuleCache) CacheGetRule

func (this *RuleCache) CacheGetRule(id string) (*string, bool)

func (*RuleCache) CacheSetParam

func (this *RuleCache) CacheSetParam(id string, p *string)

func (*RuleCache) CacheSetResult

func (this *RuleCache) CacheSetResult(id string, p *string)

func (*RuleCache) CacheSetRule

func (this *RuleCache) CacheSetRule(id string, rule *string)

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 FindBeanRuleDefine

func FindBeanRuleDefine() *RuleDefine

FindBeanRuleDefine

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 NewRuleFile

func NewRuleFile(domainPath string, id string, rulePath string) *RuleFile

func (*RuleFile) BuildFileName

func (this *RuleFile) BuildFileName(suffix string) string

func (*RuleFile) CheckFileExist

func (this *RuleFile) CheckFileExist() bool

func (*RuleFile) ReadRuleFile

func (this *RuleFile) ReadRuleFile() (string, error)

func (*RuleFile) ReadRuleParamFile

func (this *RuleFile) ReadRuleParamFile() (string, error)

func (*RuleFile) ReadRuleResultFile

func (this *RuleFile) ReadRuleResultFile() (string, error)

Jump to

Keyboard shortcuts

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