Documentation ¶
Index ¶
- Constants
- func Apply(in io.Reader, out io.Writer, request *http.Request) error
- func ApplyString(in string, out io.Writer, request *http.Request) error
- func CliFlags() []cli.Flag
- func FromCli(c *cli.Context) (plugin.Middleware, error)
- func FromOther(rw Rewrite) (plugin.Middleware, error)
- func GetSpec() *plugin.MiddlewareSpec
- type Rewrite
Constants ¶
View Source
const Type = "rewrite"
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
Apply reads a template string from the provided reader, applies variables from the provided request object to it and writes the result into the provided writer.
Template is standard Go's http://golang.org/pkg/text/template/.
func ApplyString ¶
ApplyString applies variables from the provided request object to the provided template string and writes the result into the provided writer.
Template is standard Go's http://golang.org/pkg/text/template/.
func GetSpec ¶
func GetSpec() *plugin.MiddlewareSpec
Types ¶
type Rewrite ¶
func NewRewrite ¶
Click to show internal directories.
Click to hide internal directories.