Versions in this module Expand all Collapse all v0 v0.8.1 Jan 12, 2016 Changes in this version + const EndsWith + const Has + const Is + const Match + const Not + const NotHas + const NotMatch + const StartsWith + type ComplexRule struct + Base string + Exts []string + Ifs []If + Status int + To string + func NewComplexRule(base, pattern, to string, status int, ext []string, ifs []If) (*ComplexRule, error) + func (r *ComplexRule) Rewrite(fs http.FileSystem, req *http.Request) (re Result) + type If struct + A string + B string + Operator string + func NewIf(a, operator, b string) (If, error) + func (i If) True(r *http.Request) bool + type Result int + const RewriteDone + const RewriteIgnored + const RewriteStatus + func To(fs http.FileSystem, r *http.Request, to string, replacer middleware.Replacer) Result type Rewrite + FileSys http.FileSystem v0.8.0 Dec 4, 2015 v0.7.6 Sep 28, 2015 v0.7.5 Aug 5, 2015 v0.7.4 Jul 30, 2015 v0.7.3 Jul 15, 2015 v0.7.2 Jul 1, 2015 v0.7.1 Jun 2, 2015 v0.7.0 May 25, 2015 Changes in this version + type RegexpRule struct + Base string + Exts []string + To string + func NewRegexpRule(base, pattern, to string, ext []string) (*RegexpRule, error) + func (r *RegexpRule) Rewrite(req *http.Request) bool type Rule + Rewrite func(*http.Request) bool + type SimpleRule struct + From string + To string + func NewSimpleRule(from, to string) SimpleRule + func (s SimpleRule) Rewrite(r *http.Request) bool v0.6.0 May 6, 2015 Changes in this version + type Rule struct + From string + To string v0.5.1 Apr 30, 2015 v0.5.0 Apr 28, 2015 Changes in this version + func New(c middleware.Controller) (middleware.Middleware, error) + type Rewrite struct + Next middleware.Handler + Rules []RewriteRule + func (rw Rewrite) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) + type RewriteRule struct + From string + To string