Help us shape the future of Go! Take the 2026 Go Developer Survey

store

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package store owns the engine's Postgres schema and connection handling.

Migrations are embedded in the binary so a self-hoster runs one command and gets a working database, with no separate migration tool to install and no way for the schema to drift from the code that expects it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, dsn string) (*pgxpool.Pool, error)

Connect opens a pooled connection and verifies the database answers.

func Migrate

func Migrate(ctx context.Context, dsn string, log *slog.Logger) error

Migrate applies any pending migrations.

Uses database/sql rather than the pgx pool because that is what goose expects; the connection is short-lived and closed before returning.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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