schemamigrationrepo

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ProviderProductionSet provides a SchemaMigrationRepo for use in production.
	ProviderProductionSet = wire.NewSet(Provide, wire.Bind(new(domain.SchemaMigrationRepo), new(*SchemaMigrationRepo)))
)

Functions

This section is empty.

Types

type SchemaMigrationRepo

type SchemaMigrationRepo struct {
	DB *gorm.DB
}

SchemaMigrationRepo is a repository that holds information about SchemaMigrations backed by a database.

func Provide

func Provide(manager *database.Manager) *SchemaMigrationRepo

Provide returns a SchemaMigrationRepo configured with the provided Manager.

func (*SchemaMigrationRepo) GetSchemaMigration

func (s *SchemaMigrationRepo) GetSchemaMigration() (*domain.SchemaMigration, error)

GetSchemaMigration gets the first SchemaMigration that is stored in the database.

func (*SchemaMigrationRepo) GetSchemaMigrationByVersion

func (s *SchemaMigrationRepo) GetSchemaMigrationByVersion(version int) (migration *domain.SchemaMigration, err error)

GetSchemaMigrationByVersion retrieves the SchemaMigration by the given version.

Jump to

Keyboard shortcuts

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