Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SuccessResponse ¶
Types ¶
type GenericResponse ¶
type SearchParams ¶
type SearchParams struct { PageNumber int PageSize int SortBy string ReverseSort bool Filters map[string]string }
func ApplySearchParams ¶
func ApplySearchParams(opts ...SearchParamsOpt) *SearchParams
func (SearchParams) Limit ¶
func (opts SearchParams) Limit() int
func (SearchParams) NumberOfPages ¶
func (opts SearchParams) NumberOfPages(recordsCount int64) int
func (SearchParams) Offset ¶
func (opts SearchParams) Offset() int
type SearchParamsOpt ¶
type SearchParamsOpt = func(*SearchParams)
func Filters ¶
func Filters(filters map[string]string) SearchParamsOpt
func Pagination ¶
func Pagination(pageNumber int, pageSize int) SearchParamsOpt
func Sorting ¶
func Sorting(sortBy string, reverse bool) SearchParamsOpt
Click to show internal directories.
Click to hide internal directories.