Documentation ¶
Index ¶
- Constants
- Variables
- type CombinedFilter
- type Filter
- type Pagination
- func (p *Pagination) AddFilter(f Filter)
- func (p *Pagination) Fetch(db *gorm.DB, dest interface{}) (*database.Paginator, *gorm.DB)
- func (p *Pagination) GetFilter(key string) *Filter
- func (p *Pagination) GetFilters() []Filter
- func (p *Pagination) GetLimit() int
- func (p *Pagination) GetOffset() int
- func (p *Pagination) GetPage() int
- func (p *Pagination) GetSortColumn() string
- func (p *Pagination) GetSortOrder() string
- func (p *Pagination) MakePaginationRequest()
- func (p *Pagination) Response(ctx context.Context) (out domain.PaginationResponse, err error)
Constants ¶
View Source
const COMBINED_FILTER = "combinedFilter" // deprecated
View Source
const FILTER = "filter"
View Source
const FILTER_ARRAY = "filter[]"
View Source
const OR = "or"
View Source
const OR_ARRAY = "or[]"
View Source
const PAGE_NUMBER = "pageNumber"
View Source
const PAGE_SIZE = "pageSize"
View Source
const SORT_COLUMN = "sortColumn"
View Source
const SORT_ORDER = "sortOrder"
Variables ¶
View Source
var DEFAULT_LIMIT = 10000
Functions ¶
This section is empty.
Types ¶
type CombinedFilter ¶
type Pagination ¶
type Pagination struct { Limit int Page int SortColumn string SortOrder string Filters []Filter CombinedFilter CombinedFilter // deprecated TotalRows int64 TotalPages int PaginationRequest *goyave.Request Paginator *database.Paginator }
func NewPagination ¶
func NewPagination(urlParams *url.Values) *Pagination
func NewPaginationWithFilter ¶
func NewPaginationWithFilter(column string, releation string, op string, values []string) *Pagination
func (*Pagination) AddFilter ¶
func (p *Pagination) AddFilter(f Filter)
func (*Pagination) GetFilter ¶
func (p *Pagination) GetFilter(key string) *Filter
func (*Pagination) GetFilters ¶
func (p *Pagination) GetFilters() []Filter
func (*Pagination) GetLimit ¶
func (p *Pagination) GetLimit() int
func (*Pagination) GetOffset ¶
func (p *Pagination) GetOffset() int
func (*Pagination) GetPage ¶
func (p *Pagination) GetPage() int
func (*Pagination) GetSortColumn ¶
func (p *Pagination) GetSortColumn() string
func (*Pagination) GetSortOrder ¶
func (p *Pagination) GetSortOrder() string
func (*Pagination) MakePaginationRequest ¶
func (p *Pagination) MakePaginationRequest()
func (*Pagination) Response ¶
func (p *Pagination) Response(ctx context.Context) (out domain.PaginationResponse, err error)
Click to show internal directories.
Click to hide internal directories.