query

package
v0.0.0-...-8ad27d5 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package query provides support for query paging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result[T any] struct {
	Items       []T `json:"items"`
	Total       int `json:"total"`
	Page        int `json:"page"`
	RowsPerPage int `json:"rowsPerPage"`
}

Result is the data model used when returning a query result.

func NewResult

func NewResult[T any](items []T, total int, page page.Page) Result[T]

NewResult constructs a result value to return query results.

Jump to

Keyboard shortcuts

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