Documentation
¶
Index ¶
- Variables
- type Dump
- func (x *Dump) Exec(opts ExecOptions) Result
- func (x *Dump) GetFile() string
- func (x *Dump) GetFormat() string
- func (x *Dump) GetOptions() []string
- func (x *Dump) GetPath() string
- func (x *Dump) GetVerbose() bool
- func (x *Dump) IgnoreTableDataToString() []string
- func (x *Dump) SetFile(filename string)
- func (x *Dump) SetFormat(f string)
- func (x *Dump) SetOptions(o []string)
- func (x *Dump) SetPath(path string)
- func (x *Dump) SetVerbose(verbose bool)
- type ExecOptions
- type Postgres
- type Restore
- func (x *Restore) Exec(filename string, opts ExecOptions) Result
- func (x *Restore) GetFormat() string
- func (x *Restore) GetOptions() []string
- func (x *Restore) GetPath() string
- func (x *Restore) GetSchemas() []string
- func (x *Restore) GetVerbose() bool
- func (x *Restore) SetFormat(f string)
- func (x *Restore) SetOptions(o []string)
- func (x *Restore) SetPath(path string)
- func (x *Restore) SetSchemas(schemas []string)
- func (x *Restore) SetVerbose(verbose bool)
- type Result
- type ResultError
- type Results
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DumpCmd is the path to the `pg_dump` executable DumpCmd = "pg_dump" DumpStdOpts = []string{} DumpDefaultFormat = "p" // p c d t )
View Source
var ( // RestoreCmd is the path to the `pg_restore` executable RestoreCmd = "pg_restore" RestoreStdOpts = []string{"--exit-on-error"} RestoreDefaultFormat = "p" // p c d t )
Functions ¶
This section is empty.
Types ¶
type Dump ¶
Dump is an `Exporter` interface that backs up a Postgres database via the `pg_dump` command.
func (*Dump) Exec ¶
func (x *Dump) Exec(opts ExecOptions) Result
Exec `pg_dump` of the specified database, and creates a gzip compressed tarball archive.
func (*Dump) GetOptions ¶ added in v0.2.0
func (*Dump) GetVerbose ¶ added in v0.2.0
func (*Dump) IgnoreTableDataToString ¶
func (*Dump) SetOptions ¶ added in v0.2.0
func (*Dump) SetVerbose ¶ added in v0.2.0
type ExecOptions ¶
type ExecOptions struct {
StreamPrint bool
}
type Postgres ¶
type Restore ¶
type Restore struct {
*Postgres
// contains filtered or unexported fields
}
func NewRestore ¶
func (*Restore) Exec ¶
func (x *Restore) Exec(filename string, opts ExecOptions) Result
Exec `pg_restore` of the specified database, and restore from a gzip compressed tarball archive.
func (*Restore) GetOptions ¶ added in v0.2.0
func (*Restore) GetSchemas ¶ added in v0.2.0
func (*Restore) GetVerbose ¶ added in v0.2.0
func (*Restore) SetOptions ¶ added in v0.2.0
func (*Restore) SetSchemas ¶
func (*Restore) SetVerbose ¶ added in v0.2.0
type Result ¶
type Result struct {
Mine string
File string
Output string
Error *ResultError
FullCommand string
}
type ResultError ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
tests
|
|
|
fixtures/scripts/init-database
command
|
|
|
fixtures/scripts/install-deps
command
|
Click to show internal directories.
Click to hide internal directories.