Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CurrentResultInfos ¶
CurrentResultInfos page information
type PaginationConfig ¶
type PaginationConfig struct { ShowFirstPage bool `inject:"config:commerce.pagination.showFirstPage"` ShowLastPage bool `inject:"config:commerce.pagination.showLastPage"` //ShowAroundActivePageAmount - amount of pages to show before and after the current page (so a value of2 would show 2 pages before and 2 pages after) ShowAroundActivePageAmount float64 `inject:"config:commerce.pagination.showAroundActivePageAmount"` NameSpace string }
PaginationConfig - represents configuration Options used by the PaginationInfo Build method
type PaginationInfo ¶
PaginationInfo meta information
func BuildWith ¶
func BuildWith(currentResult CurrentResultInfos, paginationConfig PaginationConfig, urlBase *url.URL) PaginationInfo
BuildWith builds a paginationInfo based on the given infos and config
type PaginationInfoFactory ¶
type PaginationInfoFactory struct {
DefaultConfig *PaginationConfig `inject:""`
}
PaginationInfoFactory - used to build a configuration based on configured defaults
func (*PaginationInfoFactory) Build ¶
func (f *PaginationInfoFactory) Build(activePage int, totalHits int, pageSize int, lastPage int, urlBase *url.URL) PaginationInfo
Build Pagination with the default configuration
Click to show internal directories.
Click to hide internal directories.