configexport

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package configexport generates YAML flag configuration files from existing database state. This is the migration bridge from DB-driven to config-driven flags: global values become static entries, per-entity overrides become ctx.<entityDim> conditions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExportedConfig

type ExportedConfig struct {
	FeatureID string
	YAML      []byte
}

ExportedConfig is a single feature's generated YAML config.

func Export

func Export(ctx context.Context, pool *pgxpool.Pool, opts Options) ([]ExportedConfig, error)

Export reads all non-archived features and their flags from the database and generates one YAML config per feature.

type Options

type Options struct {
	// EntityDimension is the context dimension name used for per-entity
	// override conditions (e.g., "user_id", "account_id"). Required when
	// the database has overrides. The exporter does not assume a default.
	EntityDimension string
}

Options configures the export.

Jump to

Keyboard shortcuts

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