Documentation ¶
Index ¶
Constants ¶
View Source
const ( //PGDmpDropCmd - command to drop a psql schema PGDmpDropCmd = "drop schema public cascade;" //PGDmpCreateCmd - create schema psql command PGDmpCreateCmd = "create schema public;" //MySQLDmpConnectCmd -- MySQLDmpConnectCmd = "%s -u %s -h %s --password=%s" //MySQLDmpCreateCmd -- MySQLDmpCreateCmd = "%s < %s" //MySQLDmpFlushCmd -- MySQLDmpFlushCmd = "%s > flush privileges" //MySQLDmpDumpCmd -- MySQLDmpDumpCmd = "%s --all-databases" )
Variables ¶
View Source
var ( //PGDmpDumpBin - location of pg_dump binary PGDmpDumpBin = "/var/vcap/packages/postgres/bin/pg_dump" //PGDmpRestoreBin - location of pg_restore binary PGDmpRestoreBin = "/var/vcap/packages/postgres/bin/pg_restore" //MySQLDmpDumpBin -- MySQLDmpDumpBin = "/var/vcap/packages/mariadb/bin/mysqldump" //MySQLDmpSQLBin -- MySQLDmpSQLBin = "/var/vcap/packages/mariadb/bin/mysql" )
Functions ¶
This section is empty.
Types ¶
type MysqlDump ¶
type MysqlDump struct { IP string Username string Password string DbFile string ConfigFile string Caller command.Executer RemoteOps remoteOperationsInterface }
MysqlDump - an object which can handle mysql dumps
func NewMysqlDump ¶
NewMysqlDump - will initialize a mysqldump for local execution
func NewRemoteMysqlDump ¶
NewRemoteMysqlDump - will initialize a mysqldmp for remote execution
type PgDump ¶
type PgDump struct { IP string Port int Database string Username string Password string DbFile string Caller command.Executer RemoteOps remoteOperationsInterface // contains filtered or unexported fields }
PgDump - an object which can handle pgres dumps
func NewPgRemoteDump ¶
func NewPgRemoteDump(port int, database, username, password string, sshCfg command.SshConfig) (*PgDump, error)
NewPgRemoteDump - a pgdump initialized for remote fs
Click to show internal directories.
Click to hide internal directories.