Documentation
¶
Overview ¶
Package postgres owns the resources schema and data access identity.
Index ¶
- Variables
- func Migrate(ctx context.Context, db *sql.DB) error
- type Repository
- func (r *Repository) CheckRuntime(ctx context.Context) error
- func (r *Repository) Claim(ctx context.Context, worker string, now time.Time, lease time.Duration) (resources.Job, error)
- func (r *Repository) ConfirmOutbox(ctx context.Context, id string) error
- func (r *Repository) DiscoverySnapshot(ctx context.Context, cursor string, limit int) (out c.DiscoveryPage, err error)
- func (r *Repository) PendingOutbox(ctx context.Context, limit int, excludeSubjects []string) ([]m.Envelope, error)
- func (r *Repository) PrunePackages(ctx context.Context, now time.Time, n int) error
- func (r *Repository) ReadAccount(ctx context.Context, s aq.Selection) ([]aq.Record, error)
- func (r *Repository) ReadAudit(ctx context.Context, q a.Request) (out a.Batch, err error)
- func (r *Repository) Transaction(ctx context.Context, run func(resources.Transaction) error) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Schema string
Functions ¶
Types ¶
type Repository ¶
func (*Repository) CheckRuntime ¶
func (r *Repository) CheckRuntime(ctx context.Context) error
CheckRuntime rejects migration credentials and cross-module access at startup.
func (*Repository) ConfirmOutbox ¶
func (r *Repository) ConfirmOutbox(ctx context.Context, id string) error
func (*Repository) DiscoverySnapshot ¶
func (r *Repository) DiscoverySnapshot(ctx context.Context, cursor string, limit int) (out c.DiscoveryPage, err error)
DiscoverySnapshot preserves object versions using transaction visibility on immutable history. Retention invalidates existing cursors, never silently resets.
func (*Repository) PendingOutbox ¶
func (*Repository) PrunePackages ¶
PrunePackages removes only expired selection snapshots, never business records or idempotency receipts.
func (*Repository) ReadAccount ¶
ReadAccount filters authoritative module facts before the stable exclusive page.
func (*Repository) ReadAudit ¶
ReadAudit reads only explicitly projected fields inside a repeatable-read transaction. Visibility excludes late commits; epoch invalidates changed data.
func (*Repository) Transaction ¶
func (r *Repository) Transaction(ctx context.Context, run func(resources.Transaction) error) error
Click to show internal directories.
Click to hide internal directories.