Documentation
¶
Index ¶
- Constants
- Variables
- func AdoptAdditiveOrderedMigrationGraph(ctx context.Context, db *bun.DB, manager *persistence.Migrations) error
- func GetMigrationsFS() (fs.FS, error)
- func OrderedMigrationSource(dependencies ...string) (persistence.OrderedMigrationSource, error)
- func OrderedMigrationSourceWithOptions(config MigrationSourceOptions) (persistence.OrderedMigrationSource, error)
- func RegisterMigrations(manager *persistence.Migrations) error
- func RegisterMigrationsWithOptions(manager *persistence.Migrations, config MigrationSourceOptions) error
- type MigrationSourceOptions
Constants ¶
const ( MigrationSourceName = "go-notifications" MigrationSourceKey = "go-notifications" MigrationSourceOrder = 50 )
Variables ¶
var ErrUnsafeMigrationGraphAdoption = errors.New("unsafe ordered migration graph adoption")
ErrUnsafeMigrationGraphAdoption means an existing source identity would be changed or reordered instead of preserving it during additive adoption.
Functions ¶
func AdoptAdditiveOrderedMigrationGraph ¶ added in v0.16.0
func AdoptAdditiveOrderedMigrationGraph(ctx context.Context, db *bun.DB, manager *persistence.Migrations) error
AdoptAdditiveOrderedMigrationGraph explicitly persists an additive graph extension before migration. Existing source identity, order, dependencies, and position must remain unchanged; every new source must follow all persisted sources. Bun migration journal rows are never modified.
func GetMigrationsFS ¶
GetMigrationsFS returns the dialect-rooted embedded migration tree.
func OrderedMigrationSource ¶
func OrderedMigrationSource(dependencies ...string) (persistence.OrderedMigrationSource, error)
OrderedMigrationSource exposes a source-stable migration identity suitable for composition in a host application's shared migration graph. Hosts may supply source keys that must run before this package.
func OrderedMigrationSourceWithOptions ¶ added in v0.16.0
func OrderedMigrationSourceWithOptions(config MigrationSourceOptions) (persistence.OrderedMigrationSource, error)
OrderedMigrationSourceWithOptions returns the stable package migration source at a positive host-selected order. A zero order retains the backward-compatible default order 50.
func RegisterMigrations ¶
func RegisterMigrations(manager *persistence.Migrations) error
RegisterMigrations registers this package's ordered source without running migrations or taking ownership of host database lifecycle.
func RegisterMigrationsWithOptions ¶ added in v0.16.0
func RegisterMigrationsWithOptions(manager *persistence.Migrations, config MigrationSourceOptions) error
RegisterMigrationsWithOptions registers a host-placed package source without executing migrations.
Types ¶
type MigrationSourceOptions ¶ added in v0.16.0
MigrationSourceOptions configures host-composable placement while preserving the package's stable source identity and embedded filesystem. Once a host persists this graph, Order and Dependencies are durable and changing them is migration graph drift.
Directories
¶
| Path | Synopsis |
|---|---|
|
adapters
|
|
|
securelink
Package securelink provides an example LinkBuilder and LinkStore that wrap securelink-compatible managers without adding core dependencies.
|
Package securelink provides an example LinkBuilder and LinkStore that wrap securelink-compatible managers without adding core dependencies. |
|
cmd
|
|
|
examples/gocms
command
|
|
|
examples
|
|
|
adoption
Package adoption contains compiling examples for the v0.16 CRM adoption APIs.
|
Package adoption contains compiling examples for the v0.16 CRM adoption APIs. |
|
onready
command
|
|
|
internal
|
|
|
pkg
|
|
|
deliveries
Package deliveries exposes privacy-safe, read-only durable delivery state.
|
Package deliveries exposes privacy-safe, read-only durable delivery state. |
|
links
Package links defines link resolution contracts for notifications.
|
Package links defines link resolution contracts for notifications. |
|
reminders
Package reminders provides reusable reminder cadence primitives.
|
Package reminders provides reusable reminder cadence primitives. |
|
retention
Package retention provides bounded deletion of terminal notification data.
|
Package retention provides bounded deletion of terminal notification data. |