extensions

package
v0.0.0-...-3c3ec8e Latest Latest
Warning

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

Go to latest
Published: May 2, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FnHandlerRequest

type FnHandlerRequest func(req *http.Request) (*http.Request, error)

FnHandlerRequest is a function that can process a request

type RequestHandler

type RequestHandler interface {
	//Process the request and return the modification or error
	Process(req *http.Request) (*http.Request, error)
	//Name of the request handler
	Name() string
}

RequestHandler if a function that modifies a request. Execution occurs after authentication but before proxy to upstream

type SimpleRequestHandler

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

SimpleRequestHandler is a simple container to modify requests

func NewRequestHandler

func NewRequestHandler(name string, handler FnHandlerRequest) *SimpleRequestHandler

NewRequestHandler creates a named wrapper to a requesthandler function

func (*SimpleRequestHandler) Name

func (h *SimpleRequestHandler) Name() string

Name of the requesthandler

func (*SimpleRequestHandler) Process

func (h *SimpleRequestHandler) Process(req *http.Request) (*http.Request, error)

Process the Request

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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