Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindOnlyRequest ¶ added in v0.1.0
BindOnlyRequest is BindRequest is without validate
func BindRequest ¶
BindRequest binds the passed struct pointer using binding.Request. It will abort the request with HTTP 400 if any error occurs.
func ShouldBindOnlyRequest ¶ added in v0.1.0
ShouldBindOnlyRequest is ShouldBindRequest is without validate
func ShouldBindRequest ¶
ShouldBindRequest binds the passed struct pointer using the specified binding engine.
including
`path`,
`query`
`header` and
`body data` with tag `body:"body"`
and it's decoder is decided by header `Content-Type` value
type Params struct {
Name string `path:"name"`
Age int `query:"age,default=18"`
Money int32 `query:"money" binding:"required"`
Authorization string `cookie:"Authorization"`
UserAgent string `header:"User-Agent"`
Data struct {
Replicas *int32 `json:"replicas" yaml:"replicas" xml:"replicas" form:"replicas"`
} `body:"body"`
}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.


