Documentation ¶
Index ¶
- type Migration
- type MigrationType
- type Migrator
- func (m *Migrator) Add(migration Migration)
- func (m Migrator) ExecuteCommands(commands []string) (outputs []string, err error)
- func (m *Migrator) GetValidMigrations(currentVersion string, migrationTypes ...MigrationType) (migrations []Migration)
- func (m Migrator) IsValid(migrationVersion, currentVersion string) (bool, error)
- func (m *Migrator) Run(currentVersion string, migrationTypes ...MigrationType) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Migration ¶
type Migration interface { Migrate() error Version() string Info() string Type() MigrationType }
type MigrationType ¶ added in v0.9.5
type MigrationType int
MigrationType is migration type
const ( // MigrationTypeClient is client migration type MigrationTypeClient MigrationType = iota + 1 // MigrationTypeServer is server migration type MigrationTypeServer )
type Migrator ¶
type Migrator struct { Migrations []Migration Log *zap.SugaredLogger }
Migrator struct to manage migrations of Testkube API and CRDs
func (Migrator) ExecuteCommands ¶
ExecuteCommands executes multiple commands returns multiple commands outputs
func (*Migrator) GetValidMigrations ¶
func (m *Migrator) GetValidMigrations(currentVersion string, migrationTypes ...MigrationType) (migrations []Migration)
GetValidMigrations returns valid migration list for currentVersion
Click to show internal directories.
Click to hide internal directories.