Documentation ¶
Index ¶
- func AddDataFilter(column string, action model.Operation, value string, db *gorm.DB) *gorm.DB
- func AddTimeFilter(timeFilter model.TimeFilter, column string, db *gorm.DB) *gorm.DB
- func Paginate(value interface{}, pagination *Pagination, db *gorm.DB) func(db *gorm.DB) *gorm.DB
- func TimeFilterFromValue(timeFilter model.TimeFilter) time.Time
- func TimeFilterToValue(timeFilter model.TimeFilter) time.Time
- type Pagination
- type QueryResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDataFilter ¶
func AddTimeFilter ¶
func TimeFilterFromValue ¶
func TimeFilterFromValue(timeFilter model.TimeFilter) time.Time
func TimeFilterToValue ¶
func TimeFilterToValue(timeFilter model.TimeFilter) time.Time
Types ¶
type Pagination ¶
type Pagination struct { Limit int `json:"limit,omitempty;query:limit"` Page int `json:"page,omitempty;query:page"` TotalRows int64 `json:"total_rows"` TotalPages int `json:"total_pages"` Rows interface{} `json:"rows"` }
func (*Pagination) GetLimit ¶
func (p *Pagination) GetLimit() int
func (*Pagination) GetOffset ¶
func (p *Pagination) GetOffset() int
func (*Pagination) GetPage ¶
func (p *Pagination) GetPage() int
type QueryResult ¶
type QueryResult struct { Result interface{} Error error }
Click to show internal directories.
Click to hide internal directories.