Documentation ¶
Index ¶
- Constants
- type BaseModel
- func (bm *BaseModel) AfterFind(scope *gorm.DB) (err error)
- func (bm *BaseModel) BeforeCreate(scope *gorm.DB) (err error)
- func (bm *BaseModel) BeforeSave(scope *gorm.DB) (err error)
- func (bm *BaseModel) BeforeUpdate(scope *gorm.DB) (err error)
- func (bm *BaseModel) DB() *gorm.DB
- func (bm *BaseModel) SetDB(db *gorm.DB)
- func (bm *BaseModel) SetTX(db *gorm.DB)
- func (bm *BaseModel) SetTableName(tableName string) string
- type BaseModeller
- type Context
- 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
- type Webroutes
Constants ¶
View Source
const ( ASC sortDirection = iota DESC )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseModel ¶
type BaseModel struct {
// contains filtered or unexported fields
}
func (*BaseModel) BeforeCreate ¶ added in v1.0.2
func (*BaseModel) SetTableName ¶
type Context ¶
type Context interface { context.RequestParamContextor }
type Modeller ¶
type Modeller interface { BaseModeller TableName() string Default() interface{} }
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
type Webroutes ¶ added in v1.0.16
type Webroutes struct { BaseModel ID uint `gorm:"column:id;primary_key;auto_increment"` RouteName string `gorm:"column:routename;type:varchar(255)"` Controller string `gorm:"column:controller;type:varchar(255);unique_index;not null"` Function string `gorm:"column:Function;type:varchar(255);not null"` Path string `gorm:"column:path;type:varchar(255);not null"` CreatedAt zone.Time `gorm:"column:created_at"` UpdatedAt zone.Time `gorm:"column:updated_at"` DeletedAt *zone.Time `gorm:"column:deleted_at"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.