pagination

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List[T any] struct {
	Pagination Pagination
	Items      []T
}

type Order

type Order int
const (
	OrderDescending Order = 0
	OrderAscending  Order = 1
)

type Pagination

type Pagination struct {
	CurrentPage     int
	ElementsPerPage int
	TotalElements   int
	Order           Order
	OrderBy         string
	Enabeld         bool
}

type ViewModel

type ViewModel struct {
	StartElement       int
	LastElement        int
	TotalElements      int
	Sequence           []int
	PreviousPage       int
	CurrentPage        int `html:"pagination.currentPage" json:"currentPage"`
	NextPage           int
	Show               bool
	ShowPreviousButton bool
	ShowNextButton     bool
	// contains filtered or unexported fields
}

func PaginationToVM

func PaginationToVM(p Pagination, loc localizer.Localizer) ViewModel

func (ViewModel) GetMessageOfElements

func (vm ViewModel) GetMessageOfElements() string

func (ViewModel) GetNextTag

func (vm ViewModel) GetNextTag() string

func (ViewModel) GetPreviousTag

func (vm ViewModel) GetPreviousTag() string

func (ViewModel) ToDto

func (vm ViewModel) ToDto() Pagination

Jump to

Keyboard shortcuts

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