Documentation ¶
Index ¶
- type Config
- func (c *Config) SetBatchSize(size int) error
- func (c *Config) SetColumns(cols []string) error
- func (c *Config) SetCompress(compress bool) error
- func (c *Config) SetConn(s string) error
- func (c *Config) SetDatabase(s string) error
- func (c *Config) SetDatabases(dbs []string) error
- func (c *Config) SetEngine(e string) error
- func (c *Config) SetFilePrefix(prefix string) error
- func (c *Config) SetFilesOrFolders(paths []string) error
- func (c *Config) SetIndexes(indexes []string) error
- func (c *Config) SetLineParser(p string) error
- func (c *Config) SetOutputFormat(o string) error
- func (c *Config) SetQuery(q string) error
- func (c *Config) SetSourcesDatabase(s string) error
- func (c *Config) SetVerbosity(v int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // root Verbosity int // init Databases []string Conn string SourcesDatabase string Engine string Indexes []string // search Query string OutputFormat string Columns []string // import FilesOrFolders []string LineParser string Database string Compress bool BatchSize int FilePrefix string }
Config contains the configuration options for DumpDB
func (*Config) SetBatchSize ¶
SetBatchSize sets the number of records that are imported to the database together
func (*Config) SetColumns ¶
SetColumns sets the columns to output when searching
func (*Config) SetCompress ¶
SetCompress sets whether or not to compress the database after importing
func (*Config) SetConn ¶
SetConn sets the database connection string, in the format `user:pass@tcp(127.0.0.1:3306)`
func (*Config) SetDatabase ¶
SetDatabase sets the 'main' database name, SetConn must be called first
func (*Config) SetDatabases ¶
SetDatabases sets the databases to use, SetConn must be called first
func (*Config) SetFilePrefix ¶
SetFilePrefix sets the number of records that are imported to the database together
func (*Config) SetFilesOrFolders ¶
SetFilesOrFolders sets the files or folders to import
func (*Config) SetIndexes ¶
SetIndexes sets the 'main' table indexes
func (*Config) SetLineParser ¶
SetLineParser sets the function to parse lines when importing
func (*Config) SetOutputFormat ¶
SetOutputFormat sets the search output format
func (*Config) SetSourcesDatabase ¶
SetSourcesDatabase sets the sources database name, SetConn must be called first
func (*Config) SetVerbosity ¶
SetVerbosity sets the Config verbosity