postgres

package
v2.10.1 Latest Latest
Warning

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

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

Documentation

Overview

Package postgres is the reporting adapter that answers reports from views in the deployment's own Postgres (docs/adr/0014), so SQL and BI tools read the same rows the API serves. It reads the tables the Postgres store keeps, and is chosen only beside that store.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

Reporter answers reports from views.

func Open

func Open(ctx context.Context, pool *pgxpool.Pool) (*Reporter, error)

Open creates or replaces the report views, one replica at a time, and returns a reporter over them.

func (*Reporter) Names

func (*Reporter) Names() []string

Names lists the standard reports.

func (*Reporter) Run

func (r *Reporter) Run(ctx context.Context, name string) (reporting.Table, error)

Run reads a report's view.

Jump to

Keyboard shortcuts

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