study

package
v0.0.0-...-b9b72ee Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindForm

func BindForm(ctx *gin.Context)

func FileUpload

func FileUpload(ctx *gin.Context)

func FileUploadBatch

func FileUploadBatch(ctx *gin.Context)

func GetQueryArrData

func GetQueryArrData(ctx *gin.Context)

GetQueryArrData http://127.0.0.1:9000/query_arr?id=12,322,43

func GetQueryData

func GetQueryData(ctx *gin.Context)

func LogTest

func LogTest(ctx *gin.Context)

func RedirectA

func RedirectA(ctx *gin.Context)

func RedirectB

func RedirectB(ctx *gin.Context)

func SessionTest

func SessionTest(ctx *gin.Context)

func UserAdd

func UserAdd(ctx *gin.Context)

UserAdd

curl -X POST \
 http://127.0.0.1:9000/user_add \
 -H 'Postman-Token: 863e0a7b-442b-480c-8e61-71559c1fb101' \
 -H 'cache-control: no-cache' \
 -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
 -F name=1 \
 -F pwd=2 \
 -F love=22 \
 -F love=33 \
 -F 'user[addr]=aaaaa' \
 -F 'user[phone]=99999'

func UserAddBind

func UserAddBind(ctx *gin.Context)

func Validate

func Validate(ctx *gin.Context)

Types

type Article

type Article struct {
	Id      int    `form:"_"`
	Title   string `form:"title" valid:"Required"`
	Content string `form:"content" valid:"Min(5)"`
	Desc    string `form:"desc"`
}

Article valid : beego验证器

type User

type User struct {
	Name string `form:"name" json:"name" uri:"name"`
	Age  int    `form:"age" json:"age" uri:"age"`
	Addr string `form:"addr" json:"addr" uri:"addr"`
}

User form标签支持 get 和 post

type UserInfo

type UserInfo struct {
	Id   int    `form:"id"`
	Name string `form:"name"`
	Age  int    `form:"age"`
	Addr string `form:"addr"`
}

Jump to

Keyboard shortcuts

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