application

package
v0.0.0-...-19a0cb6 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBodyReplacer

func NewBodyReplacer(oldnew []string) *bytereplacer.Replacer

NewBodyReplacer return a body singleton replacer.

func NewHeaderReplacer

func NewHeaderReplacer(oldnew []string) *strings.Replacer

NewHeaderReplacer return a body singleton replacer.

func NewHeaderRequestReplacer

func NewHeaderRequestReplacer(oldnew []string) *strings.Replacer

NewHeaderRequestReplacer return a body singleton replacer.

func NewProxy

func NewProxy(u *url.URL) *httputil.ReverseProxy

NewProxy returns a configured httputil.ReverseProxy

func ResetReplacers

func ResetReplacers()

ResetReplacers is used mainly in unit tests.

func UpdateResponse

func UpdateResponse(r *http.Response) error

UpdateResponse replaces the body pf a request with a modifyed one, golang cannot modify inplace the body.

Types

type Application

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

Application is the application object that runs HTTP server.

func New

func New(config *config.Conf) (*Application, error)

New is the constructor for Application struct.

func (*Application) MiddlewareStruct

func (app *Application) MiddlewareStruct() (*interpose.Middleware, error)

MiddlewareStruct helps embed stuff into the real handlers.

Jump to

Keyboard shortcuts

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