setup

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureDemoFixtures

func EnsureDemoFixtures(st store.Storer)

EnsureDemoFixtures creates a "Demo" organization with seed-like data when ENABLE_DEMO_FIXTURES is set. Idempotent: if an org named "Demo" already exists, nothing is done. Run on startup after EnsureInitialAdmin.

func EnsureInitialAdmin

func EnsureInitialAdmin(st store.Storer, oauthEnabled bool)

EnsureInitialAdmin creates the first admin when INITIAL_ADMIN_EMAIL is set and no users exist. When oauthEnabled is true, INITIAL_ADMIN_PASSWORD is optional; otherwise both email and password are required. Also accepts INTIAL_ADMIN_EMAIL (missing N) as a common typo.

func NewStore

func NewStore(ctx context.Context) (st store.Storer, close func(), err error)

NewStore creates a store from the environment (Postgres if DATABASE_URL is set, otherwise in-memory). The returned close function should be called when the program exits (no-op for in-memory).

Types

This section is empty.

Jump to

Keyboard shortcuts

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