cmd

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetadataJsonFileName = "metadata.json"
	HeartBeatFileName    = "heartbeat"
)
View Source
const (
	HeartBeatDoneContent       = "done"
	HeartBeatInProgressContent = "in-progress"
)
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 (
	HeartBeatWriteInterval = 15 * time.Minute
)

Variables

View Source
var (
	ErrTableDefinitionIsEmtpy = errors.New("table definition is empty: please re-dump the data using the latest version of greenmask if you want to use --inserts")
)

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, cfg *domains.Restore, 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