Documentation
¶
Index ¶
- func NewMigrationService(log *zap.SugaredLogger, config MigrationConfig) devpb.MigrationServer
- type MigrationConfig
- type MigrationService
- func (s MigrationService) DatabaseForceVersion(ctx context.Context, request *devpb.DatabaseForceVersionRequest) (*devpb.DatabaseForceVersionResponse, error)
- func (s MigrationService) DatabaseMigrate(ctx context.Context, request *devpb.DatabaseMigrateRequest) (*devpb.DatabaseMigrateResponse, error)
- func (s MigrationService) DatabaseRollback(ctx context.Context, request *devpb.DatabaseRollbackRequest) (*devpb.DatabaseRollbackResponse, error)
- func (s MigrationService) DatabaseStatus(ctx context.Context, request *devpb.DatabaseStatusRequest) (*devpb.DatabaseStatusResponse, error)
- type Migrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMigrationService ¶
func NewMigrationService(log *zap.SugaredLogger, config MigrationConfig) devpb.MigrationServer
Types ¶
type MigrationConfig ¶
type MigrationService ¶
type MigrationService struct {
// contains filtered or unexported fields
}
func (MigrationService) DatabaseForceVersion ¶
func (s MigrationService) DatabaseForceVersion(ctx context.Context, request *devpb.DatabaseForceVersionRequest) (*devpb.DatabaseForceVersionResponse, error)
func (MigrationService) DatabaseMigrate ¶
func (s MigrationService) DatabaseMigrate(ctx context.Context, request *devpb.DatabaseMigrateRequest) (*devpb.DatabaseMigrateResponse, error)
func (MigrationService) DatabaseRollback ¶
func (s MigrationService) DatabaseRollback(ctx context.Context, request *devpb.DatabaseRollbackRequest) (*devpb.DatabaseRollbackResponse, error)
func (MigrationService) DatabaseStatus ¶
func (s MigrationService) DatabaseStatus(ctx context.Context, request *devpb.DatabaseStatusRequest) (*devpb.DatabaseStatusResponse, error)
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
func NewMigrator ¶
func NewMigrator(log *zap.SugaredLogger, sqlConnStr, fileDir string) Migrator
func (Migrator) ForceVersion ¶
func (m Migrator) ForceVersion(version int32) (*devpb.MigrationStatus, error)
Click to show internal directories.
Click to hide internal directories.