bootstrap

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatabaseConfigFromEnv

func DatabaseConfigFromEnv(defaults DBDefaults) forma.DatabaseConfig

func EntityConfigFromEnv added in v0.2.0

func EntityConfigFromEnv(defaults forma.EntityConfig) forma.EntityConfig

EntityConfigFromEnv overlays operator-settable entity options onto defaults.

This exists because #314's rollout is staged: creates are always enforced, but updates start report-only so that rows written before enforcement stay updatable. Flipping to enforcing is an operational decision, so it has to be reachable from the environment and not only by library embedders.

func Env

func Env(key, defaultValue string) string

func EnvBool added in v0.2.0

func EnvBool(key string, defaultValue bool) bool

EnvBool reads a boolean env var, treating "true"/"1" (case-insensitive) as true. Any other non-empty value is false; an unset var returns the default.

func EnvInt

func EnvInt(key string, defaultValue int) int

func NewPostgresPoolFromConfig

func NewPostgresPoolFromConfig(config forma.DatabaseConfig) (*pgxpool.Pool, error)

func NewPostgresPoolFromConfigContext added in v0.0.29

func NewPostgresPoolFromConfigContext(ctx context.Context, config forma.DatabaseConfig) (*pgxpool.Pool, error)

func NewS3Client added in v0.2.0

func NewS3Client(ctx context.Context, opts S3Options) (*s3.Client, error)

NewS3Client builds an S3 client for the read path.

Credential precedence mirrors internal/cdc/flusher.go setupAWSClient: static credentials from opts win, then AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY from the environment as a static provider (only when both are non-empty), then whatever the default chain resolved.

func TableNamesFromEnv

func TableNamesFromEnv(defaults forma.TableNames) forma.TableNames

Types

type DBDefaults

type DBDefaults struct {
	Host                   string
	Port                   int
	Database               string
	Username               string
	Password               string
	SSLMode                string
	Schema                 string
	MaxConnections         int
	MaxIdleConns           int
	ConnMaxLifetimeSeconds int
	ConnMaxIdleTimeSeconds int
	TimeoutSeconds         int
}

type S3Options added in v0.2.0

type S3Options struct {
	Region    string
	Endpoint  string
	AccessKey string
	SecretKey string
}

S3Options describes the S3 endpoint and credentials for the read path.

There is deliberately no UsePathStyle field: addressing style is derived from Endpoint (see NewS3Client) so that this client and DuckDB's httpfs always address the same objects the same way.

Jump to

Keyboard shortcuts

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