middleware

package
Version: v0.0.0-...-2162286 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MiddlewareFunc

type MiddlewareFunc func(parent http.RoundTripper) http.RoundTripper

func Compose

func Compose(middlewareFuncs ...MiddlewareFunc) MiddlewareFunc

Compose returns a middlewareFunc that successively applies all the middlewareFuncs passed in the parameters Pay attention, Compose() applies the middleware right to left: order matters when appyling your middlewareFuncs

func NewPostResponseMiddleware

func NewPostResponseMiddleware(postResponseFunc PostResponseFunc) MiddlewareFunc

func NewPreRequestMiddleware

func NewPreRequestMiddleware(preRequestFunc PreRequestFunc) MiddlewareFunc

type PostResponseFunc

type PostResponseFunc func(resp *http.Response) (*http.Response, error)

type PostResponseMiddleware

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

func (PostResponseMiddleware) RoundTrip

func (postResponseMiddleware PostResponseMiddleware) RoundTrip(req *http.Request) (*http.Response, error)

type PreRequestFunc

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

type PreRequestMiddleware

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

func (PreRequestMiddleware) RoundTrip

func (preRequestMiddleware PreRequestMiddleware) RoundTrip(req *http.Request) (*http.Response, error)

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL