Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultPageSize 默认分页大小 DefaultPageSize = 20 // DefaultPageNumber 默认页号 DefaultPageNumber = 1 )
Variables ¶
View Source
var ( // BodyMaxContenxLength body最大大小 默认64M BodyMaxContenxLength int64 = 1 << 26 )
View Source
var ( // DefaultScanForwareHeaderKey 协商forward ip 的 hander key名称 DefaultScanForwareHeaderKey = []string{"X-Forwarded-For", "X-Real-IP"} )
Functions ¶
func GetDataFromRequest ¶ added in v0.1.2
GetDataFromRequest todo
Types ¶
type PageRequest ¶
type PageRequest struct {
page.PageRequest
}
PageRequest 分页请求 request
func NewPageRequest ¶ added in v0.1.2
func NewPageRequest(ps uint, pn uint) *PageRequest
NewPageRequest 实例化
func NewPageRequestFromHTTP ¶ added in v0.1.2
func NewPageRequestFromHTTP(req *http.Request) *PageRequest
NewPageRequestFromHTTP 从HTTP请求中加载分页请求
func (*PageRequest) GetOffset ¶ added in v0.6.6
func (p *PageRequest) GetOffset() int64
GetOffset skip 如果传入了offset则使用传入的offset参数
Click to show internal directories.
Click to hide internal directories.