Documentation
¶
Index ¶
- func AddAttrib(r *http.Request, name string, value string)
- func AllParams(r *http.Request, entity interface{}) (map[string][]string, map[string]string, map[string][]string)
- func Filter(data map[string]string, entity interface{}) *emity.MsgEmity
- func GetAttrib(r *http.Request, name string) string
- func GetBody(r *http.Request, entity interface{}) *emity.MsgEmity
- func GetEntity(r *http.Request, entity interface{}) *emity.MsgEmity
- func GetHeader(r *http.Request) map[string]string
- func GetHearParam(r *http.Request, name string, def interface{}) interface{}
- func GetParam(r *http.Request, name string, def interface{}) interface{}
- func GetParamToId(r *http.Request, idName string) interface{}
- func GetParamToVersion(r *http.Request, hasVersion bool, versionName string) int
- func GetParams(r *http.Request, entity interface{}) *emity.MsgEmity
- func GetParamsAll(r *http.Request, addHeader bool) map[string]interface{}
- func SetResponse(w http.ResponseWriter, me *emity.MsgEmity)
- func SetupCORS(w http.ResponseWriter)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllParams ¶
func AllParams(r *http.Request, entity interface{}) (map[string][]string, map[string]string, map[string][]string)
*
- 取所有参数,并转换成对应实体属性类型(map[string]interface{})
- @param ctx gin请求上下文
- @param entity 实体对象
- @return map[string]interface{}
func GetParamsAll ¶
取所有参数(map[string]interface{})
func SetResponse ¶
func SetResponse(w http.ResponseWriter, me *emity.MsgEmity)
*
- 设置统一返回信息
- w Http响应对象
- me 统一信息
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.