Documentation
¶
Index ¶
Constants ¶
View Source
const ( StatusRequested = Status("requested") StatusInProgress = Status("in progress") StatusCompleted = Status("completed") )
View Source
const ( RequestModeData = RequestMode("data") RequestModeSchemaOnly = RequestMode("schema-only") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Errors ¶
type Errors map[string]*SchemaErrors
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
Mode RequestMode
Errors *SchemaErrors
}
func (*Request) GetMode ¶ added in v1.2.0
func (r *Request) GetMode() RequestMode
GetMode returns the request mode, defaulting to data mode for requests recorded before the mode was tracked.
func (*Request) HasFailedForTable ¶
func (*Request) MarkCompleted ¶
func (*Request) MarkInProgress ¶
func (r *Request) MarkInProgress()
type RequestMode ¶ added in v1.2.0
type RequestMode string
RequestMode captures what a snapshot request replicated to the target: schema and data (data mode), or schema only.
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
// SchemaOnlyTables are part of the schema snapshot scope, but their data
// is not copied. SchemaTables entries listed by exact name (no wildcards)
// take precedence over a schema-only wildcard match, and
// SchemaExcludedTables take precedence over the schema-only list.
SchemaOnlyTables map[string][]string
}
func (*Snapshot) GetSchemas ¶ added in v0.6.6
func (*Snapshot) HasSchemaOnlyTables ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.