Documentation ¶
Index ¶
- Constants
- type BaseModel
- type BaseModeller
- type Filter
- type Model
- type Modeller
- type Pagination
- func (p *Pagination) Count() uint
- func (p *Pagination) CurrentPage() uint
- func (p *Pagination) FirstItem() interface{}
- func (p *Pagination) ItemArr() interface{}
- func (p *Pagination) LastItem() interface{}
- func (p *Pagination) LastPage() uint
- func (p *Pagination) PerPage() uint
- func (p *Pagination) Total() uint
- type Sort
Constants ¶
View Source
const ( ASC sortDirection = iota DESC )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseModel ¶ added in v0.2.0
type BaseModel struct {
// contains filtered or unexported fields
}
func (*BaseModel) SetTableName ¶ added in v0.3.2
type BaseModeller ¶ added in v0.2.0
type Modeller ¶
type Modeller interface { BaseModeller TableName() string Default() interface{} ObjArr(filterArr []Filter, sortArr []Sort, limit int, withTrashed bool) (interface{}, error) ObjArrPaginate(c *gin.Context, perPage uint, filterArr []Filter, sortArr []Sort, limit int, withTrashed bool) (pagination Pagination, err error) }
type Pagination ¶
type Pagination struct {
// contains filtered or unexported fields
}
func (*Pagination) Count ¶
func (p *Pagination) Count() uint
func (*Pagination) CurrentPage ¶
func (p *Pagination) CurrentPage() uint
func (*Pagination) FirstItem ¶
func (p *Pagination) FirstItem() interface{}
func (*Pagination) ItemArr ¶
func (p *Pagination) ItemArr() interface{}
func (*Pagination) LastItem ¶
func (p *Pagination) LastItem() interface{}
func (*Pagination) LastPage ¶
func (p *Pagination) LastPage() uint
func (*Pagination) PerPage ¶
func (p *Pagination) PerPage() uint
func (*Pagination) Total ¶
func (p *Pagination) Total() uint
Click to show internal directories.
Click to hide internal directories.