Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockPaginable ¶
MockPaginable is an autogenerated mock type for the Paginable type
func (*MockPaginable) CreatePagination ¶
func (_m *MockPaginable) CreatePagination(ctx context.Context, tableName string, holder interface{}, pageSort *PageSort) (*Page, error)
CreatePagination provides a mock function with given fields: ctx, tableName, holder, pageSort
type Page ¶
type Page struct { TotalPages uint `json:"total_pages,omitempty"` CurrentPage uint `json:"current_page,omitempty"` PreviousPage uint `json:"previous_page,omitempty"` PageSize uint `json:"page_size,omitempty"` NextPage uint `json:"next_page,omitempty"` TotalEntries uint `json:"total_entries,omitempty"` Data interface{} `json:"data,omitempty"` }
type PageSort ¶
type PageSort struct { Page uint `json:"page_number,omitempty"` ItemsPerPage uint `json:"itemsPerPage,omitempty"` SortBy []string `json:"sortBy,omitempty"` SortDesc []bool `json:"sortDesc,omitempty"` GroupBy []string `json:"groupBy,omitempty"` GroupDesc []bool `json:"groupDesc,omitempty"` // TODO: make mustSort and multiSort useful MustSort bool `json:"mustSort,omitempty"` MultiSort bool `json:"multiSort,omitempty"` // contains filtered or unexported fields }
func CreatePageSortFromMap ¶
func (*PageSort) GetFiltersQueries ¶
func (*PageSort) GetItemsPerPage ¶
func (*PageSort) GetSortQueries ¶
func (*PageSort) SetFiltersQueries ¶
SetFiltersQueries allows to add filters to be consider to the pagination
type Paginator ¶
type Paginator struct {
// contains filtered or unexported fields
}
func NewPaginator ¶
func NewPaginator(repo rel.Repository, config *RelPaginatorConfig) *Paginator
type RelPaginatorConfig ¶
type RelPaginatorConfig struct {
PageSize uint
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.