models

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PageOptions

type PageOptions struct {
	Q       string
	Limit   int64
	Page    int64
	OrderBy []string
}

func (*PageOptions) SetOrderDefault

func (p *PageOptions) SetOrderDefault(orders ...string)

type PageResponse

type PageResponse struct {
	Total   int64
	Limit   int64
	Count   int64
	Page    int64
	Q       string
	OrderBy []string
}

type Pagination

type Pagination struct {
	Page  int64       `json:"page" example:"1"`
	Total int64       `json:"total" example:"45"`
	Limit int64       `json:"limit" example:"30"`
	Count int64       `json:"count" example:"30"`
	Items interface{} `json:"items"`
}

func NewPagination

func NewPagination(items interface{}, options *PageResponse) *Pagination

Jump to

Keyboard shortcuts

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