snapshot

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 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 Errors

type Errors map[string]*SchemaErrors

func NewErrors

func NewErrors(schema string, err error) Errors

func (Errors) AddError added in v0.6.6

func (e Errors) AddError(schema string, err error)

func (Errors) Error

func (e Errors) Error() string

func (Errors) GetSchemaErrors added in v0.6.6

func (e Errors) GetSchemaErrors(schema string) *SchemaErrors

type Request

type Request struct {
	Schema string
	Tables []string
	Status Status
	Errors *SchemaErrors
}

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(schema string, err error)

func (*Request) MarkInProgress

func (r *Request) MarkInProgress()

type SchemaErrors added in v0.6.6

type SchemaErrors struct {
	Schema       string            `json:"schema,omitempty"`
	GlobalErrors []string          `json:"snapshot,omitempty"`
	TableErrors  map[string]string `json:"tables,omitempty"`
}

func NewSchemaErrors added in v0.6.6

func NewSchemaErrors(schema string, err error) *SchemaErrors

func (*SchemaErrors) AddGlobalError added in v0.6.6

func (e *SchemaErrors) AddGlobalError(err error)

func (*SchemaErrors) AddTableError added in v0.6.6

func (e *SchemaErrors) AddTableError(table string, err error)

func (*SchemaErrors) Error added in v0.6.6

func (e *SchemaErrors) Error() string

func (*SchemaErrors) GetFailedTables added in v0.6.6

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

func (*SchemaErrors) IsGlobalError added in v0.6.6

func (e *SchemaErrors) IsGlobalError() bool

func (*SchemaErrors) IsTableError added in v0.6.6

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

type Snapshot

type Snapshot struct {
	SchemaTables         map[string][]string
	SchemaExcludedTables map[string][]string
}

func (*Snapshot) GetSchemas added in v0.6.6

func (s *Snapshot) GetSchemas() []string

func (*Snapshot) GetTables added in v0.6.6

func (s *Snapshot) GetTables() []string

func (*Snapshot) HasTables added in v0.6.6

func (s *Snapshot) HasTables() bool

type Status

type Status string

Jump to

Keyboard shortcuts

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