migrations

package
v0.0.6 Latest Latest
Warning

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

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

Documentation

Overview

Package migrations exposes the embedded PostgreSQL keystore migration.

For the quick CLI path, use:

go run github.com/eventsalsa/encryption/cmd/migrate-gen -output migrations

To print the SQL instead of writing a file:

go run github.com/eventsalsa/encryption/cmd/migrate-gen -stdout

For advanced usage, call SQL or GeneratePostgres directly.

Index

Constants

This section is empty.

Variables

FS embeds the SQL migration files for the postgres key store.

Functions

func GeneratePostgres

func GeneratePostgres(config *Config) error

GeneratePostgres writes the PostgreSQL keystore migration file.

func SQL

func SQL(cfg postgres.Config) (string, error)

SQL returns the PostgreSQL keystore migration SQL for the given config.

Types

type Config

type Config struct {
	// OutputFolder is the directory where the migration file will be written.
	OutputFolder string

	// OutputFilename is the name of the migration file.
	OutputFilename string

	// Postgres controls schema and table overrides using postgres.Config.
	Postgres postgres.Config
}

Config configures migration generation.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the default migration generator configuration.

Jump to

Keyboard shortcuts

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