pagination

package
v0.0.0-...-12bf87c Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LimitHeader string = "x-pagination-limit"
	LimitQuery  string = "pageLimit"
	LimitMin    int32  = 1
	LimitMax    int32  = 100
)
View Source
const (
	SortDescQuery = "sortDesc"
	SortByQuery   = "sortBy"
)
View Source
const (
	TokenHeader string = "x-pagination-token"
	TokenQuery  string = "pageToken"
)

Variables

This section is empty.

Functions

func ParsePaginationLimit

func ParsePaginationLimit(event *events.APIGatewayV2HTTPRequest) (*int32, error)

func ParsePaginationToken

func ParsePaginationToken(event *events.APIGatewayV2HTTPRequest, keys Stringable) (bool, error)

func ParseSortBy

func ParseSortBy(event *events.APIGatewayV2HTTPRequest) string

func ParseSortDesc

func ParseSortDesc(event *events.APIGatewayV2HTTPRequest) bool

func SetPaginationToken

func SetPaginationToken(event *events.APIGatewayV2HTTPResponse, keys Stringable) error

Types

type Stringable

type Stringable interface {
	MarshalString() (string, error)
	UnmarshalString(string) error
}

Jump to

Keyboard shortcuts

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