config

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompareConfig

type CompareConfig struct {
	SourceType   string `toml:"source-type" json:"source-type"`
	DestType     string `toml:"dest-type" json:"dest-type"`
	SQLFile      string `toml:"sqlfile" json:"sqlfile"`
	Delimiter    string `toml:"sqlfile-delimiter" json:"sqlfile-delimiter"`
	Output       string `toml:"output" json:"output"`
	OutputPrefix string `toml:"outputprefix" json:"outputprefix"`
}

type Config

type Config struct {
	Log           Log            `toml:"log" json:"log"`
	MySQLConfig   DBConfig       `toml:"mysql-config" json:"mysql-config"`
	TiDBConfig    DBConfig       `toml:"tidb-config" json:"tidb-config"`
	CompareConfig CompareConfig  `toml:"compare-config" json:"compare-config"`
	OracleConfig  OracleDBConfig `toml:"oracle-config" json:"oracle-config"`
}

func InitConfig

func InitConfig(configPath string) (cfg Config)

InitConfig Func

type DBConfig

type DBConfig struct {
	Host     string `toml:"host" json:"host"`
	Port     int    `toml:"port" json:"port"`
	User     string `toml:"user" json:"user"`
	Password string `toml:"password" json:"password"`
	Database string `toml:"database" json:"database"`
}

type Log

type Log struct {
	Level   string `toml:"log-level" json:"log-level"`
	LogPath string `toml:"log-path" json:"log-path"`
}

type OracleDBConfig

type OracleDBConfig struct {
	User        string `toml:"user" json:"user"`
	Password    string `toml:"password" json:"password"`
	Host        string `toml:"host" json:"host"`
	Port        int    `toml:"port" json:"port"`
	ServiceName string `toml:"service-name" json:"service-name"`
	SchemaName  string `toml:"schema-name" json:"schema-name"`
}

Jump to

Keyboard shortcuts

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