paginations

package
v4.2.17 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: MIT Imports: 4 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 struct {
	Field string
	Value 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
	Fields []string
	Values []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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