Documentation ¶
Overview ¶
* This is gen middleware for the web apps using the middlewares that supports http handleFunc
Index ¶
- Constants
- func After(apiCall *models.ApiCall, record *responseRecorder, r *http.Request)
- func Before(apiCall *models.ApiCall, req *http.Request)
- func Handle(nextHandler http.Handler) http.Handler
- func HandleFunc(next func(http.ResponseWriter, *http.Request)) http.HandlerFunc
- func HandlerParamComment(req *http.Request, body string) (string, map[string]string)
- func NewResponseRecorder(w http.ResponseWriter) *responseRecorder
- func ReadBody(req *http.Request) *string
- func ReadHeaders(req *http.Request, apiCall *models.ApiCall) map[string]string
- func ReadHeadersFromResponse(header http.Header) map[string]string
- func ReadMultiPostForm(mpForm *multipart.Form) map[string]string
- func ReadPostForm(req *http.Request) map[string]string
- func ReadQueryParams(req *http.Request) map[string]string
- type YaagHandler
Constants ¶
View Source
const MaxInMemoryMultipartSize = 32000000
32 MB in memory max
Variables ¶
This section is empty.
Functions ¶
func HandleFunc ¶
func HandleFunc(next func(http.ResponseWriter, *http.Request)) http.HandlerFunc
func HandlerParamComment ¶ added in v1.0.3
解析参数中的备注
func NewResponseRecorder ¶
func NewResponseRecorder(w http.ResponseWriter) *responseRecorder
Types ¶
type YaagHandler ¶
type YaagHandler struct {
// contains filtered or unexported fields
}
func (*YaagHandler) ServeHTTP ¶
func (y *YaagHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.