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

postgres

package
v0.0.0-...-a70fa55 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package postgres owns the resources schema and data access identity.

Index

Constants

This section is empty.

Variables

View Source
var Schema string

Functions

func Migrate

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

Migrate uses a separate migration identity. Initial categories are ordinary persisted settings; repeated migrations never overwrite operator changes.

Types

type Repository

type Repository struct{ DB *sql.DB }

func (*Repository) AcknowledgeEvent

func (r *Repository) AcknowledgeEvent(ctx context.Context, id string) error

func (*Repository) CheckRuntime

func (r *Repository) CheckRuntime(ctx context.Context) error

CheckRuntime rejects migration credentials and cross-module access at startup.

func (*Repository) Claim

func (r *Repository) Claim(ctx context.Context, worker string, now time.Time, lease time.Duration) (resources.Job, error)

func (*Repository) PendingEvents

func (r *Repository) PendingEvents(ctx context.Context, n int) ([]resources.Event, error)

func (*Repository) PrunePackages

func (r *Repository) PrunePackages(ctx context.Context, now time.Time, n int) error

PrunePackages removes only expired selection snapshots, never business records or idempotency receipts.

func (*Repository) Transaction

func (r *Repository) Transaction(ctx context.Context, run func(resources.Transaction) error) error

Jump to

Keyboard shortcuts

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