binding

package
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindParams

func BindParams(ctx *gin.Context, req interface{}) error

gin param 参数绑定

func BindRequest

func BindRequest(ctx *gin.Context, req interface{}) error

*

  • gin post/get 参数绑定
  • 根据请求方法判断 *
  • MIMEJSON == application/json
  • MIMEPOSTForm == application/x-www-form-urlencoded
  • MIMEMultipartPOSTForm == multipart/form-data

func BindRequestPost added in v1.0.1

func BindRequestPost(ctx *gin.Context, req interface{}) error

*

  • gin post 参数绑定
  • 根据请求方法判断 *
  • MIMEJSON == application/json
  • MIMEPOSTForm == application/x-www-form-urlencoded
  • MIMEMultipartPOSTForm == multipart/form-data

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL