function

CountedPage

CountedPage returns the normalized page for documents read at the bounds ListPageBounds computes for the requested page, limit and exact total.

Arguments

ArgumentTypeDescription
documents[]DocumentThe documents value.
pageintThe page value.
limitintThe limit value.
totalintThe total value.

Returns

The declared result.

Page

Full signature

func CountedPage( documents []Document, page, limit, total int, ) Page

Source store/store.go:276

Related types

  • Document

    A stored document with status and version metadata.

  • Page

    A paginated result and total count.