Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Preprocessor = &preprocessor{ log: golog.LoggerFor("httpseverywhere-preprocessor"), }
Preprocessor is a struct for preprocessing rules into a GOB file.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
Types ¶
type Exclusion ¶
type Exclusion struct {
Pattern string `xml:"pattern,attr"`
}
Exclusion is a RE pattern to ignore when processing a rule set.
type Rewrite ¶
Rewrite changes an HTTP URL to rewrite.
type Ruleset ¶
type Ruleset struct { Off string `xml:"default_off,attr"` Platform string `xml:"platform,attr"` Target []*Target `xml:"target"` Exclusion []*Exclusion `xml:"exclusion"` Rule []*Rule `xml:"rule"` }
Ruleset is a set of rules to apply to a set of targets with flags for things like whether or not the set is active, targets, rules, exclusions, etc.