snapshot

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusRequested  = Status("requested")
	StatusInProgress = Status("in progress")
	StatusCompleted  = Status("completed")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Name  string
	Type  string
	Value any
}

type Errors

type Errors struct {
	Snapshot error        `json:"snapshot,omitempty"`
	Tables   []TableError `json:"tables,omitempty"`
}

func NewErrors

func NewErrors(err error) *Errors

func (*Errors) AddSnapshotError

func (e *Errors) AddSnapshotError(err error)

func (*Errors) Error

func (e *Errors) Error() string

func (*Errors) GetFailedTables

func (e *Errors) GetFailedTables() []string

func (*Errors) IsTableError

func (e *Errors) IsTableError(table string) bool

type Request

type Request struct {
	Snapshot Snapshot
	Status   Status
	Errors   *Errors
}

func (*Request) HasFailed

func (r *Request) HasFailed() bool

func (*Request) HasFailedForTable

func (r *Request) HasFailedForTable(table string) bool

func (*Request) IsPending

func (r *Request) IsPending() bool

func (*Request) MarkCompleted

func (r *Request) MarkCompleted(err error)

func (*Request) MarkInProgress

func (r *Request) MarkInProgress()

type Row

type Row struct {
	Schema  string
	Table   string
	Columns []Column
}

type RowProcessor

type RowProcessor func(context.Context, *Row) error

type Snapshot

type Snapshot struct {
	SchemaName string
	TableNames []string
}

func (*Snapshot) IsValid

func (s *Snapshot) IsValid() bool

type Status

type Status string

type TableError

type TableError struct {
	Table    string `json:"table"`
	ErrorMsg string `json:"error"`
}

func NewTableError

func NewTableError(table string, err error) TableError

func (TableError) Error

func (e TableError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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