Discover Packages
github.com/psyb0t/peen
internal
pkg
db
package
Version:
v0.13.1
Opens a new window with list of versions in this module.
Published: Oct 7, 2026
License: MIT
Opens a new window with license information.
Imports: 18
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package db opens Peen's SQLite database, applies its embedded migrations,
and wires the generated gorm/gen repositories. Business code uses the typed
repository layer rather than a raw database handle.
Config identifies the private directory and SQLite connection behavior.
type Handle struct {
GormDB *gorm .DB
}
Handle owns an open SQLite connection and its generated GORM query surface.
Open opens Peen's SQLite store, migrates it, and verifies its integrity.
func (*Handle) Close ¶
Close releases the database resources held by the handle.
func (*Handle) SQLDB ¶
SQLDB exposes the infrastructure connection for migration and integrity
verification. Request-path code must use generated repositories instead.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.