common

package
v0.0.0-...-997d260 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Paginate

func Paginate(info *PageInfo) func(db *gorm.DB) *gorm.DB

Types

type Empty

type Empty struct{}

type GetAuthorityId

type GetAuthorityId struct {
	AuthorityId string `json:"authorityId" form:"authorityId" example:"角色ID"`
}

GetAuthorityId Get role by AuthorityI structure

type GetByID

type GetByID struct {
	Id uint `json:"id" form:"page" swaggertype:"string" example:"uint 主键ID"`
}

GetByID get by ID

type GetByIDs

type GetByIDs struct {
	Ids []uint `json:"ids" form:"ids" swaggertype:"array,number"`
}

type PageInfo

type PageInfo struct {
	Page     int   `json:"page" form:"page" swaggertype:"string" example:"int 页码"`
	PageSize int   `json:"pageSize" form:"pageSize" swaggertype:"string" example:"int 每页大小"`
	Total    int64 `json:"total" form:"page" swaggertype:"string" example:"int 总记录数"`
}

PageInfo Paging common input parameter structure

func (*PageInfo) Paginate

func (r *PageInfo) Paginate(info *PageInfo) func(db *gorm.DB) *gorm.DB

type PageResult

type PageResult struct {
	List  interface{} `json:"list"`
	Total int64       `json:"total"`
	PageInfo
}

func NewPageResult

func NewPageResult(list interface{}, total int64, info PageInfo) *PageResult

Jump to

Keyboard shortcuts

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