Documentation ¶
Index ¶
Constants ¶
const MYSQLDUMP_PHP_VERSION = "2.11"
Variables ¶
This section is empty.
Functions ¶
func MysqlCliCredentials ¶
func MysqlCliCredentials(credentials DatabaseCredentials) string
Types ¶
type DatabaseCredentials ¶
type DatabaseExporter ¶
func NewDatabaseExporter ¶
func NewDatabaseExporter(c sftp.Client, p types.PublicPath, u types.SiteUrl, g HttpGetter, e emitter.FileEmitter, creds DatabaseCredentials) DatabaseExporter
NewDatabaseExporter is a factory function that returns a DatabaseExporter. It detects at runtime whether the remote server supports `mysqldump` or not, and returns the appropriate exporter.
type HttpGetter ¶
type HttpGetter interface {
Get(url string) (resp io.ReadCloser, err error)
}
type MysqldumpDatabaseExporter ¶
type MysqldumpDatabaseExporter struct {
// contains filtered or unexported fields
}
MysqldumpDatabaseExporter is a DatabaseExporter that uses the mysqldump command to export the database. It should be the preferred exporter whenever possible.
type PHPDatabaseExporter ¶
type PHPDatabaseExporter struct {
// contains filtered or unexported fields
}
PHPDatabaseExporter is a DatabaseExporter that uses a custom PHP script to export the database. It should only be used as a fallback when the mysqldump command is not available. The script we utilize is bundled with this package to lock its version and ensure that it is always available. It's source can be found here: https://github.com/ifsnop/mysqldump-php