Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CriteriaAndPagination ¶
type CriteriaAndPagination[T any] struct { Criteria T Pagination Pagination }
func NewCriteriaAndPagination ¶
func NewCriteriaAndPagination[T any](criteria T) CriteriaAndPagination[T]
type Page ¶
TODO next Pageable, map.
func NewEmptyPage ¶
func NewPageWith ¶
func NewPageWith[T any](content []T, pageable Pageable, totalSupplier TotalSupplier) (*Page[T], error)
func (Page[T]) NumberOfElements ¶
func (Page[T]) TotalPages ¶
type Pagination ¶
type Pagination struct { Page int `json:"page" uri:"page" form:"page"` Limit int `json:"limit" uri:"limit" form:"limit"` Field string `json:"field" uri:"field" form:"field"` Direction string `json:"direction" uri:"direction" form:"direction"` // TODO, validation, default }
func NewPaginationWithDefaults ¶
func NewPaginationWithDefaults() Pagination
func (Pagination) IsOrderDefined ¶
func (p Pagination) IsOrderDefined() bool
func (Pagination) Offset ¶
func (p Pagination) Offset() int
func (Pagination) Order ¶
func (p Pagination) Order() string
func (Pagination) PageNumber ¶
func (p Pagination) PageNumber() int
func (Pagination) PageSize ¶
func (p Pagination) PageSize() int
type TotalSupplier ¶
Click to show internal directories.
Click to hide internal directories.