driver

package
v0.1.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CredentialFilePrefix = "mysqldumpcred-"

Variables

This section is empty.

Functions

This section is empty.

Types

type DBConfig

type DBConfig struct {
	DBName   string
	Username string
	Password string
	Host     string
	Port     int
}

func NewDBConfig

func NewDBConfig(dbName, user, password, host string, port int) *DBConfig

type Driver

type Driver interface {
	GetDumpCommand() (string, []string, error)
	GetSshDumpCommand() (string, error)
}

type MysqlDriver

type MysqlDriver struct {
	MysqlDumpBinaryPath string
	Options             []string
	ViaSsh              bool
	*DBConfig
}

func NewMysqlDriver

func NewMysqlDriver(dsn string, options []string, viaSsh bool) (*MysqlDriver, error)

func (*MysqlDriver) GetDumpCommand

func (mysql *MysqlDriver) GetDumpCommand() (string, []string, error)

func (*MysqlDriver) GetSshDumpCommand

func (mysql *MysqlDriver) GetSshDumpCommand() (string, error)

Get dump command used by ssh dumper.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL