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 ¶
View Source
var FS embed.FS
FS embeds the SQL migration files for the postgres key store.
Functions ¶
func GeneratePostgres ¶
GeneratePostgres writes the PostgreSQL keystore migration file.
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.
Click to show internal directories.
Click to hide internal directories.