database

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config Config) (*sql.DB, error)

Types

type Config added in v0.0.14

type Config struct {
	Driver          string
	Host            string
	Port            string
	Username        string
	Password        string
	Database        string
	MaxOpenConns    int
	MaxIdleConns    int
	ConnMaxLifetime time.Duration
}

type Paginator added in v0.0.24

type Paginator struct {
	Page    int
	Limit   int
	Offset  int
	OrderBy string
}

func NewPaginator added in v0.0.24

func NewPaginator(
	page string,
	limit string,
	maxLimit int,
	orderBy string,
	orderByDefault string,
	allowedOrderByFields map[string]string,
) Paginator

Jump to

Keyboard shortcuts

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