mod_rewrite

package
v1.8.8 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

func ReqReWrite(req *bfe_basic.Request, rules *RuleList)

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 (*ModuleReWrite) Name

func (m *ModuleReWrite) Name() string

type ProductRules

type ProductRules map[string]*RuleList // product => list of rewrite rules

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 ReWriteRule struct {
	Cond    condition.Condition // condition for rewrite
	Actions []action.Action     // list of actions
	Last    bool                // if true, not to check the next rule in the list if

}

type ReWriteRuleFile

type ReWriteRuleFile struct {
	Cond    *string         // condition for rewrite
	Actions []action.Action // list of actions
	Last    *bool           // if true, not to check the next rule in the list if

}

type ReWriteTable

type ReWriteTable struct {
	// contains filtered or unexported fields
}

func NewReWriteTable

func NewReWriteTable() *ReWriteTable

func (*ReWriteTable) Search

func (t *ReWriteTable) Search(product string) (*RuleList, bool)

func (*ReWriteTable) Update

func (t *ReWriteTable) Update(conf ReWriteConf)

type RuleFileList

type RuleFileList []ReWriteRuleFile

type RuleList

type RuleList []ReWriteRule

Jump to

Keyboard shortcuts

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