Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Common Common `mapstructure:"common" yaml:"common" json:"common"` Log LogConfig `mapstructure:"log" yaml:"log" json:"log"` Storage StorageConfig `mapstructure:"storage" yaml:"storage" json:"storage"` Dump Dump `mapstructure:"dump" yaml:"dump" json:"dump"` Validate Validate `mapstructure:"validate" yaml:"validate" json:"validate"` Restore Restore `mapstructure:"restore" yaml:"restore" json:"restore"` CustomTransformers []*custom.TransformerDefinition `mapstructure:"custom_transformers" yaml:"custom_transformers" json:"custom_transformers,omitempty"` }
var (
Cfg *Config
)
type StorageConfig ¶
type Table ¶
type Table struct { Schema string `mapstructure:"schema" yaml:"schema" json:"schema,omitempty"` Name string `mapstructure:"name" yaml:"name" json:"name,omitempty"` Query string `mapstructure:"query" yaml:"query" json:"query,omitempty"` ApplyForInherited bool `mapstructure:"apply_for_inherited" yaml:"apply_for_inherited" json:"apply_for_inherited,omitempty"` Transformers []*TransformerConfig `mapstructure:"transformers" yaml:"transformers" json:"transformers,omitempty"` ColumnsTypeOverride map[string]string `mapstructure:"columns_type_override" yaml:"columns_type_override" json:"columns_type_override,omitempty"` }
type TransformerConfig ¶
type TransformerConfig struct { Name string `mapstructure:"name" yaml:"name" json:"name,omitempty"` Settings *TransformerSettings `mapstructure:"settings,omitempty" yaml:"settings,omitempty" json:"settings,omitempty"` // Params - transformation parameters. It might be any type. If structure should be stored as raw json // This cannot be parsed with mapstructure due to uncontrollable lowercasing // https://github.com/spf13/viper/issues/373 // Instead we have to use workaround and parse it manually Params toolkit.Params `mapstructure:"-" yaml:"-" json:"-"` // yaml:"params" json:"params,omitempty"` // TempParams - the https://github.com/spf13/viper/issues/373 workaround // we decode the values into TempParams and then Unmarshal it manually and set to Params // The related code is in internal/utils/config/viper_workaround.go TempParams map[string]any `mapstructure:"-" yaml:"params,omitempty" json:"params,omitempty"` }
type TransformerSettings ¶
type TransformerSettings struct { NoValidateSchema bool `mapstructure:"no_validate_schema" yaml:"no_validate_schema" json:"no_validate_schema,omitempty"` ResolvedValidationWarnings []string `mapstructure:"resolved_validation_warnings" yaml:"resolved_validation_warnings" json:"resolved_validation_warnings,omitempty"` }
type Validate ¶
type Validate struct { Tables []string `mapstructure:"tables" yaml:"tables" json:"tables,omitempty"` Data bool `mapstructure:"data" yaml:"data" json:"data,omitempty"` Diff bool `mapstructure:"diff" yaml:"diff" json:"diff,omitempty"` Schema bool `mapstructure:"schema" yaml:"schema" json:"schema,omitempty"` RowsLimit uint64 `mapstructure:"rows_limit" yaml:"rows_limit" json:"rows_limit,omitempty"` ResolvedWarnings []string `mapstructure:"resolved_warnings" yaml:"resolved_warnings" json:"resolved_warnings,omitempty"` TableFormat string `mapstructure:"table_format" yaml:"table_format" json:"table_format,omitempty"` Format string `mapstructure:"format" yaml:"format" json:"format,omitempty"` OnlyTransformed bool `mapstructure:"transformed_only" yaml:"transformed_only" json:"transformed_only,omitempty"` Warnings bool `mapstructure:"warnings" yaml:"warnings" json:"warnings,omitempty"` }
Click to show internal directories.
Click to hide internal directories.