req

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind(c *gin.Context, obj any) (err error)

func ShouldBind

func ShouldBind(c *gin.Context, obj any) (err error)

Types

type Captcha

type Captcha struct {
	UUID string `json:"uuid" form:"uuid" binding:"required"`
	Code string `json:"code" form:"code" binding:"required"`
}

type IDReq

type IDReq[T uint64 | string] struct {
	ID T `json:"id" yaml:"id" form:"id" binding:"required"`
}

type LikeReq

type LikeReq struct {
	Keyword string `json:"keyword" form:"keyword"`
}

type NameReq

type NameReq struct {
	Name string `form:"name" json:"name" binding:"required"`
}

type PaginationReq

type PaginationReq struct {
	Page int `json:"page" form:"page"`
	Size int `json:"size" form:"size"`
}

func (*PaginationReq) FindPage

func (p *PaginationReq) FindPage(sizeLimit ...int) (offset int, limit int)

func (*PaginationReq) StartEnd

func (p *PaginationReq) StartEnd() (start, end int)

Jump to

Keyboard shortcuts

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