exampledb

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package exampledb connects the examples to Postgres and gives each its own freshly migrated schema, so examples can run repeatedly and in any order.

Index

Constants

View Source
const DefaultURL = "postgres://foreman:foreman@localhost:55432/foreman?sslmode=disable"

DefaultURL matches deploy/docker-compose.yml (a local development database).

Variables

This section is empty.

Functions

func Open

func Open(ctx context.Context, schema string) (*pgxpool.Pool, error)

Open connects to FOREMAN_DATABASE_URL (or DefaultURL) and recreates schema with the Foreman migrations applied.

func WaitState

func WaitState(ctx context.Context, c *foreman.Client, id int64, state foreman.State, timeout time.Duration) (
	*foreman.JobRow, error,
)

WaitState polls until job id reaches state or timeout passes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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