postgres

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package postgres persists platform configuration and installation facts.

Index

Constants

This section is empty.

Variables

View Source
var Schema string

Functions

func Migrate

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

Types

type Repository

type Repository struct{ DB *sql.DB }

func (*Repository) Apply

func (r *Repository) Apply(ctx context.Context, in e.Update) (e.Rule, error)

func (*Repository) CheckRuntime

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

func (*Repository) Cleanup

func (r *Repository) Cleanup(ctx context.Context, now time.Time) (int64, error)

Cleanup removes at most 400 expired records per call. Current configuration and installation facts have no count cap and are never removed by retention.

func (*Repository) Effective

func (r *Repository) Effective(ctx context.Context, action, school string) (e.Rule, error)

func (*Repository) Initialize

func (r *Repository) Initialize(ctx context.Context, names []string) error

Initialize records explicitly verified absence. Existing facts cannot be replaced; in particular an installed module can never become never-installed.

func (*Repository) ObserveInstalled

func (r *Repository) ObserveInstalled(ctx context.Context, names []string) error

func (*Repository) Ready

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

func (*Repository) State

func (r *Repository) State(ctx context.Context, name string) (h.State, error)

func (*Repository) View

func (r *Repository) View(ctx context.Context, fn func(a.Store) error) error

func (*Repository) Write

func (r *Repository) Write(ctx context.Context, fn func(a.Store) error) error

Jump to

Keyboard shortcuts

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