request

package
v0.0.0-...-dae8c3a Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const PageSize = 15

PageSize 默认分页大小

Variables

This section is empty.

Functions

func GetIP

func GetIP(c *gin.Context) string

GetIP 获取IP

func GetLimit

func GetLimit(c *gin.Context) int

GetLimit 获取limit信息

func GetOffset

func GetOffset(c *gin.Context) (int, int)

GetOffset 获取 (limit, offset)

func GetPage

func GetPage(c *gin.Context) int

GetPage 获取页码

func GetPlatform

func GetPlatform(c *gin.Context) string

GetPlatform 获取平台信息

func GetSiteCode

func GetSiteCode(c *gin.Context) string

GetSiteCode 获取平台信息

func IsAjax

func IsAjax(c *gin.Context) bool

IsAjax 是否是ajax请求

Types

type Cond

type Cond struct {
	Ands []string
	Ors  []string
}

Cond 查询条件

func GetQueryCond

func GetQueryCond(c *gin.Context, data map[string]interface{}) *Cond

GetQueryCond 得到查询条件

func (*Cond) And

func (ths *Cond) And(key string, value interface{})

And 条件: and

func (*Cond) Build

func (ths *Cond) Build() string

Build 构建查询条件

func (*Cond) Ge

func (ths *Cond) Ge(key string, value interface{})

Ge 条件: >=

func (*Cond) Gt

func (ths *Cond) Gt(key string, value interface{})

Gt 条件: >

func (*Cond) Le

func (ths *Cond) Le(key string, value interface{})

Le 条件: <=

func (*Cond) Like

func (ths *Cond) Like(key string, value interface{})

Like 条件: like

func (*Cond) Lt

func (ths *Cond) Lt(key string, value interface{})

Lt 条件: <

func (*Cond) Or

func (ths *Cond) Or(key string, value interface{})

Or 条件: or

Jump to

Keyboard shortcuts

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