database

package
v0.0.0-...-2319eaa Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(dsn string) (*gorm.DB, error)

Types

type Pagination

type Pagination struct {
	PerPage      int         `json:"perPage" query:"perPage"`
	Page         int         `json:"page" query:"page"`
	TotalResults int64       `json:"totalResults"`
	TotalPages   int         `json:"totalPages"`
	Items        interface{} `json:"items"`

} // @Name Pagination

func (*Pagination) GetOffset

func (p *Pagination) GetOffset() int

func (*Pagination) GetPage

func (p *Pagination) GetPage() int

func (*Pagination) GetPageSize

func (p *Pagination) GetPageSize() int

func (*Pagination) Scope

func (p *Pagination) Scope() func(db *gorm.DB) *gorm.DB

Jump to

Keyboard shortcuts

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