paginations

package
v4.3.11 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 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 Adapter

type Adapter interface {
	CreateAdapter(ctx context.Context, paginator Pagination) paginator.Adapter
}

type Filter

type Filter map[string]string

type Metadata

type Metadata struct {
	Page     int
	Previous int
	Next     int
	Limit    int
	Total    int
}

type Pagination

type Pagination struct {
	Limit   int
	Page    int
	Filters Filter
	Search  string
	Model   interface{}
	Table   string
}

func (*Pagination) Handle

func (p *Pagination) Handle(request Request)

func (*Pagination) Paginate

func (p *Pagination) Paginate(adapter paginator.Adapter, results interface{}, total *int64) error

type Request

type Request struct {
	Page    int32
	Limit   int32
	Filters Filter
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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