Back to godoc.org

Package param

v0.0.0-...-92ef796
Latest Go to latest

The latest major version is .

Published: Mar 21, 2020 | License: MIT | Module: github.com/Aoi-hosizora/IM_MSA

Index

func BindRouteId

func BindRouteId(c *gin.Context, field string) (int32, bool)

make sure id is greater than 0

type FriendParam

type FriendParam struct {
	Uid int32 `form:"to" json:"to" binding:"required,gte=1"`
}

@Model FriendParam @Description Friend parameter @Property to integer true "friend uid"

type LoginParam

type LoginParam struct {
	Username string `form:"username" json:"username" binding:"required"`
	Password string `form:"password" json:"password" binding:"required"`
	Expire   int64  `form:"expire"   json:"expire"`
}

@Model LoginParam @Description Login parameter @Property username string true "username" @Property password string true "password" @Property expire integer false "login expire" (default:604800)

type MessageParam

type MessageParam struct {
	Message string `form:"message" json:"message" binding:"required"`
}

type PageOrderParam

type PageOrderParam struct {
	*PageParam
	Order string
}

func BindPageOrder

func BindPageOrder(c *gin.Context, config *config.ServerConfig) *PageOrderParam

type PageParam

type PageParam struct {
	Page  int32
	Limit int32
}

func BindPage

func BindPage(c *gin.Context, config *config.ServerConfig) *PageParam

type PassParam

type PassParam struct {
	Password string `form:"password" json:"password" binding:"required,min=8,max=30,pwd"`
}

@Model PassParam @Description Update password parameter @Property password string true "password, length between [5, 30]"

type RegisterParam

type RegisterParam struct {
	Username string `form:"username" json:"username" binding:"required,min=5,max=30,name"`
	Password string `form:"password" json:"password" binding:"required,min=8,max=30,pwd"`
}

@Model RegisterParam @Description Register parameter @Property username string true "username, length between [5, 30]" @Property password string true "password, length between [8, 30]"

type UserParam

type UserParam struct {
	Username string `form:"username" json:"username" binding:"required,min=5,max=30,name"`
}

@Model UserParam @Description Update user parameter @Property username string true "username, length between [5, 30]"

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier