Versions in this module Expand all Collapse all v1 v1.1.7 Sep 3, 2025 v1.1.6 Aug 2, 2025 Changes in this version + func GetSupportedTypesDisplay() string + func ValidateAndSetDefaults(config *ProviderConfig) error + func ValidateConfig(config *ProviderConfig) error + type BackupFormat string + const Binary + const Custom + const SQL + type BackupOptions struct + Compression bool + Databases []string + Directory string + ExtraArgs []string + Format BackupFormat + IncludeData bool + IncludeSchema bool + Timeout time.Duration + Timestamp string + UseParallel bool + type BackupResult struct + BackupPath string + Compression bool + Database string + Duration time.Duration + Error error + Format BackupFormat + Size int64 + Success bool + type DatabaseInfo struct + Charset string + IsSystem bool + Name string + Size int64 + TableCount int + type DatabaseType string + const MySQL + const PostgreSQL + type DefaultProviderFactory struct + func (f *DefaultProviderFactory) CreateProvider(config *ProviderConfig) (Provider, error) + func (f *DefaultProviderFactory) GetSupportedTypes() []DatabaseType + type LegacyDatabaseConfig struct + Host string + MysqlPath string + MysqldumpPath string + Password string + Port int + Timeout int + Username string + type MySQLConfig struct + LockTables bool + MyDumperPath string + MyLoaderPath string + RoutinesAndEvents bool + SingleTransaction bool + UseMyDumper bool + type MySQLProvider struct + func (p *MySQLProvider) Close() error + func (p *MySQLProvider) CreateBackup(ctx context.Context, opts *BackupOptions) ([]*BackupResult, error) + func (p *MySQLProvider) DatabaseExists(ctx context.Context, dbName string) (bool, error) + func (p *MySQLProvider) GetAvailableTools() []string + func (p *MySQLProvider) GetDefaultPort() int + func (p *MySQLProvider) GetProviderType() DatabaseType + func (p *MySQLProvider) GetSystemDatabases() []string + func (p *MySQLProvider) ListDatabases(ctx context.Context) ([]*DatabaseInfo, error) + func (p *MySQLProvider) RestoreBackup(ctx context.Context, opts *RestoreOptions) error + func (p *MySQLProvider) TestConnection(ctx context.Context) error + func (p *MySQLProvider) ValidateTools() error + type PostgreSQLConfig struct + Format string + PgDumpPath string + PsqlPath string + UsePgDumpParallel bool + type Provider interface + Close func() error + CreateBackup func(ctx context.Context, opts *BackupOptions) ([]*BackupResult, error) + DatabaseExists func(ctx context.Context, dbName string) (bool, error) + GetAvailableTools func() []string + GetDefaultPort func() int + GetProviderType func() DatabaseType + GetSystemDatabases func() []string + ListDatabases func(ctx context.Context) ([]*DatabaseInfo, error) + RestoreBackup func(ctx context.Context, opts *RestoreOptions) error + TestConnection func(ctx context.Context) error + ValidateTools func() error + func NewMySQLProvider(config *ProviderConfig) (Provider, error) + type ProviderConfig struct + ClientToolPath string + DumpToolPath string + Host string + MySQL *MySQLConfig + ParallelToolPath string + Password string + Port int + PostgreSQL *PostgreSQLConfig + SSLMode string + Timeout string + Type DatabaseType + Username string + func MigrateFromLegacyConfig(legacy *LegacyDatabaseConfig) *ProviderConfig + type ProviderFactory interface + CreateProvider func(config *ProviderConfig) (Provider, error) + GetSupportedTypes func() []DatabaseType + func NewProviderFactory() ProviderFactory + type RestoreOptions struct + BackupPath string + DropIfExists bool + ExtraArgs []string + TargetDB string + Timeout time.Duration + type SetupWizard struct + func NewSetupWizard() *SetupWizard + func (w *SetupWizard) SetupDatabaseConfig() (*ProviderConfig, error) v1.1.5 Aug 1, 2025 v1.1.4 Jul 22, 2025 Changes in this version type Client + func (c *Client) ListDatabases(ctx context.Context) ([]string, error) v1.1.3 Jul 14, 2025 v1.1.2 Jul 10, 2025 v1.1.1 Jul 9, 2025 v1.1.0 Jul 9, 2025 v1.0.0 Jul 6, 2025 Changes in this version + type Client struct + func NewClient(config *config.DatabaseConfig) (*Client, error) + func (c *Client) Close() error + func (c *Client) CreateBackup(ctx context.Context, dbName, backupDir string) (string, error) + func (c *Client) CreateDirectory(path string) error + func (c *Client) RestoreBackup(ctx context.Context, backupPath, dbName string) error