1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-04 09:30:17 +00:00

support filter to get router. get runController & runMethod

This commit is contained in:
asta.xie
2014-03-29 14:55:34 +08:00
parent 2f4acf46c6
commit 5588bfc35e
2 changed files with 37 additions and 26 deletions

View File

@ -4,6 +4,7 @@ import (
"bytes"
"io/ioutil"
"net/http"
"reflect"
"strconv"
"strings"
@ -13,11 +14,13 @@ import (
// BeegoInput operates the http request header ,data ,cookie and body.
// it also contains router params and current session.
type BeegoInput struct {
CruSession session.SessionStore
Params map[string]string
Data map[interface{}]interface{} // store some values in this context when calling context in filter or controller.
Request *http.Request
RequestBody []byte
CruSession session.SessionStore
Params map[string]string
Data map[interface{}]interface{} // store some values in this context when calling context in filter or controller.
Request *http.Request
RequestBody []byte
RunController reflect.Type
RunMethod string
}
// NewInput return BeegoInput generated by http.Request.