migration

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module() app.Module

Types

type Config

type Config struct {
	fx.In
	Migrations []*Migration `group:"migration.migration"`
}

type Down

type Down func(context.Context) error

type Migration

type Migration struct {
	// contains filtered or unexported fields
}

func New

func New(name string, migrationTime time.Time, up Up, down Down) *Migration

type Migrator

type Migrator struct {
	// contains filtered or unexported fields
}

func NewMigrator

func NewMigrator(cfg Config) *Migrator

func (*Migrator) MigrateDown

func (m *Migrator) MigrateDown(ctx context.Context) error

func (*Migrator) MigrateUp

func (m *Migrator) MigrateUp(ctx context.Context) error

func (*Migrator) OnStart

func (m *Migrator) OnStart(ctx context.Context) error

type Up

type Up func(context.Context) error

Jump to

Keyboard shortcuts

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