Documentation
¶
Index ¶
- Constants
- type ArtifactError
- type MigrationConfig
- type MigrationItem
- type MigrationResult
- type Service
- func (s *Service) GetCatalogObject(ctx context.Context, name string) (*api.CatalogObject, error)
- func (s *Service) ListObjects(ctx context.Context, typ api.CatalogObject_Type) ([]*api.CatalogObject, error)
- func (s *Service) Migrate(ctx context.Context, conf MigrationConfig) (*MigrationResult, error)
Constants ¶
View Source
const ( MigrationNoChange int = 0 MigrationCreate = 1 MigrationRename = 2 MigrationUpdate = 3 MigrationDelete = 4 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactError ¶
type MigrationConfig ¶
type MigrationItem ¶
type MigrationItem struct {
Name string
Path string
CatalogInFile *api.CatalogObject
CatalogInStore *api.CatalogObject
Type int
FromName string
FromPath string
Dependencies []string
Error *api.MigrationError
}
type MigrationResult ¶
type MigrationResult struct {
AddedObjects []*api.CatalogObject
UpdatedObjects []*api.CatalogObject
DroppedObjects []*api.CatalogObject
AffectedPaths []string
Errors []*api.MigrationError
}
func NewMigrationResult ¶
func NewMigrationResult() *MigrationResult
type Service ¶
type Service struct {
Catalog drivers.CatalogStore
Repo drivers.RepoStore
Olap drivers.OLAPStore
RepoId string
InstId string
// temporary information. should this be persisted into olap?
// LastMigration stores the last time migrate was run. Used to filter out repos that didnt change since this time
LastMigration time.Time
// used to get path when we only have name. happens when we get name from DAG
// TODO: should we add path to the DAG instead
NameToPath map[string]string
// used to get last logged name when parsing fails
PathToName map[string]string
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) GetCatalogObject ¶
func (*Service) ListObjects ¶
func (s *Service) ListObjects( ctx context.Context, typ api.CatalogObject_Type, ) ([]*api.CatalogObject, error)
func (*Service) Migrate ¶
func (s *Service) Migrate( ctx context.Context, conf MigrationConfig, ) (*MigrationResult, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.