migration

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(migrationsMap map[int64]Migrate, c *container.Container)

TODO : Use composition to handler different databases which would also remove this nolint

Types

type Datasource

type Datasource struct {
	Logger

	SQL    db
	Redis  commands
	PubSub client
}

type Logger

type Logger interface {
	Info(args ...interface{})
	Infof(format string, args ...interface{})
	Error(args ...interface{})
	Errorf(format string, args ...interface{})
}

type Migrate

type Migrate struct {
	UP MigrateFunc
}

type MigrateFunc

type MigrateFunc func(d Datasource) error

Jump to

Keyboard shortcuts

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