proxy

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

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

func NewProxyMiddleware

func NewProxyMiddleware(options ...MiddlewareOption) *Middleware

func (*Middleware) ServeHTTP

func (m *Middleware) ServeHTTP(response http.ResponseWriter, request *http.Request)

type MiddlewareOption

type MiddlewareOption = func(*Middleware)

func WithHTTPClient

func WithHTTPClient(http contracts.HTTPClient) MiddlewareOption

func WithLogger

func WithLogger(logger contracts.Logger) MiddlewareOption

func WithURLReplacerFactory

func WithURLReplacerFactory(replacerFactory URLReplacerFactory) MiddlewareOption

type URLReplacerFactory added in v0.0.9

type URLReplacerFactory interface {
	Make(requestURL *url.URL) (*urlreplacer.Replacer, *urlreplacer.Replacer, error)
}

Jump to

Keyboard shortcuts

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