result

package
v3.14.5 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Paginated

type Paginated[T any] struct {
	// contains filtered or unexported fields
}

Paginated holds the result of a search request, as well as some related metadata

func NewPaginated

func NewPaginated[T any](maxResultsPerPage, page, totalHits int, hits T) Paginated[T]

func (Paginated[T]) Hits

func (P Paginated[T]) Hits() T

func (Paginated[T]) MaxResultsPerPage

func (P Paginated[T]) MaxResultsPerPage() int

func (Paginated[T]) Page

func (P Paginated[T]) Page() int

func (Paginated[T]) TotalHits

func (P Paginated[T]) TotalHits() int

func (Paginated[T]) TotalPages

func (P Paginated[T]) TotalPages() int

Jump to

Keyboard shortcuts

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