rewrite

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2014 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const Type = "rewrite"

Variables

This section is empty.

Functions

func CliFlags

func CliFlags() []cli.Flag

func FromCli

func FromCli(c *cli.Context) (plugin.Middleware, error)

func FromOther

func FromOther(rw Rewrite) (plugin.Middleware, error)

func GetSpec

func GetSpec() *plugin.MiddlewareSpec

Types

type Rewrite

type Rewrite struct {
	Regexp      string
	Replacement string
	RewriteBody bool
	Redirect    bool
}

func NewRewrite

func NewRewrite(regex, replacement string, rewriteBody, redirect bool) (*Rewrite, error)

func (*Rewrite) NewMiddleware

func (rw *Rewrite) NewMiddleware() (middleware.Middleware, error)

func (*Rewrite) String

func (rw *Rewrite) String() string

type RewriteInstance

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

func NewRewriteInstance

func NewRewriteInstance(spec *Rewrite) (*RewriteInstance, error)

func (*RewriteInstance) ProcessRequest

func (rw *RewriteInstance) ProcessRequest(r request.Request) (*http.Response, error)

func (*RewriteInstance) ProcessResponse

func (rw *RewriteInstance) ProcessResponse(r request.Request, a request.Attempt)

Jump to

Keyboard shortcuts

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