database

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Paginate

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

Types

type Database

type Database interface {
	Connect(Host string, Port string, DBName string, Password string, User string, SslMode string, TimeZone string)
}

type Pagination

type Pagination struct {
	Limit   int    `form:"PaginationLimit,default=1" json:"PaginationLimit,omitempty"`
	Page    int    `form:"PaginationPage,default=1" json:"PaginationPage,omitempty"`
	Last_ID int64  `form:"PaginationLast,default=0" json:"PaginationLast,omitempty"`
	Order   string `form:"PaginationOrder,default=asc" json:"PaginationOrder,omitempty"`
}

type Postgres

type Postgres struct {
}

func (*Postgres) Connect

func (p *Postgres) Connect(Host string, Port string, DBName string, Password string, User string, SslMode string, TimeZone string) *gorm.DB

type Sqlite

type Sqlite struct {
}

func (*Sqlite) Connect

func (p *Sqlite) Connect(Host string, Port string, DBName string, Password string, User string, SslMode string, TimeZone string) *gorm.DB

Jump to

Keyboard shortcuts

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