Discover Packages
github.com/y0f/go-api-scaffolding
internal
platform
database
package
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Jun 25, 2026
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package database builds a tuned pgx connection pool and provides a
transaction helper. The pool registers google/uuid so sqlc-generated code
can scan UUID columns directly.
NewPool parses the DSN, applies pool tuning, registers the UUID codec, and
verifies connectivity before returning.
WithinTx runs fn inside a transaction, committing on success and rolling back
on error or panic. A panic is re-raised after the rollback.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.