Documentation ¶
Index ¶
- type HttpUtil
- func (util HttpUtil) DoGet(url string, params map[string]interface{}, hears map[string]string) *model.MsgEmity
- func (util HttpUtil) DoPost(url string, params map[string]interface{}, hears map[string]string, ...) *model.MsgEmity
- func (util HttpUtil) Get(url string, jsonParams string) string
- func (util HttpUtil) Post(url string, sParams string, isJsonParams bool) string
- type HttpsUtil
- type UrlUtil
- func (uu UrlUtil) AddAttrib(ctx *gin.Context, name string, value string)
- func (UrlUtil) AllParams(ctx *gin.Context, entity interface{}) (map[string][]string, map[string]string, map[string][]string)
- func (uu UrlUtil) Filter(data map[string]string, entity interface{}) *model.MsgEmity
- func (uu UrlUtil) GetAttrib(ctx *gin.Context, name string) string
- func (uu UrlUtil) GetBody(ctx *gin.Context, entity interface{}) *model.MsgEmity
- func (UrlUtil) GetHeader(ctx *gin.Context) map[string]string
- func (uu UrlUtil) GetHearParam(ctx *gin.Context, name string, def interface{}) interface{}
- func (uu UrlUtil) GetParam(ctx *gin.Context, name string, def interface{}) interface{}
- func (uu UrlUtil) GetParamToId(ctx *gin.Context, idName string) interface{}
- func (uu UrlUtil) GetParamToVersion(ctx *gin.Context, hasVersion bool) int
- func (uu UrlUtil) GetParams(ctx *gin.Context, entity interface{}) *model.MsgEmity
- func (uu UrlUtil) GetParamsAll(ctx *gin.Context, addHeader bool) map[string]interface{}
- func (uu UrlUtil) SetResponse(ctx *gin.Context, me *model.MsgEmity)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpUtil ¶
type HttpUtil struct{}
type HttpsUtil ¶
type HttpsUtil struct{}
type UrlUtil ¶
type UrlUtil struct{}
func (UrlUtil) AllParams ¶
func (UrlUtil) AllParams(ctx *gin.Context, entity interface{}) (map[string][]string, map[string]string, map[string][]string)
*
- 取所有参数,并转换成对应实体属性类型(map[string]interface{})
- @param ctx gin请求上下文
- @param entity 实体对象
- @return map[string]interface{}
func (UrlUtil) GetParamsAll ¶
取所有参数(map[string]interface{})
Click to show internal directories.
Click to hide internal directories.