Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PageRequest ¶
type PageRequest struct {
Page int // Current page number (1-based)
PageSize int // Number of items per page
SortBy []SortOrder // Sorting criteria
}
PageRequest defines parameters for pagination.
type PageResponse ¶
type PageResponse[T any] struct { Content []T // The actual content for the current page TotalElements int64 // Total number of elements across all pages TotalPages int // Total number of pages Page int // Current page number PageSize int // Number of elements per page }
PageResponse holds paginated results.
type SortDirection ¶
type SortDirection string
SortDirection defines the direction of sorting.
const ( ASC SortDirection = "ASC" // Ascending order DESC SortDirection = "DESC" // Descending order )
type SortOrder ¶
type SortOrder struct {
Field string // Field to sort by
Direction SortDirection // Sorting direction (ASC or DESC)
}
SortOrder defines a single sorting criterion.
Click to show internal directories.
Click to hide internal directories.