scriproxy

package
v0.0.0-...-808d516 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestRewriter

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

RequestRewriter can be used to rewrite http requests.

func NewRequestRewriter

func NewRequestRewriter(
	userScript []byte,
	libraries []string,
) (RequestRewriter, error)

NewRequestRewriter creates a RequestRewriter out of a tengo script. The libraries used in the script should also be specified.

func (RequestRewriter) Rewrite

func (w RequestRewriter) Rewrite(request *http.Request) error

Rewrite accepts a pointer to http.Request and rewrites it.

Jump to

Keyboard shortcuts

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