Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrEmptyPattern = errors.New("Empty pattern")
ErrPattern is returned as the error when a pattern is empty, but shouldn't be.
Functions ¶
func NewHEProxy ¶
func NewHEProxy(rw Rewriter) *httputil.ReverseProxy
NewHEProxy returns a new proxy which maps a request to an HTTPS url if available
Types ¶
type Exclusion ¶
type Exclusion struct { Pattern string // contains filtered or unexported fields }
Exclusion represents a URL pattern which should not be rewritten.
func (*Exclusion) UnmarshalXML ¶
UnmarshalXML unmarshals and compiles a regular expression pulled out of the XML.
type LinearRewriter ¶
type LinearRewriter struct {
// contains filtered or unexported fields
}
LinearRewriter holds rulesets for remapping URLs
type Rewriter ¶
Rewriter rewrites url to a new url
func NewLinearRewriter ¶
NewLinearRewriter returns a Remapper which can remap URLs based on the RuleSets
func NewTrieRewriter ¶
NewTrieRewriter returns a TrieRewriter for remapping urls.
type Rule ¶
Rule represents a rewritten URL.
func (*Rule) UnmarshalXML ¶
UnmarshalXML unmarshals and compiles a regular expression pulled out of the XML.
type RuleSet ¶
type RuleSet struct { Name string `xml:"name,attr"` Targets []*Target `xml:"target"` Exclusions []*Exclusion `xml:"exclusion"` Rules []*Rule `xml:"rule"` }
RuleSet represents a site, mapping from hostnames to HTTPS urls.
func NewRuleSet ¶
NewRuleSet returns a RuleSet read from `r`
func ReadRuleSets ¶
ReadRuleSets iterates through a directory and returns a slice of rulesets.
type Target ¶
type Target struct {
Host string `xml:"host,attr"`
}
Target represents a set of hostnames, potentially with wildcards.
type TrieRewriter ¶
type TrieRewriter struct {
// contains filtered or unexported fields
}
TrieRewriter utilizes a trie tree for rewriting urls based on rulesets
Directories ¶
Path | Synopsis |
---|---|
Godeps
|
|
_workspace/src/github.com/glenn-brown/golang-pkg-pcre/src/pkg/pcre
This package provides access to the Perl Compatible Regular Expresion library, PCRE.
|
This package provides access to the Perl Compatible Regular Expresion library, PCRE. |
cmd
|
|