aip

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NextPageToken

func NextPageToken(req pagination.Request, resultSize int32, minps int32, maxps int32) (string, error)

*

Create next page token from page size and previous page token
For more - https://google.aip.dev/158

*

func ParseAndValidateOrderBy

func ParseAndValidateOrderBy(req ordering.Request) (map[string]string, error)

*

Extract order by from request and parse it and convert into a map of field and order.
Eg: Name desc
	Age
	Salary desc
For more - https://google.aip.dev/132

*

func ParseAndValidatePageSize

func ParseAndValidatePageSize(req pagination.Request, minPageSize int32, maxPageSize int32) (int32, error)

*

Extract page size from request and maps it between min page size and max page size if not in range.
For more - https://google.aip.dev/158

*

func ParseAndValidatePageToken

func ParseAndValidatePageToken(req pagination.Request) (pagination.PageToken, error)

*

Extract page token from request and parse it.
For more - https://google.aip.dev/158

*

Types

This section is empty.

Jump to

Keyboard shortcuts

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