Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config configuration for migrations
func LoadConfigFromEnv ¶
LoadConfigFromEnv loads migration configuration from environment variables
type IntegrationManager ¶
type IntegrationManager struct {
// contains filtered or unexported fields
}
IntegrationManager manages migration integration with application
func NewIntegrationManager ¶
func NewIntegrationManager(manager *Migrator, options *IntegrationOptions) *IntegrationManager
NewIntegrationManager creates a new integration manager
func (*IntegrationManager) EnsureMigrations ¶
func (im *IntegrationManager) EnsureMigrations(ctx context.Context) error
EnsureMigrations applies migrations if necessary
func (*IntegrationManager) HealthCheck ¶
func (im *IntegrationManager) HealthCheck(ctx context.Context) error
HealthCheck checks migration system health
func (*IntegrationManager) WaitForDatabase ¶
func (im *IntegrationManager) WaitForDatabase(ctx context.Context) error
WaitForDatabase waits for database availability
type IntegrationOptions ¶
type IntegrationOptions struct {
AutoMigrate bool // Automatically apply migrations on startup
Timeout time.Duration // Timeout for migrations
RetryAttempts int // Number of reconnection attempts
RetryInterval time.Duration // Interval between attempts
}
IntegrationOptions options for migration integration with application
func DefaultIntegrationOptions ¶
func DefaultIntegrationOptions() *IntegrationOptions
DefaultIntegrationOptions returns default options
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator manages database migrations
func NewWithEnv ¶
NewWithEnv creates a new migrator with automatic configuration loading from environment variables