migrations

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecoratorParams

type DecoratorParams struct {
	fx.In
	DB       lazy.Lazy[*gorm.DB]
	Migrator lazy.Lazy[Migrator]
	Logger   *zap.SugaredLogger
}

type DecoratorResult

type DecoratorResult struct {
	fx.Out
	DB lazy.Lazy[*gorm.DB]
}

func NewDecorator

func NewDecorator(p DecoratorParams) DecoratorResult

type Migrator

type Migrator interface {
	Up(ctx context.Context) error
	UpTo(ctx context.Context, version int64) error
	Down(ctx context.Context) error
	DownTo(ctx context.Context, version int64) error
}

type Params

type Params struct {
	fx.In
	DB     lazy.Lazy[*gorm.DB]
	Logger *zap.SugaredLogger
}

type Result added in v0.5.0

type Result struct {
	fx.Out
	Migrator lazy.Lazy[Migrator]
}

func New

func New(p Params) Result

Jump to

Keyboard shortcuts

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