Documentation
¶
Index ¶
- func BindJSONIgnoreCase(c *gin.Context, req interface{}) (err error)
- func ShouldBind(c *gin.Context, req interface{}) error
- func ShouldBindJSON(c *gin.Context, req interface{}) error
- func ShouldBindQuery(c *gin.Context, req interface{}) error
- type Context
- type EmptyReq
- type IdReq
- type IdsReq
- type IsValidChecker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindJSONIgnoreCase ¶
把请求参数转换为小写
func ShouldBind ¶
func ShouldBindJSON ¶
func ShouldBindQuery ¶
Types ¶
type Context ¶
type Context struct {
context.Context `json:"-" header:"-"`
Token string `json:"token" header:"token" example:""`
Uid int64 `json:"uid" header:"-" example:""`
IpAddress string `json:"ip_address" header:"-" example:""`
UserAgent string `json:"user_agent" header:"-" example:""`
}
请求上下文,一般存放请求头参数
func (*Context) GetContext ¶
type IsValidChecker ¶
type IsValidChecker interface {
IsValid() error
}
Click to show internal directories.
Click to hide internal directories.