cmd

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatText = "text"
	FormatYaml = "yaml"
	FormatJson = "json"
)
View Source
const (
	JsonFormat string = "json"
	TextFormat string = "text"
)
View Source
const (
	VerticalTableFormat   = "vertical"
	HorizontalTableFormat = "horizontal"
)
View Source
const MetadataJsonFileName = "metadata.json"

Variables

This section is empty.

Functions

func ShowDump

func ShowDump(ctx context.Context, st storages.Storager, dumpId string, format string) error

Types

type Dump

type Dump struct {
	// contains filtered or unexported fields
}

func NewDump

func NewDump(cfg *domains.Config, st storages.Storager, registry *utils.TransformerRegistry) *Dump

func (*Dump) MergeTocEntries

func (d *Dump) MergeTocEntries(schemaEntries []*toc.Entry, dataEntries []*toc.Entry) (
	[]*toc.Entry, error,
)

func (*Dump) Run

func (d *Dump) Run(ctx context.Context) (err error)

type Restore

type Restore struct {
	// contains filtered or unexported fields
}

func NewRestore

func NewRestore(
	binPath string, st storages.Storager, opt *pgrestore.Options, s map[string][]pgrestore.Script, tmpDir string,
) *Restore

func (*Restore) Run

func (r *Restore) Run(ctx context.Context) error

func (*Restore) RunScripts

func (r *Restore) RunScripts(ctx context.Context, conn *pgx.Conn, section, when string) error

type Validate

type Validate struct {
	*Dump
	// contains filtered or unexported fields
}

func NewValidate

func NewValidate(cfg *domains.Config, registry *utils.TransformerRegistry, st storages.Storager) (*Validate, error)

func (*Validate) Run

func (v *Validate) Run(ctx context.Context) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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