You've already forked CasaOS
mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-07-15 23:54:17 +02:00
added google drive
This commit is contained in:
20
model/req.go
Normal file
20
model/req.go
Normal file
@ -0,0 +1,20 @@
|
||||
package model
|
||||
|
||||
type PageReq struct {
|
||||
Page int `json:"page" form:"page"`
|
||||
PerPage int `json:"per_page" form:"per_page"`
|
||||
}
|
||||
|
||||
const MaxUint = ^uint(0)
|
||||
const MinUint = 0
|
||||
const MaxInt = int(MaxUint >> 1)
|
||||
const MinInt = -MaxInt - 1
|
||||
|
||||
func (p *PageReq) Validate() {
|
||||
if p.Page < 1 {
|
||||
p.Page = 1
|
||||
}
|
||||
if p.PerPage < 1 {
|
||||
p.PerPage = MaxInt
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user