app

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataDir

func DataDir() string

DataDir resolves the default local data directory: $READPROOF_HOME, or ".readproof".

Types

type App

type App struct {
	DB               *sql.DB
	Resources        resource.Store
	Snapshots        snapshot.Store
	Materializations materialization.Store
	Manifests        manifest.Store
	Runs             run.RunStore
	Tags             tag.Store
	Blobs            blob.Store
	Resolver         *resolver.Resolver
	RunBuilder       *run.Builder
	Replayer         *replay.Replayer
}

App is the composition root wiring every store, the resolver, the run builder, and the replayer together over a single local data directory.

func Open

func Open(dataDir string) (*App, error)

Open sets up (creating and migrating if needed) the local SQLite database and blob store under dataDir, and wires the full pipeline over them.

func OpenPostgres

func OpenPostgres(ctx context.Context, pg PostgresConfig, s3 S3Config) (*App, error)

OpenPostgres wires the same pipeline as Open, but backed by PostgreSQL metadata storage and an S3-compatible (e.g. MinIO) blob store, instead of embedded SQLite and local disk. Every store is behind the same domain interfaces, so this is a drop-in swap — callers see the same *App shape.

func (*App) Close

func (a *App) Close() error

type PostgresConfig

type PostgresConfig struct {
	DSN string
}

PostgresConfig selects the Postgres metadata backend for OpenPostgres.

type S3Config

type S3Config struct {
	Endpoint        string
	AccessKeyID     string
	SecretAccessKey string
	Bucket          string
	UseSSL          bool
}

S3Config selects the S3-compatible blob backend for OpenPostgres.

Jump to

Keyboard shortcuts

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