middleware

package
Version: v1.0.0-...-401145b Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

* This is yaag middleware for the web apps using the middlewares that supports http handleFunc

Index

Constants

View Source
const MaxInMemoryMultipartSize = 32000000

32 MB in memory max

Variables

This section is empty.

Functions

func After

func After(apiCall *models.ApiCall, writer *httptest.ResponseRecorder, w http.ResponseWriter, r *http.Request)

func Before

func Before(apiCall *models.ApiCall, req *http.Request)

func Handle

func Handle(nextHandler http.Handler) http.Handler

func HandleFunc

func HandleFunc(next func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)

func ReadBody

func ReadBody(req *http.Request) *string

func ReadHeaders

func ReadHeaders(req *http.Request) map[string]string

func ReadHeadersFromResponse

func ReadHeadersFromResponse(writer *httptest.ResponseRecorder) map[string]string

func ReadMultiPostForm

func ReadMultiPostForm(mpForm *multipart.Form) map[string]string

func ReadPostForm

func ReadPostForm(req *http.Request) map[string]string

func ReadQueryParams

func ReadQueryParams(req *http.Request) map[string]string

Types

type YaagHandler

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

func (*YaagHandler) ServeHTTP

func (y *YaagHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

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