migrations

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 8 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     *gorm.DB
	Logger *zap.SugaredLogger
}

type DecoratorResult

type DecoratorResult struct {
	fx.Out
	DB *gorm.DB
}

func NewDecorator

func NewDecorator(p DecoratorParams) (result DecoratorResult, err error)

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
}

func New

func New(p Params) Migrator

type Params

type Params struct {
	fx.In
	DB     *sql.DB
	Logger *zap.SugaredLogger
}

Jump to

Keyboard shortcuts

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