migrator

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Migrators = make(map[string]EntityMigrator)

Functions

func Create

func Create(ctx context.Context, olap drivers.OLAPStore, repo drivers.RepoStore, catalog *api.CatalogObject) error

func Delete

func Delete(ctx context.Context, olap drivers.OLAPStore, catalog *api.CatalogObject) error

func ExistsInOlap

func ExistsInOlap(ctx context.Context, olap drivers.OLAPStore, catalog *api.CatalogObject) (bool, error)

func GetDependencies

func GetDependencies(ctx context.Context, olap drivers.OLAPStore, catalog *api.CatalogObject) []string

func IsEqual

func IsEqual(ctx context.Context, cat1 *api.CatalogObject, cat2 *api.CatalogObject) bool

IsEqual checks everything but the name

func Register

func Register(name string, artifact EntityMigrator)

func Rename

func Rename(ctx context.Context, olap drivers.OLAPStore, from string, catalog *api.CatalogObject) error

func Update

func Update(ctx context.Context, olap drivers.OLAPStore, repo drivers.RepoStore, catalog *api.CatalogObject) error

func Validate

func Validate(ctx context.Context, olap drivers.OLAPStore, catalog *api.CatalogObject) error

Validate also returns list of dependents

Types

type EntityMigrator

type EntityMigrator interface {
	Create(ctx context.Context, olap drivers.OLAPStore, repo drivers.RepoStore, catalog *api.CatalogObject) error
	Update(ctx context.Context, olap drivers.OLAPStore, repo drivers.RepoStore, catalog *api.CatalogObject) error
	Rename(ctx context.Context, olap drivers.OLAPStore, from string, catalog *api.CatalogObject) error
	Delete(ctx context.Context, olap drivers.OLAPStore, catalog *api.CatalogObject) error
	GetDependencies(ctx context.Context, olap drivers.OLAPStore, catalog *api.CatalogObject) []string
	Validate(ctx context.Context, olap drivers.OLAPStore, catalog *api.CatalogObject) error
	// IsEqual checks everything but the name
	IsEqual(ctx context.Context, cat1 *api.CatalogObject, cat2 *api.CatalogObject) bool
	ExistsInOlap(ctx context.Context, olap drivers.OLAPStore, catalog *api.CatalogObject) (bool, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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