storage

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package storage opens the hub database (SQLite) and applies its migrations.

Index

Constants

View Source
const FileName = "regulus.db"

FileName is the name of the database file inside the data directory.

Variables

This section is empty.

Functions

func Migrate

func Migrate(ctx context.Context, db *sql.DB) error

Migrate applies, in order and each in its own transaction, the embedded migrations that are not yet recorded in schema_migrations. It refuses to run on a database that has migrations this binary does not know, which means the database was written by a newer version of Regulus.

func Open

func Open(ctx context.Context, dataDir string) (*sql.DB, error)

Open opens (creating it if needed) the database in dataDir and applies all pending migrations.

Types

This section is empty.

Jump to

Keyboard shortcuts

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