dumpers

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: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobsDumper

type BlobsDumper struct {
	Blobs          *entries.Blobs
	OriginalSize   int64
	CompressedSize int64
}

func NewLargeObjectDumper

func NewLargeObjectDumper(blobs *entries.Blobs) *BlobsDumper

func (*BlobsDumper) DebugInfo

func (lod *BlobsDumper) DebugInfo() string

func (*BlobsDumper) Execute

func (lod *BlobsDumper) Execute(ctx context.Context, tx pgx.Tx, st storages.Storager) (entries.Entry, error)

type DumpError

type DumpError struct {
	Schema string `json:"schema,omitempty"`
	Table  string `json:"table,omitempty"`
	Line   uint64 `json:"line,omitempty"`
	Err    error  `json:"err,omitempty"`
}

func NewDumpError

func NewDumpError(schema, table string, line uint64, err error) *DumpError

func (*DumpError) Error

func (de *DumpError) Error() string

type DumpTask

type DumpTask interface {
	Execute(ctx context.Context, tx pgx.Tx, st storages.Storager) (entries.Entry, error)
	DebugInfo() string
}

type Pipeliner

type Pipeliner interface {
	Dump(ctx context.Context, data []byte) error
	Init(ctx context.Context) error
	Done(ctx context.Context) error
	CompleteDump() error
}

type PlainDumpPipeline

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

func NewPlainDumpPipeline

func NewPlainDumpPipeline(table *entries.Table, w io.Writer) *PlainDumpPipeline

func (*PlainDumpPipeline) CompleteDump

func (pdp *PlainDumpPipeline) CompleteDump() (err error)

func (*PlainDumpPipeline) Done

func (pdp *PlainDumpPipeline) Done(ctx context.Context) error

func (*PlainDumpPipeline) Dump

func (pdp *PlainDumpPipeline) Dump(ctx context.Context, data []byte) (err error)

func (*PlainDumpPipeline) Init

func (pdp *PlainDumpPipeline) Init(ctx context.Context) error

type SequenceDumper

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

func NewSequenceDumper

func NewSequenceDumper(sequence *entries.Sequence) *SequenceDumper

func (*SequenceDumper) DebugInfo

func (sd *SequenceDumper) DebugInfo() string

func (*SequenceDumper) Execute

func (sd *SequenceDumper) Execute(ctx context.Context, tx pgx.Tx, st storages.Storager) (entries.Entry, error)

type TableDumper

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

func NewTableDumper

func NewTableDumper(table *entries.Table, validate bool) *TableDumper

func (*TableDumper) DebugInfo

func (td *TableDumper) DebugInfo() string

func (*TableDumper) Execute

func (td *TableDumper) Execute(ctx context.Context, tx pgx.Tx, st storages.Storager) (entries.Entry, error)

type TransformationFunc

type TransformationFunc func(ctx context.Context, r *toolkit.Record) (*toolkit.Record, error)

type TransformationPipeline

type TransformationPipeline struct {
	Transform TransformationFunc
	// contains filtered or unexported fields
}

func NewTransformationPipeline

func NewTransformationPipeline(ctx context.Context, eg *errgroup.Group, table *entries.Table, w io.Writer) (*TransformationPipeline, error)

func (*TransformationPipeline) CompleteDump

func (tp *TransformationPipeline) CompleteDump() (err error)

func (*TransformationPipeline) Done

func (*TransformationPipeline) Dump

func (tp *TransformationPipeline) Dump(ctx context.Context, data []byte) (err error)

func (*TransformationPipeline) Init

func (*TransformationPipeline) TransformAsync

func (tp *TransformationPipeline) TransformAsync(ctx context.Context, r *toolkit.Record) (*toolkit.Record, error)

func (*TransformationPipeline) TransformSync

func (tp *TransformationPipeline) TransformSync(ctx context.Context, r *toolkit.Record) (*toolkit.Record, error)

type TransformationWindow

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

func NewTransformationWindow

func NewTransformationWindow(ctx context.Context, eg *errgroup.Group) *TransformationWindow

func (*TransformationWindow) Done

func (tw *TransformationWindow) Done()

func (*TransformationWindow) Init

func (tw *TransformationWindow) Init()

func (*TransformationWindow) Transform

func (*TransformationWindow) TryAdd

func (tw *TransformationWindow) TryAdd(table *entries.Table, t utils.Transformer) bool

type ValidationPipeline

type ValidationPipeline struct {
	*TransformationPipeline
}

func NewValidationPipeline

func NewValidationPipeline(ctx context.Context, eg *errgroup.Group, table *entries.Table, w io.Writer) (*ValidationPipeline, error)

func (*ValidationPipeline) Dump

func (vp *ValidationPipeline) Dump(ctx context.Context, data []byte) (err error)

Jump to

Keyboard shortcuts

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