database

package
v1.0.1-with-auth Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	Connect() (*sqlx.DB, error)
}

func NewDatabase

func NewDatabase(
	logger logger.Logger,
	host, user, password, name, sslMode string,
	port, maxOpenConns, maxIdleConns, connMaxLifetimeSecs, connMaxIdleTimeSecs int,
) Database

type PaginatedResult

type PaginatedResult[T any] struct {
	TotalRecords uint64 `json:"total_records"`
	TotalPages   uint64 `json:"total_pages"`
	PageSize     uint64 `json:"page_size"`
	CurrentPage  uint64 `json:"current_page"`
	PrevPage     uint64 `json:"prev_page"`
	NextPage     uint64 `json:"next_page"`
	Data         []T    `json:"data"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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