migrations

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 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 added in v0.0.2

func GeneratePostgres(config *Config) error

GeneratePostgres writes the PostgreSQL keystore migration file.

func SQL added in v0.0.2

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

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

Types

type Config added in v0.0.2

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 added in v0.0.2

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