Documentation ¶
Index ¶
- func ConfModReWriteCheck(cfg *ConfModReWrite, confRoot string) error
- func ProductRulesCheck(conf *ProductRulesFile) error
- func ReWriteConfCheck(conf ReWriteConfFile) error
- func ReWriteRuleCheck(conf ReWriteRuleFile) error
- func ReqReWrite(req *bfe_basic.Request, rules *RuleList)
- func RuleListCheck(conf *RuleFileList) error
- type ConfModReWrite
- type ModuleReWrite
- type ProductRules
- type ProductRulesFile
- type ReWriteConf
- type ReWriteConfFile
- type ReWriteRule
- type ReWriteRuleFile
- type ReWriteTable
- type RuleFileList
- type RuleList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfModReWriteCheck ¶
func ConfModReWriteCheck(cfg *ConfModReWrite, confRoot string) error
func ProductRulesCheck ¶
func ProductRulesCheck(conf *ProductRulesFile) error
func ReWriteConfCheck ¶
func ReWriteConfCheck(conf ReWriteConfFile) error
func ReWriteRuleCheck ¶
func ReWriteRuleCheck(conf ReWriteRuleFile) error
func ReqReWrite ¶
ReqReWrite do rewrite to http request, with given rewrite rules.
func RuleListCheck ¶
func RuleListCheck(conf *RuleFileList) error
Types ¶
type ConfModReWrite ¶
type ConfModReWrite struct { Basic struct { DataPath string // path of config data (rewrite) } Log struct { OpenDebug bool } }
func ConfLoad ¶
func ConfLoad(filePath string, confRoot string) (*ConfModReWrite, error)
ConfLoad loads config from config file
func (*ConfModReWrite) Check ¶
func (cfg *ConfModReWrite) Check(confRoot string) error
type ModuleReWrite ¶
type ModuleReWrite struct {
// contains filtered or unexported fields
}
func NewModuleReWrite ¶
func NewModuleReWrite() *ModuleReWrite
func (*ModuleReWrite) Init ¶
func (m *ModuleReWrite) Init(cbs *bfe_module.BfeCallbacks, whs *web_monitor.WebHandlers, cr string) error
func (*ModuleReWrite) Name ¶
func (m *ModuleReWrite) Name() string
type ProductRules ¶
type ProductRulesFile ¶
type ProductRulesFile map[string]*RuleFileList // product => list of rewrite rules
type ReWriteConf ¶
type ReWriteConf struct { Version string // version of the config Config ProductRules // product rules for rewrite }
func ReWriteConfLoad ¶
func ReWriteConfLoad(filename string) (ReWriteConf, error)
ReWriteConfLoad loads config of rewrite from file.
type ReWriteConfFile ¶
type ReWriteConfFile struct { Version *string // version of the config Config *ProductRulesFile }
type ReWriteRule ¶
type ReWriteRuleFile ¶
type ReWriteTable ¶
type ReWriteTable struct {
// contains filtered or unexported fields
}
func NewReWriteTable ¶
func NewReWriteTable() *ReWriteTable
func (*ReWriteTable) Update ¶
func (t *ReWriteTable) Update(conf ReWriteConf)
type RuleFileList ¶
type RuleFileList []ReWriteRuleFile
type RuleList ¶
type RuleList []ReWriteRule
Click to show internal directories.
Click to hide internal directories.