query

package
v0.2.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 0 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL