page

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package page provides support for query paging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

type Page struct {
	// contains filtered or unexported fields
}

Page represents the requested page and rows per page.

func MustParse

func MustParse(page string, rowsPerPage string) Page

MustParse creates a paging value for testing.

func Parse

func Parse(page string, rowsPerPage string) (Page, error)

Parse parses the strings and validates the values are in reason.

func (Page) Number

func (p Page) Number() int

Number returns the page number.

func (Page) RowsPerPage

func (p Page) RowsPerPage() int

RowsPerPage returns the rows per page.

func (Page) String

func (p Page) String() string

String implements the stringer interface.

Jump to

Keyboard shortcuts

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