common

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPageSize = 30
	MaxPageSize     = 5000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Pagination

type Pagination struct {
	PageSize int `json:"pagesize,omitempty" url:"pagesize,omitempty"`
	Page     int `json:"page,omitempty" url:"page,omitempty"`
}

func NewPagination

func NewPagination(pageSize int) Pagination

NewPagination creates a new Pagination struct with provided page size If page size is less than or equal to 0, it uses the default page size If page size is greater than the max page size, it uses the max page size

Jump to

Keyboard shortcuts

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