dbcli

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CliDumper

type CliDumper struct {
	Cmd     string
	Flags   string
	DSN     string
	Timeout time.Duration
}

CliDumper contains the required information to use a DB Cli tool to dump a DB.

func NewDumper

func NewDumper(cmd, flags, dsn string) (CliDumper, error)

NewDumper returns a populated CliDumper

func (CliDumper) Dump

func (d CliDumper) Dump(ctx context.Context, db string, w io.Writer) error

Dump takes a dump of the databases from a DB host

func (CliDumper) Validate

func (d CliDumper) Validate() error

Validate checks the Cli connection to DB

type Dumper

type Dumper interface {
	Validate() error
	Dump(ctx context.Context, db string, w io.Writer) error
}

Dumper is an interface for a Cli Dumper

Jump to

Keyboard shortcuts

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