migrator

package
v0.0.0-...-b1a156a Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Zlib Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Migrator

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

Migrator defines a service to migrate data after a BaaSapi version update.

func NewMigrator

func NewMigrator(parameters *Parameters) *Migrator

NewMigrator creates a new Migrator.

func (*Migrator) Migrate

func (m *Migrator) Migrate() error

Migrate checks the database version and migrate the existing data to the most recent data model.

type Parameters

type Parameters struct {
	DB                     *bolt.DB
	DatabaseVersion        int
	Baask8sService         *baask8s.Service
	BaasmspService         *baasmsp.Service
	ExtensionService       *extension.Service
	ResourceControlService *resourcecontrol.Service
	SettingsService        *settings.Service
	TemplateService        *template.Service
	UserService            *user.Service
	VersionService         *version.Service
	FileService            baasapi.FileService
}

Parameters represents the required parameters to create a new Migrator instance.

Jump to

Keyboard shortcuts

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