Documentation ¶
Index ¶
Constants ¶
View Source
const ( //全量更新 UPDATE_MODE_PUT = iota //部分更新 UPDATE_MODE_PATCH )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DevMeta ¶
type DevMeta struct { // 设备Id Id int `json:"id" gorm:"column:id"` //如果主键不为id(int)(之前主键用了name varchar(255)),updatedevice时会报WHERE conditions required异常 }
设备通用参数
func NewDevMeta ¶
func NewDevMeta() *DevMeta
type PageRequest ¶
type PageRequest struct { // 分页的大小 PageSize int `json:"page_size"` // 当前页码 PageNumber int `json:"page_number"` }
func NewPageRequest ¶
func NewPageRequest() *PageRequest
func NewPageRequestFromGinCtx ¶
func NewPageRequestFromGinCtx(c *gin.Context) *PageRequest
func (*PageRequest) Offset ¶
func (req *PageRequest) Offset() int
type UPDATE_MODE ¶
type UPDATE_MODE int
Click to show internal directories.
Click to hide internal directories.