shared

package
v0.0.0-...-0bd2313 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PaginatedRequest

type PaginatedRequest struct {
	Page          int
	PageSize      int
	Query         string
	SortLabel     string
	SortDirection string
}

func NewPaginatedRequest

func NewPaginatedRequest(r *http.Request) PaginatedRequest

type PaginatedResponse

type PaginatedResponse struct {
	CurrentPage     int  `json:"current_page"`
	TotalPages      int  `json:"total_pages"`
	TotalCount      int  `json:"total_count"`
	PageSize        int  `json:"page_size"`
	PreviousPage    int  `json:"previous_page"`
	HasPreviousPage bool `json:"has_previous_page"`
	NextPage        int  `json:"next_page"`
	HasNextPage     bool `json:"has_next_page"`
}

func NewPaginatedResponse

func NewPaginatedResponse(total, size, current int) PaginatedResponse

Jump to

Keyboard shortcuts

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